Show / Hide Table of Contents

    Class ODataResolver

    Contract resolver that allows us to create OData json payloads with type information.

    Inheritance
    Object
    ODataResolver
    GraphObfuscationContractResolver
    Namespace: Microsoft.Graph.Communications.Common.OData
    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

    AdditionalDataExtensions.SetInAdditionalData(Object, String, Object)
    Extensions.Pin(Object)
    Extensions.ChangeType(Object, Type)
    Extensions.ChangeType<T>(Object)
    Extensions.TryDispose(Object, IGraphLogger)
    ReflectionUtils.GetPropertyUsingReflection(Object, String)
    ReflectionUtils.SetPropertyUsingReflection(Object, String, Object)
    Validator.IsNull(Object, String, String)
    Validator.NotNull<T>(T, String, String)
    Validator.Equals<T>(T, T, String, String)
    Validator.Equals<T, TE>(T, T, String)
    Validator.NotEquals<T>(T, T, String, String)
    Back to top Copyright (c) Microsoft Corporation. All rights reserved.