Show / Hide Table of Contents

    Class CommunicationsClientExtensions

    Extensions for Stateful Client.

    Inheritance
    Object
    CommunicationsClientExtensions
    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.Client
    Assembly: Microsoft.Graph.Communications.Client.dll
    Syntax
    public static class CommunicationsClientExtensions

    Methods

    CreateResponse(ICommunicationsClient, HttpStatusCode, Guid, Guid, Object)

    Creates the response.

    Declaration
    public static HttpResponseMessage CreateResponse(this ICommunicationsClient client, HttpStatusCode statusCode, Guid requestId, Guid scenarioId, object responseContent = null)
    Parameters
    Type Name Description
    ICommunicationsClient client

    The client.

    HttpStatusCode statusCode

    The status code.

    Guid requestId

    The request identifier.

    Guid scenarioId

    The scenario identifier.

    Object responseContent

    The response content.

    Returns
    Type Description
    HttpResponseMessage

    The HTTP response.

    LogAndCreateResponse(ICommunicationsClient, HttpRequestMessage, Guid, Guid, CommsNotifications, HttpStatusCode, Stopwatch, Exception)

    Logs the request, creates the response, and logs the response.

    Declaration
    public static HttpResponseMessage LogAndCreateResponse(this ICommunicationsClient client, HttpRequestMessage request, Guid requestId, Guid scenarioId, CommsNotifications notifications, HttpStatusCode statusCode, Stopwatch stopwatch, Exception exception = null)
    Parameters
    Type Name Description
    ICommunicationsClient client

    The client.

    HttpRequestMessage request

    The request.

    Guid requestId

    The request identifier.

    Guid scenarioId

    The scenario identifier.

    CommsNotifications notifications

    The notifications that were extracted.

    HttpStatusCode statusCode

    The status code.

    Stopwatch stopwatch

    The stopwatch tracking how long the request is taking.

    Exception exception

    Any exceptions raised.

    Returns
    Type Description
    HttpResponseMessage

    The response for the associated request.

    ProcessNotificationAsync(ICommunicationsClient, HttpRequestMessage)

    Processes the notifications and raises the required callbacks. This function should be called in order for the SDK to raise any required events and process state changes.

    Declaration
    public static Task<HttpResponseMessage> ProcessNotificationAsync(this ICommunicationsClient client, HttpRequestMessage request)
    Parameters
    Type Name Description
    ICommunicationsClient client

    The stateful client.

    HttpRequestMessage request

    The http request that is incoming from service.

    Returns
    Type Description
    Task<HttpResponseMessage>

    Http Response Message after processed by the SDK. This has to be returned to the server.

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