Class GenericSerializerFactory
- Namespace
- Stride.Core.Serialization
- Assembly
- Stride.Core.dll
Simple serializer that will matches specific type using base type and create a data serializer with matched type.
public class GenericSerializerFactory : SerializerFactory
- Inheritance
-
GenericSerializerFactory
Constructors
GenericSerializerFactory(Type, Type)
Initializes a new instance of the GenericSerializerFactory class.
public GenericSerializerFactory(Type baseType, Type serializerGenericType)
Parameters
baseType
TypeThe type to match.
serializerGenericType
TypeThe generic type that will be used to instantiate serializers.
Methods
GetSerializer(SerializerSelector, ref ObjectId)
public override DataSerializer GetSerializer(SerializerSelector selector, ref ObjectId typeId)
Parameters
selector
SerializerSelectortypeId
ObjectId
Returns
GetSerializer(SerializerSelector, Type)
public override DataSerializer GetSerializer(SerializerSelector selector, Type type)
Parameters
selector
SerializerSelectortype
Type