Show / Hide Table of Contents

    Class CommunicationsClientBuilder

    The class the provides the builder for stateful client.

    Inheritance
    Object
    CommunicationsClientBuilder
    Implements
    ICommunicationsClientBuilder
    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 class CommunicationsClientBuilder : ICommunicationsClientBuilder

    Constructors

    CommunicationsClientBuilder(String, String, IGraphLogger, ObfuscationMember[])

    Initializes a new instance of the CommunicationsClientBuilder class.

    Declaration
    public CommunicationsClientBuilder(string appName, string appId, IGraphLogger logger = null, ObfuscationMember[] additionalObfuscationMembers = null)
    Parameters
    Type Name Description
    String appName

    Name of the application.

    String appId

    The application identifier.

    IGraphLogger logger

    The logger

    ObfuscationMember[] additionalObfuscationMembers

    Additional members to obfuscate.

    Properties

    Id

    Gets the client id.

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

    Methods

    Build()

    Build and return the stateful client object.

    Declaration
    public ICommunicationsClient Build()
    Returns
    Type Description
    ICommunicationsClient

    The ICommunicationsClient.

    Exceptions
    Type Condition
    ArgumentException

    Cannot build the client without setting the required parameters.

    SetAuthenticationProvider(IRequestAuthenticationProvider)

    Sets the custom authentication provider. The authentication provider would add authentication to outbound requests and validates any inbound requests. See IRequestAuthenticationProvider

    Declaration
    public ICommunicationsClientBuilder SetAuthenticationProvider(IRequestAuthenticationProvider authenticationProvider)
    Parameters
    Type Name Description
    IRequestAuthenticationProvider authenticationProvider
    Returns
    Type Description
    ICommunicationsClientBuilder

    The ICommunicationsClientBuilder.

    Exceptions
    Type Condition
    ArgumentNullException

    If the provider is null.

    SetCacheStrategy(ICache)

    Sets the cache strategy.

    Declaration
    public ICommunicationsClientBuilder SetCacheStrategy(ICache cacheStrategy)
    Parameters
    Type Name Description
    ICache cacheStrategy

    The cache strategy.

    Returns
    Type Description
    ICommunicationsClientBuilder

    This ICommunicationsClientBuilder object.

    Exceptions
    Type Condition
    ArgumentNullException

    If the cacheStrategy strategy is null.

    SetHttpClient(HttpClient, IEnumerable<KeyValuePair<String, String>>)

    Sets the http client. Use a custom HTTP Client instead of the one generated by the SDK.

    Declaration
    public ICommunicationsClientBuilder SetHttpClient(HttpClient httpClient, IEnumerable<KeyValuePair<string, string>> defaultHeaders = null)
    Parameters
    Type Name Description
    HttpClient httpClient

    The place call endpoint URL.

    IEnumerable<KeyValuePair<String, String>> defaultHeaders

    The default headers.

    Returns
    Type Description
    ICommunicationsClientBuilder

    The ICommunicationsClientBuilder.

    Exceptions
    Type Condition
    ArgumentNullException

    If the httpClient is null.

    SetNotificationUrl(Uri)

    Set the notification uri for your bot. This is the default notification url for the bot. This can be overriden on a per-resource basis depending on the API support.

    Declaration
    public ICommunicationsClientBuilder SetNotificationUrl(Uri notificationUrlInput)
    Parameters
    Type Name Description
    Uri notificationUrlInput
    Returns
    Type Description
    ICommunicationsClientBuilder

    The ICommunicationsClientBuilder.

    Exceptions
    Type Condition
    ArgumentNullException

    If the notificationUrl is null.

    ArgumentException

    URI must be https.

    SetServiceBaseUrl(Uri)

    Sets the service base URL. This set's the Endpoint URL for the service.

    Declaration
    public ICommunicationsClientBuilder SetServiceBaseUrl(Uri serviceBaseUrlInput)
    Parameters
    Type Name Description
    Uri serviceBaseUrlInput
    Returns
    Type Description
    ICommunicationsClientBuilder

    The ICommunicationsClientBuilder.

    Exceptions
    Type Condition
    ArgumentNullException

    If the serviceBaseUrl is null.

    ArgumentException

    URI must be https.

    Implements

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