Show / Hide Table of Contents

    Class GraphResponseExtensions

    Extensions for IGraphResponse<T> class.

    Inheritance
    Object
    GraphResponseExtensions
    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 GraphResponseExtensions

    Methods

    ToHttpResponseMessage<T>(IGraphResponse<T>, JsonSerializerSettings, IEnumerable<IGraphProperty>)

    Converts IGraphResponse into a HttpResponseMessage.

    Declaration
    public static HttpResponseMessage ToHttpResponseMessage<T>(this IGraphResponse<T> graphResponse, JsonSerializerSettings jsonSerializerSettings = null, IEnumerable<IGraphProperty> defaultProperties = null)
    Parameters
    Type Name Description
    IGraphResponse<T> graphResponse

    The graph response to be converted.

    Newtonsoft.Json.JsonSerializerSettings jsonSerializerSettings

    The json serializer settings.

    IEnumerable<IGraphProperty> defaultProperties

    The default properties.

    Returns
    Type Description
    HttpResponseMessage

    HttpResponseMessage corresponding to graphResponse.

    Type Parameters
    Name Description
    T

    Type of content available in the response.

    ToHttpStatus(ResponseStatus)

    Convert ResponseStatus to it's corresponding HttpStatusCode.

    Declaration
    public static HttpStatusCode ToHttpStatus(this ResponseStatus status)
    Parameters
    Type Name Description
    ResponseStatus status

    The status.

    Returns
    Type Description
    HttpStatusCode

    HttpStatusCode for the ResponseStatus

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