GenericSerializerFactory Class
Namespace: Stride.Core.SerializationAssembly: Stride.Core.dll
Simple serializer that will matches specific type using base type and create a data serializer with matched type.
Derived from GenericSerializerFactory:
public class GenericSerializerFactory : SerializerFactory
Name | Description | |
---|---|---|
Constructors | ||
GenericSerializerFactory(Type, Type) | Initializes a new instance of the GenericSerializerFactory class. |
|
Methods | ||
GetSerializer(SerializerSelector, ref ObjectId) | ||
GetSerializer(SerializerSelector, Type) |
Constructors
GenericSerializerFactory(Type, Type)
Initializes a new instance of the GenericSerializerFactory class.
public GenericSerializerFactory(Type baseType, Type serializerGenericType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | baseType | The type to match. |
System.Type | serializerGenericType | The generic type that will be used to instantiate serializers. |
Methods
GetSerializer(SerializerSelector, ref ObjectId)
public override DataSerializer GetSerializer(SerializerSelector selector, ref ObjectId typeId)
Parameters
Type | Name | Description |
---|---|---|
SerializerSelector | selector | |
ObjectId | typeId |
Returns
Type | Description |
---|---|
DataSerializer |
Overrides
GetSerializer(SerializerSelector, Type)
public override DataSerializer GetSerializer(SerializerSelector selector, Type type)
Parameters
Type | Name | Description |
---|---|---|
SerializerSelector | selector | |
System.Type | type |
Returns
Type | Description |
---|---|
DataSerializer |