to serialize and deserialize objects. Implement this to enable serialization to a
new format.
TElement | |
Generates an element that represents a dictionary. |
TElement | |
Generates an element that represents a key-value pair. |
TElement | FormatList(bool isTuple, IEnumerable<TElement> values) |
Generates an element that represents a list. |
TElement | |
Generates an element that represents a null value. |
TElement | |
Generates an element that represents an object with fields. |
TElement | |
Generates an element that represents raw data (byte[] ). |
TElement | |
Converts an existing element (which may represent, for example, an object, list or dictionary) into one that
can be referred to by a reference (see IClassifyFormat<TElement>.FormatReference(int)). |
TElement | |
Generates an element that represents a reference to another object within the same serialized object graph. |
TElement | |
Generates an element that represents a value of the same type as serialized elements. |
TElement | |
Generates an element that represents a byte , sbyte , short , ushort , int ,
uint , long , ulong , BigInteger, decimal ,
float , double , bool , char , string , DateTime or an enum value. |
TElement | |
Converts an existing element (which may represent, for example, an object, list or dictionary) into one that
additionally knows its type. |
IEnumerable<KeyValuePair<object, TElement>> | |
Decodes a dictionary. |
TElement | GetField(TElement element, string fieldName, string declaringType) |
Returns the sub-element pertaining to the specified field. |
void | |
Decodes a key-value pair. |
IEnumerable<TElement> | GetList(TElement element, int? tupleSize) |
Decodes a list. |
byte[] | |
Decodes a piece of raw data. |
int | |
Returns the ID encoded in this element. This is called only if IClassifyFormat<TElement>.IsReference(TElement) or IClassifyFormat<TElement>.IsReferable(TElement) returned true . |
TElement | |
Decodes the serialized form of the element type itself. |
object | |
Called when Classify expects the element to be one of the following types: byte , sbyte ,
short , ushort , int , uint , long , ulong , BigInteger, decimal , float , double , bool , char ,
string , DateTime or an enum type. The implementation is free to return a value of any of
these types, and Classify will automatically use ExactConvert to convert the value to the
required target type. |
string | GetType(TElement element, out bool isFullType) |
Determines the type of the object stored in the specified element. |
bool | HasField(TElement element, string fieldName, string declaringType) |
Determines whether the element is an object and contains a sub-element for the specified field. |
bool | |
Determines whether the specified element represents a null value. |
bool | |
Determines whether this element represents an object that can be referred to by a reference element. |
bool | |
Determines whether this element represents a reference to another object in the same serialized graph. |
TElement | |
Reads the serialized form from a stream. |
void | |
Throws an InvalidOperationException informing the user that an element is a reference (IClassifyFormat<TElement>.IsReference(TElement)) but the corresponding referable has not been encountered while deserializing. |
void | |
Writes the serialized form to a stream. |