Class fsIEnumerableConverter
Provides serialization support for anything which extends from
IEnumerable
and has an Add
method.
Inherited Members
Namespace: Unity.VisualScripting .FullSerializer
Assembly: Unity.VisualScripting.Core.dll
Syntax
public class fsIEnumerableConverter : fsConverter
Methods
CanProcess(Type)
Can this converter serialize and deserialize the given object type?
Declaration
public override bool CanProcess(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The given object type. |
Returns
Type | Description |
---|---|
bool | True if the converter can serialize it, false otherwise. |
Overrides
CreateInstance(fsData, Type)
Construct an object instance that will be passed to TryDeserialize. This should not deserialize the object.
Declaration
public override object CreateInstance(fsData data, Type storageType)
Parameters
Type | Name | Description |
---|---|---|
fs |
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 |
Overrides
TryDeserialize(fsData, ref object, Type)
Deserialize data into the object instance.
Declaration
public override fsResult TryDeserialize(fsData data, ref object instance_, Type storageType)
Parameters
Type | Name | Description |
---|---|---|
fs |
data | Serialization data to deserialize from. |
object | instance_ | |
Type | storageType | The field/property type that is storing the instance. |
Returns
Type | Description |
---|---|
fs |
True if serialization was successful, false otherwise. |
Overrides
TrySerialize(object, out fsData, Type)
Serialize the actual object into the given data storage.
Declaration
public override fsResult TrySerialize(object instance_, out fsData serialized, Type storageType)
Parameters
Type | Name | Description |
---|---|---|
object | instance_ | |
fs |
serialized | The serialized state. |
Type | storageType | The field/property type that is storing this instance. |
Returns
Type | Description |
---|---|
fs |
If serialization was successful. |