IWriter

References
public interface IWriter
This interface is implemented by Node and provides ways to store the standard data types.

Properties

Name

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

Methods

AddItem

#
void AddItem(Item entry)
Add a new entry to this writer. Entry location must be unique.
entry (Item)Entry to add.

AddNode

#
void AddNode(Node node)
Copy an existing node and add it to this node.
node (Node)Node to add.

Boolean

#
void Boolean(Name name, bool value)
Write a Boolean value.
name (Name)Location of entry.
value (bool)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

BooleanArray

#
void BooleanArray(Name name, params bool[] value)
Write an array of booleans.
name (Name)Location of entry.
value (params bool[])Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Complex128

#
void Complex128(Name name, Complex value)
Write a System.Numerics.Complex number value.
name (Name)Location of entry.
value (Complex)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

CreateWriter

#
IWriter CreateWriter(Name name)
Create a new writer and slave it to this writer.
name (Name)Location of writer.
A new writer instance that is part of this writer.

DateTime

#
void DateTime(Name name, DateTime value)
Write a DateTime value.
name (Name)Location of entry.
value (DateTime)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Decimal128

#
void Decimal128(Name name, decimal value)
Write a System.Decimal value.
name (Name)Location of entry.
value (decimal)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

FilePath

#
void FilePath(Name name, AbsRelPaths value)
Write a File path value.
name (Name)Location of entry.
value (AbsRelPaths)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

FilePath

#
void FilePath(Name name, FileSystemPath absolutePath)
Write a File path value based on an absolute path. If the archive location has been set, a relative path will be included from the archive to the absolute path.
name (Name)Location of entry.
absolutePath (FileSystemPath)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

GenericArray<T>

#
void GenericArray<T>(Name name, T[] array)
Store an array of values. This method only works if SupportsArray<T>() returns true for the same type constraint.
name (Name)Location of entry.
array (T[])Values to store.

Guid128

#
void Guid128(Name name, Guid value)
Write a Guid value.
name (Name)Location of entry.
value (Guid)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

GuidArray

#
void GuidArray(Name name, params Guid[] value)
Write an array of guids.
name (Name)Location of entry.
value (params Guid[])Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Integer32

#
void Integer32(Name name, int value)
Write a 32-bit Integer value.
name (Name)Location of entry.
value (int)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Integer32Array

#
void Integer32Array(Name name, params int[] value)
Write an array of 32-bit integers.
name (Name)Location of entry.
value (params int[])Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Integer64

#
void Integer64(Name name, long value)
Write a 64-bit Integer value.
name (Name)Location of entry.
value (long)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Integer64Array

#
void Integer64Array(Name name, params long[] value)
Write an array of 64-bit integers.
name (Name)Location of entry.
value (params long[])Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Integer8

#
void Integer8(Name name, byte value)
Write a Byte value.
name (Name)Location of entry.
value (byte)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Integer8Array

#
void Integer8Array(Name name, params byte[] value)
Write an array of bytes.
name (Name)Location of entry.
value (params byte[])Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

IntegerXx

#
void IntegerXx(Name name, BigInteger value)
Write a System.Numerics.BigInteger value.
name (Name)Location of entry.
value (BigInteger)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Number32

#
void Number32(Name name, float value)
Write a System.Single value.
name (Name)Location of entry.
value (float)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Number32Array

#
void Number32Array(Name name, params float[] value)
Write an array of floats.
name (Name)Location of entry.
value (params float[])Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Number64

#
void Number64(Name name, double value)
Write a System.Double value.
name (Name)Location of entry.
value (double)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Number64Array

#
void Number64Array(Name name, params double[] value)
Write an array of doubles.
name (Name)Location of entry.
value (params double[])Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Storable

#
void Storable(Name name, IStorable value)
Write an object which implements IStorable to the archive. Always use this method instead of calling the Store() method on the object itself.
name (Name)Inner location for data. If null, the current writer will be used.
value (IStorable)Value to store.

StorableArray<T>

#
void StorableArray<T>(Name name, IEnumerable<T> storableValues)
Write a collection of objects which implement the IStorable interface.
name (Name)
storableValues (IEnumerable<T>)

String

#
void String(Name name, string value)
Write a String value.
name (Name)Location of entry.
value (string)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

StringArray

#
void StringArray(Name name, params string[] value)
Write an array of strings.
name (Name)Location of entry.
value (params string[])Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

SupportsArray<T>

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

TimeSpan

#
void TimeSpan(Name name, TimeSpan value)
Write a TimeSpan value.
name (Name)Location of entry.
value (TimeSpan)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.

Type

#
void Type(Name name, Type type)
Write type value.
name (Name)
type (Type)

Version

#
void Version(Name name, Version value)
Write a Version value.
name (Name)Location of entry.
value (Version)Value of entry.
InvalidOperationExceptionThrown if another item with the same name already exists.