Class MClientFactory
Defines the M client factory.
Inheritance
Namespace: StylelabsStylelabs.MSdkWebClient
Assembly: Stylelabs.M.Sdk.WebClient.dll
Syntax
Methods
CreateMClient(string)
Creates a new instance of the IWebMClient implementation.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | connectionString |
Connection string to the instance. |
Returns
| Type | Description |
|---|---|
| IWebMClient |
A new IWebMClient instance. |
Examples
This example shows how to create a IWebMClient instance using the OAuthPasswordGrant.
This example shows how to create a IWebMClient instance using the OAuthRefreshTokenGrant.
CreateMClient(Uri, OAuthPasswordGrant)
Creates a new instance of the IWebMClient implementation.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | endpoint |
Base URI of the Sitecore Content Hub instance to connect to. |
| OAuthPasswordGrant | passwordGrant |
OAuth authentication details. |
Returns
| Type | Description |
|---|---|
| IWebMClient |
A new IWebMClient instance. |
CreateMClient(Uri, OAuthRefreshTokenGrant)
Creates a new instance of the IWebMClient implementation.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | endpoint |
Base uri of the Sitecore Content Hub instance to connect to. |
| OAuthRefreshTokenGrant | refreshTokenGrant |
OAuth authentication details. |
Returns
| Type | Description |
|---|---|
| IWebMClient |
A new IWebMClient instance. |
CreateMClient(Uri)
Creates a new instance of the IWebMClient implementation.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | endpoint |
Base uri of the Sitecore Content Hub instance to connect to. |
Returns
| Type | Description |
|---|---|
| IWebMClient |
A new IWebMClient instance. |