IReader

References
public interface IReader
Provides access to a subset of Node methods used for writing archives.

Properties

Name

#
Name Name { get; }
Gets the name of this reader.

Methods

Boolean

#
bool Boolean(Name name)
Read a boolean value.
name (Name)Name of item.
Boolean value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

BooleanArray

#
bool[] BooleanArray(Name name)
Read a boolean array.
name (Name)Name of item.
Boolean array.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Complex128

#
Complex Complex128(Name name)
Read a complex number value.
name (Name)Name of item.
Decimal point value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

DateTime

#
DateTime DateTime(Name name)
Read a datetime value.
name (Name)Name of item.
Datetime value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Decimal128

#
decimal Decimal128(Name name)
Read a decimal value.
name (Name)Name of item.
Decimal point value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

FilePath

#
AbsRelPaths FilePath(Name name)
Read a file path value.
name (Name)Name of item.
File path value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

FindItem

#
Value FindItem(Name name)
Get the value associatd with the specified name and index.
name (Name)Name of value to find.
The value linked to the given name and index or null if no such value exists.

FindReader

#
IReader FindReader(Name name)
Find the reader sub-object by name and index.
name (Name)Name of reader to find.
The reader identified by the name and index or null if no such reader exists.

GenericArray<T>

#
T[] GenericArray<T>(Name name)
Restore an array of values. This method only works if SupportsArray<T>() returns true for the same type constraint.
name (Name)Name of item.
Restored values.

Guid128

#
Guid Guid128(Name name)
Read a Guid value.
name (Name)Name of item.
Guid value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

GuidArray

#
Guid[] GuidArray(Name name)
Read a Guid array.
name (Name)Name of item.
Guid array.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

HasItem

#
bool HasItem(Name name, DataType storageType)
Test whether a certain item exists.
name (Name)Name of item to find.
storageType (DataType)Item type constraint.
True if such an item exists within this reader.

HasItem

#
bool HasItem(Name name)
Test whether a certain item exists.
name (Name)Name of item to find.
True if such an item exists within this reader.

HasItemOrNode

#
bool HasItemOrNode(Name name)
Gets whether the specified name is available as either an item, or a node.
name (Name)

HasNode

#
bool HasNode(Name name)
Test whether a certain child node/reader exists.
name (Name)Name of node/reader to find.
True if node/reader is defined.

Integer32

#
int Integer32(Name name)
Read an integer value.
name (Name)Name of item.
Integer value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Integer32Array

#
int[] Integer32Array(Name name)
Read an integer array.
name (Name)Name of item.
Integer array.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Integer64

#
long Integer64(Name name)
Read an integer value.
name (Name)Name of item.
Integer value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Integer64Array

#
long[] Integer64Array(Name name)
Read an integer array.
name (Name)Name of item.
Integer array.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Integer8

#
byte Integer8(Name name)
Read a byte value.
name (Name)Name of item.
Byte value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Integer8Array

#
byte[] Integer8Array(Name name)
Read a byte array.
name (Name)Name of item.
Byte array.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

IntegerXx

#
BigInteger IntegerXx(Name name)
Read an integer value.
name (Name)Name of item.
Integer value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Number32

#
float Number32(Name name)
Read a floating point value.
name (Name)Name of item.
Floating point value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Number32Array

#
float[] Number32Array(Name name)
Read a float array.
name (Name)Name of item.
Float array.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Number64

#
double Number64(Name name)
Read a floating point value.
name (Name)Name of item.
Floating point value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Number64Array

#
double[] Number64Array(Name name)
Read a float array.
name (Name)Name of item.
Float array.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Storable

#
IStorable Storable(Name name)
Read a storable object. This method requires that the object was originally written using IWriter.WriteStorable, that the type of the original value had an IdentifierAttribute associated with it and that that identifier is known in the current running context.
name (Name)Inner name for data. If null, the current reader will be used.

Storable<T>

#
T Storable<T>(Name name)
Read a storable object of a specific type. default(T) will be returned if the name does not point to a valid block.
name (Name)Inner name for data. If null, the current reader will be used.

StorableArray<T>

#
T[] StorableArray<T>(Name name)
Read a collection of storable objects.
name (Name)

String

#
string String(Name name)
Read a string value.
name (Name)Name of item.
String value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

StringArray

#
string[] StringArray(Name name)
Read a string array.
name (Name)Name of item.
String array.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

SupportsArray<T>

#
bool SupportsArray<T>()
Gets whether an array of type T can be automatically restored.
True if an array of type T can be automatically restored.

TimeSpan

#
TimeSpan TimeSpan(Name name)
Read a datetime value.
name (Name)Name of item.
Datetime value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

TryRead<T>

#
T TryRead<T>(Name name, T valueIfMissing)
Try and read a value if it exists.
name (Name)Name of value.
valueIfMissing (T)Value to return if there is no item with the given name.
Read value or default.

Type

#
Type Type(Name name, IEnumerable<Type> fallbackList, out Type fallback)
Read a type value. Since a type may not be loaded during read, this operation may fail. A list of possible fallback types may be specified, and an identically named one will be picked if the exact type is not found.
name (Name)
fallbackList (IEnumerable<Type>)
fallback (out Type)

Type

#
Type Type(Name name)
Read a type value. Since a type may not be loaded during read, this operation may fail.
name (Name)Name of item.
Type value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

TypeName

#
string TypeName(Name name)
Read the assembly qualified name of the type.
name (Name)Name of item.
Type name value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.

Version

#
Version Version(Name name)
Read a version value.
name (Name)Name of item.
Version value.
KeyNotFoundExceptionThrown when the requested name+index do not exist.