C# Class FullInspector.BaseSerializer

The core API that is used for serializing and deserializing objects.
Mostra file Open project: jacobdufault/fullinspector Class Usage Examples

Public Methods

Method Description
Deserialize ( MemberInfo storageType, string serializedState, ISerializationOperator serializationOperator ) : object

Deserialize the given serialized content.

Serialize ( MemberInfo storageType, object value, ISerializationOperator serializationOperator ) : string

Serialize the given object into a string.

Protected Methods

Method Description
GetStorageType ( MemberInfo member ) : Type

Helper function that returns the type of object stored within the given member.

Method Details

Deserialize() public abstract method

Deserialize the given serialized content.
public abstract Deserialize ( MemberInfo storageType, string serializedState, ISerializationOperator serializationOperator ) : object
storageType System.Reflection.MemberInfo /// The type of field/property that is storing this value. For example, /// an object field may be storing an int instance. In that case, /// storageType will be typeof(object), while value.GetType() will result /// in typeof(int). ///
serializedState string /// The serialized state of the object, created by calling /// Serialize(target). ///
serializationOperator ISerializationOperator /// Contains implementations for common serialization operations, such as /// storing a UnityObject reference. ///
return object

GetStorageType() protected static method

Helper function that returns the type of object stored within the given member.
protected static GetStorageType ( MemberInfo member ) : Type
member System.Reflection.MemberInfo
return System.Type

Serialize() public abstract method

Serialize the given object into a string.
public abstract Serialize ( MemberInfo storageType, object value, ISerializationOperator serializationOperator ) : string
storageType System.Reflection.MemberInfo /// The type of field/property that is storing this value. For example, /// an object field may be storing an int instance. In that case, /// storageType will be typeof(object), while value.GetType() will result /// in typeof(int). ///
value object The object to serialize.
serializationOperator ISerializationOperator /// Contains implementations for common serialization operations, such as /// storing a UnityObject reference. ///
return string