Class ODataResolver
Contract resolver that allows us to create OData json payloads with type information.
Inheritance
ODataResolver
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
public class ODataResolver : CamelCasePropertyNamesContractResolver
Constructors
ODataResolver(Boolean, Assembly[])
Initializes a new instance of the ODataResolver class which can be used to
serialize/deserialize classes present in typeAssemblies
.
Declaration
public ODataResolver(bool addOdataType, params Assembly[] typeAssemblies)
Parameters
Type |
Name |
Description |
Boolean |
addOdataType |
If true, attach the @odata.type property, otherwise only attach this property if it's already present as a first class property.
|
Assembly[] |
typeAssemblies |
Assemblies in which the OData object exist.
|
Methods
CreateProperties(Type, MemberSerialization)
Declaration
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
Parameters
Type |
Name |
Description |
Type |
type |
|
Newtonsoft.Json.MemberSerialization |
memberSerialization |
|
Returns
Type |
Description |
IList<Newtonsoft.Json.Serialization.JsonProperty> |
|
ResolveContractConverter(Type)
Declaration
protected override JsonConverter ResolveContractConverter(Type objectType)
Parameters
Type |
Name |
Description |
Type |
objectType |
|
Returns
Type |
Description |
Newtonsoft.Json.JsonConverter |
|
Extension Methods