Class DataSerializerGlobalAttribute
- Namespace
- Stride.Core.Serialization
- Assembly
- Stride.Core.dll
Declares a serializer like DataSerializerAttribute or DataContractAttribute, but externally.
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = true)]
public class DataSerializerGlobalAttribute : Attribute
- Inheritance
-
DataSerializerGlobalAttribute
- Inherited Members
Constructors
DataSerializerGlobalAttribute(Type, Type, DataSerializerGenericMode, bool, bool)
Initializes a new instance of the DataSerializerGlobalAttribute class, either by its serializer type (it will act like DataSerializerAttribute and guess data type from the generic type of DataSerializer<T>) or the data type (it will act just like if DataContractAttribute was set on the data type).
public DataSerializerGlobalAttribute(Type serializerType, Type dataType = null, DataSerializerGenericMode mode = DataSerializerGenericMode.None, bool inherited = false, bool complexSerializer = false)
Parameters
serializerTypeTypeThe serializer type. Can be null if
dataTypeif set.dataTypeTypeThe data type. Can be null if
serializerTypeis set.modeDataSerializerGenericModeDefines how generic type are added to
serializerType.inheritedboolSimilar to Inherited
complexSerializerboolTrue if it should use the auto-generated serializer.
Properties
Profile
public string Profile { get; set; }