Class fsBaseConverter
The serialization converter allows for customization of the serialization
process.
Inheritance
fsBaseConverter
Syntax
public abstract class fsBaseConverter
Fields
Serializer
The serializer that was owns this converter.
Declaration
public fsSerializer Serializer
Field Value
Methods
CheckKey(Dictionary<String, fsData>, String, out fsData)
Declaration
protected fsResult CheckKey(Dictionary<string, fsData> data, string key, out fsData subitem)
Parameters
Returns
CheckKey(fsData, String, out fsData)
Declaration
protected fsResult CheckKey(fsData data, string key, out fsData subitem)
Parameters
Returns
CheckType(fsData, fsDataType)
Declaration
protected fsResult CheckType(fsData data, fsDataType type)
Parameters
Returns
CreateInstance(fsData, Type)
Construct an object instance that will be passed to TryDeserialize.
This should not deserialize the object.
Declaration
public virtual object CreateInstance(fsData data, Type storageType)
Parameters
Type |
Name |
Description |
fsData |
data |
The data the object was serialized with.
|
Type |
storageType |
The field/property type that is storing the instance.
|
Returns
Type |
Description |
Object |
An object instance
|
DeserializeMember<T>(Dictionary<String, fsData>, Type, String, out T)
Declaration
protected fsResult DeserializeMember<T>(Dictionary<string, fsData> data, Type overrideConverterType, string name, out T value)
Parameters
Returns
Type Parameters
FailExpectedType(fsData, fsDataType[])
Declaration
protected fsResult FailExpectedType(fsData data, params fsDataType[] types)
Parameters
Returns
RequestCycleSupport(Type)
If true, then the serializer will support cyclic references with the
given converted type.
Declaration
public virtual bool RequestCycleSupport(Type storageType)
Parameters
Type |
Name |
Description |
Type |
storageType |
The field/property type that is currently storing the object that is
being serialized.
|
Returns
RequestInheritanceSupport(Type)
If true, then the serializer will include inheritance data for the
given converter.
Declaration
public virtual bool RequestInheritanceSupport(Type storageType)
Parameters
Type |
Name |
Description |
Type |
storageType |
The field/property type that is currently storing the object that is
being serialized.
|
Returns
SerializeMember<T>(Dictionary<String, fsData>, Type, String, T)
Declaration
protected fsResult SerializeMember<T>(Dictionary<string, fsData> data, Type overrideConverterType, string name, T value)
Parameters
Returns
Type Parameters
TryDeserialize(fsData, ref Object, Type)
Deserialize data into the object instance.
Declaration
public abstract fsResult TryDeserialize(fsData data, ref object instance, Type storageType)
Parameters
Type |
Name |
Description |
fsData |
data |
Serialization data to deserialize from.
|
Object |
instance |
The object instance to deserialize into.
|
Type |
storageType |
The field/property type that is storing the instance.
|
Returns
Type |
Description |
fsResult |
True if serialization was successful, false otherwise.
|
TrySerialize(Object, out fsData, Type)
Serialize the actual object into the given data storage.
Declaration
public abstract fsResult TrySerialize(object instance, out fsData serialized, Type storageType)
Parameters
Type |
Name |
Description |
Object |
instance |
The object instance to serialize. This will never be null.
|
fsData |
serialized |
The serialized state.
|
Type |
storageType |
The field/property type that is storing this instance.
|
Returns
Type |
Description |
fsResult |
If serialization was successful.
|
Extension Methods