Class ODataSerializeAsTypeAttribute
Specify how a given object should be written/read on the wire.
Implements
Inherited Members
Namespace: Microsoft.Graph.Communications.Common.OData
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class ODataSerializeAsTypeAttribute : Attribute, _Attribute
Constructors
ODataSerializeAsTypeAttribute(String, Boolean)
Initializes a new instance of the ODataSerializeAsTypeAttribute class.
Declaration
public ODataSerializeAsTypeAttribute(string name, bool renameWhenSerialized = true)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the class. |
Boolean | renameWhenSerialized | If set to |
Properties
Name
Gets the name of the class.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
RenameWhenSerialized
Gets a value indicating whether to rename when serializing this object. When true, the object will be serialized to Name, otherwise the object will be serialized as the actual object name.
Declaration
public bool RenameWhenSerialized { get; }
Property Value
Type | Description |
---|---|
Boolean |