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
serializerType
TypeThe serializer type. Can be null if
dataType
if set.dataType
TypeThe data type. Can be null if
serializerType
is set.mode
DataSerializerGenericModeDefines how generic type are added to
serializerType
.inherited
boolSimilar to Inherited
complexSerializer
boolTrue if it should use the auto-generated serializer.
Properties
Profile
public string Profile { get; set; }