Show / Hide Table of Contents

    Class GraphRequestExtensions

    Extensions for IGraphRequest<T> class.

    Inheritance
    Object
    GraphRequestExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.Graph.Communications.Common.Transport
    Assembly: Microsoft.Graph.Communications.Common.dll
    Syntax
    public static class GraphRequestExtensions

    Methods

    ToHttpMethod(RequestType)

    Convert RequestType to the corresponding HTTP method.

    Declaration
    public static HttpMethod ToHttpMethod(this RequestType requestType)
    Parameters
    Type Name Description
    RequestType requestType

    Type of the request.

    Returns
    Type Description
    HttpMethod

    HttpMethod for the RequestType

    ToHttpRequestMessage<T>(IGraphRequest<T>, JsonSerializerSettings, IEnumerable<IGraphProperty>)

    Converts IGraphRequest into a HttpRequestMessage.

    Declaration
    public static HttpRequestMessage ToHttpRequestMessage<T>(this IGraphRequest<T> graphRequest, JsonSerializerSettings jsonSerializerSettings = null, IEnumerable<IGraphProperty> defaultProperties = null)
    Parameters
    Type Name Description
    IGraphRequest<T> graphRequest

    The graph request to be converted.

    Newtonsoft.Json.JsonSerializerSettings jsonSerializerSettings

    The json serializer settings.

    IEnumerable<IGraphProperty> defaultProperties

    The default properties.

    Returns
    Type Description
    HttpRequestMessage

    HttpRequestMessage corresponding to graphRequest.

    Type Parameters
    Name Description
    T

    Type of content available in the request.

    Back to top Copyright (c) Microsoft Corporation. All rights reserved.