Table of Contents

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 Type

The serializer type. Can be null if dataType if set.

dataType Type

The data type. Can be null if serializerType is set.

mode DataSerializerGenericMode

Defines how generic type are added to serializerType.

inherited bool

Similar to Inherited

complexSerializer bool

True if it should use the auto-generated serializer.

Properties

Profile

public string Profile { get; set; }

Property Value

string