Show / Hide Table of Contents

    Interface ICommunicationsClient

    The CommunicationsClient interface. This is the entry point of the SDK and a reference to this instance must be held for the duration of the session.

    Inherited Members
    IDisposable.Dispose()
    Namespace: Microsoft.Graph.Communications.Client
    Assembly: Microsoft.Graph.Communications.Client.dll
    Syntax
    public interface ICommunicationsClient : IDisposable

    Properties

    AppId

    Gets the application identifier.

    Declaration
    string AppId { get; }
    Property Value
    Type Description
    String

    AppName

    Gets the name of the application.

    Declaration
    string AppName { get; }
    Property Value
    Type Description
    String

    AuthenticationProvider

    Gets the authentication provider used to authenticate both inbound and outbound requests.

    Declaration
    IRequestAuthenticationProvider AuthenticationProvider { get; }
    Property Value
    Type Description
    IRequestAuthenticationProvider

    BaseUrl

    Gets the Graph service's base URL.

    Declaration
    string BaseUrl { get; }
    Property Value
    Type Description
    String

    GraphClient

    Gets the graph client. This is the Client used to communicate with the service.

    Declaration
    IGraphClient GraphClient { get; }
    Property Value
    Type Description
    IGraphClient

    GraphLogger

    Gets the graph logger. This is the logger used within the SDK.

    Declaration
    IGraphLogger GraphLogger { get; }
    Property Value
    Type Description
    IGraphLogger

    Id

    Gets the client identifier.

    Declaration
    Guid Id { get; }
    Property Value
    Type Description
    Guid

    Serializer

    Gets the serializer

    Declaration
    ISerializer Serializer { get; }
    Property Value
    Type Description
    ISerializer

    Methods

    ProcessNotifications(Uri, CommsNotifications, String, Guid, Guid, IDictionary<String, Object>)

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

    Declaration
    void ProcessNotifications(Uri callbackUri, CommsNotifications notifications, string tenantId, Guid requestId, Guid scenarioId, IDictionary<string, object> additionalData = null)
    Parameters
    Type Name Description
    Uri callbackUri

    The callback URI.

    CommsNotifications notifications

    The notifications.

    String tenantId

    The tenant identifier.

    Guid requestId

    The request identifier.

    Guid scenarioId

    The scenario identifier.

    IDictionary<String, Object> additionalData

    Additional data associated with the notification.

    RehydrateAsync(String, String, Guid)

    Re-hydrates the resource at the specified path asynchronously.

    Declaration
    Task RehydrateAsync(string resourcePath, string tenantId, Guid scenarioId = default(Guid))
    Parameters
    Type Name Description
    String resourcePath

    The resource path.

    String tenantId

    The tenant identifier.

    Guid scenarioId

    The scenario identifier.

    Returns
    Type Description
    Task

    The Task.

    TerminateAsync(TimeSpan)

    Terminates this client asynchronously. This terminates all the calls, waits for dispose events, and disposes everything.

    Declaration
    Task<bool> TerminateAsync(TimeSpan timeout = default(TimeSpan))
    Parameters
    Type Name Description
    TimeSpan timeout

    The timeout.

    Returns
    Type Description
    Task<Boolean>

    True if all instances terminated successfully, false otherwise.

    Events

    OnNotificationException

    Occurs when exceptions are raised on notification callbacks.

    Declaration
    event Action<FailedNotificationEventArgs> OnNotificationException
    Event Type
    Type Description
    Action<FailedNotificationEventArgs>

    OnNotificationProcessed

    Occurs when the notification has been processed by all callbacks.

    Declaration
    event Action<NotificationEventArgs> OnNotificationProcessed
    Event Type
    Type Description
    Action<NotificationEventArgs>

    OnNotificationQueued

    Occurs when the notification has been queued into the backlog.

    Declaration
    event Action<NotificationEventArgs> OnNotificationQueued
    Event Type
    Type Description
    Action<NotificationEventArgs>

    Extension Methods

    CommunicationsClientExtensions.ProcessNotificationAsync(ICommunicationsClient, HttpRequestMessage)
    CommunicationsClientExtensions.LogAndCreateResponse(ICommunicationsClient, HttpRequestMessage, Guid, Guid, CommsNotifications, HttpStatusCode, Stopwatch, Exception)
    CommunicationsClientExtensions.CreateResponse(ICommunicationsClient, HttpStatusCode, Guid, Guid, Object)
    Back to top Copyright (c) Microsoft Corporation. All rights reserved.