Class StatefulClientBuilder
The class the provides the builder for stateful client.
Inheritance
System.Object
StatefulClientBuilder
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Microsoft.Graph.StatefulClient
Assembly: Microsoft.Graph.StatefulClient.dll
Syntax
public class StatefulClientBuilder : IStatefulClientBuilder
Constructors
View SourceStatefulClientBuilder(String, String)
Initializes a new instance of the StatefulClientBuilder class.
Declaration
public StatefulClientBuilder(string appName, string appId)
Parameters
Type | Name | Description |
---|---|---|
System.String | appName | Name of the application. |
System.String | appId | The application identifier. |
Properties
View SourceId
Gets the platform id.
Declaration
public Guid Id { get; }
Property Value
Type | Description |
---|---|
System.Guid |
Methods
View SourceBuild(GraphLogger)
Build and return the stateful client object.
Declaration
public IStatefulClient Build(GraphLogger logger = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Graph.Core.Telemetry.GraphLogger | logger | The graph logger |
Returns
Type | Description |
---|---|
IStatefulClient | The IStatefulClient. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Cannot build the client without setting the required parameters. |
SetAuthenticationProvider(IRequestAuthenticationProvider)
Sets the custom authentication provider.
Declaration
public IStatefulClientBuilder SetAuthenticationProvider(IRequestAuthenticationProvider authenticationProvider)
Parameters
Type | Name | Description |
---|---|---|
IRequestAuthenticationProvider | authenticationProvider |
Returns
Type | Description |
---|---|
IStatefulClientBuilder |
SetHttpClient(HttpClient, IEnumerable<KeyValuePair<String, String>>)
Sets the http client.
Declaration
public IStatefulClientBuilder SetHttpClient(HttpClient httpClient, IEnumerable<KeyValuePair<string, string>> defaultHeaders = null)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpClient | httpClient | The place call endpoint URL. |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>> | defaultHeaders | The default headers. |
Returns
Type | Description |
---|---|
IStatefulClientBuilder |
SetNotificationUrl(Uri)
Set the notification uri for your bot.
Declaration
public IStatefulClientBuilder SetNotificationUrl(Uri notificationUrlInput)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | notificationUrlInput |
Returns
Type | Description |
---|---|
IStatefulClientBuilder |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException | Uri must be https. |
SetServiceBaseUrl(Uri)
Sets the service base URL.
Declaration
public IStatefulClientBuilder SetServiceBaseUrl(Uri serviceBaseUrlInput)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | serviceBaseUrlInput |
Returns
Type | Description |
---|---|
IStatefulClientBuilder |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException | uri must be https |