DataContractAttribute Class
Namespace: Stride.CoreAssembly: Stride.Core.dll
Indicates that a class can be serialized.
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
public class DataContractAttribute : Attribute
| Name | Description | |
|---|---|---|
| Constructors | ||
| DataContractAttribute() | Initializes a new instance of the DataContractAttribute class. |
|
| DataContractAttribute(String) | Initializes a new instance of the DataContractAttribute class. |
|
| Properties | ||
| Alias | Gets or sets the alias name when serializing to a textual format. |
|
| DefaultMemberMode | The default member mode. |
|
| Inherited | Gets or sets a value indicating whether this DataContractAttribute is implicitly inherited by all its descendant classes. |
|
Constructors
DataContractAttribute()
Initializes a new instance of the DataContractAttribute class.
public DataContractAttribute()
DataContractAttribute(String)
Initializes a new instance of the DataContractAttribute class.
public DataContractAttribute(string aliasName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | aliasName | The type alias name when serializing to a textual format. |
Properties
Alias
Gets or sets the alias name when serializing to a textual format.
public string Alias { get; }
Property Value
| Type | Description |
|---|---|
| System.String | The alias name. |
DefaultMemberMode
The default member mode.
public DataMemberMode DefaultMemberMode { get; set; }
Property Value
| Type | Description |
|---|---|
| DataMemberMode |
Inherited
Gets or sets a value indicating whether this DataContractAttribute is implicitly inherited by all its descendant classes.
public bool Inherited { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|