Class Client.Builder
Builder for creating a new instance of a client. Use this class to easily create a new client, as it uses the builder pattern so methods can be chained together.
Once the builder is configured, call .build()
to return an instance of a client.
Inherited Members
Namespace: Kinvey
Assembly: Kinvey.dll
Syntax
public class Builder : AbstractClient.Builder
Constructors
| Improve this Doc View SourceBuilder(String, String)
Initializes a new instance of the Client.Builder class.
Declaration
public Builder(string appKey, string appSecret)
Parameters
Type | Name | Description |
---|---|---|
System.String | appKey | App key from Kinvey. |
System.String | appSecret | App secret from Kinvey. |
Builder(String, String, String, Constants.DevicePlatform)
Initializes a new instance of the Client.Builder class.
Declaration
protected Builder(string appKey, string appSecret, string filePath, Constants.DevicePlatform devicePlatform = Constants.DevicePlatform.PCL)
Parameters
Type | Name | Description |
---|---|---|
System.String | appKey | App key from Kinvey. |
System.String | appSecret | App secret from Kinvey. |
System.String | filePath | File path. |
Constants.DevicePlatform | devicePlatform | [optional] Device platform. |
Properties
| Improve this Doc View SourceFilePath
A reference to the local file system going to be platform dependent
Declaration
public string FilePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The file path. |
Methods
| Improve this Doc View SourceBuild()
This method creates and initializes a client for use with Kinvey.
Declaration
public virtual Client Build()
Returns
Type | Description |
---|---|
Client | Kinvey client. |
SetApiVersion(String)
Sets Kinvey api version.
Declaration
public Client.Builder SetApiVersion(string version)
Parameters
Type | Name | Description |
---|---|---|
System.String | version | Kinvey api version. |
Returns
Type | Description |
---|---|
Client.Builder | The current builder. |
setBaseURL(String)
Set the base url to use for this client, if it is a custom one.
Declaration
public Client.Builder setBaseURL(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | URL. |
Returns
Type | Description |
---|---|
Client.Builder | This builder. |
setCredentialStore(ICredentialStore)
Set the credential store to use for the client.
Declaration
public Client.Builder setCredentialStore(ICredentialStore store)
Parameters
Type | Name | Description |
---|---|---|
ICredentialStore | store | Store. |
Returns
Type | Description |
---|---|
Client.Builder | This builder. |
setFilePath(String)
Set the directory to use for offline.
Declaration
public Client.Builder setFilePath(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | Path. |
Returns
Type | Description |
---|---|
Client.Builder | The file path. |
SetFilePath(String)
Set the directory to use for offline.
Declaration
public Client.Builder SetFilePath(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | Path. |
Returns
Type | Description |
---|---|
Client.Builder | The current builder. |
SetInstanceID(String)
Sets the instance identifier of Kinvey application service.
Declaration
public Client.Builder SetInstanceID(string instanceID)
Parameters
Type | Name | Description |
---|---|---|
System.String | instanceID | Instance identifier. |
Returns
Type | Description |
---|---|
Client.Builder | The current builder. |
setLogger(Action<String>)
Sets the logger action.
Declaration
public Client.Builder setLogger(Action<string> log)
Parameters
Type | Name | Description |
---|---|---|
Action<System.String> | log | Log. |
Returns
Type | Description |
---|---|
Client.Builder | The current builder. |
setMICHostName(String)
Sets MIC host name url.
Declaration
public Client.Builder setMICHostName(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | URL. |
Returns
Type | Description |
---|---|
Client.Builder | This builder. |
SetProjectId(String)
Sets the project identifier of the Client.
Declaration
public Client.Builder SetProjectId(string senderid)
Parameters
Type | Name | Description |
---|---|---|
System.String | senderid | Sender ID. |
Returns
Type | Description |
---|---|
Client.Builder | The Client.Builder object. |
SetRestClient(HttpClient)
Sets Http client.
Declaration
public Client.Builder SetRestClient(HttpClient client)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | client | Http client. |
Returns
Type | Description |
---|---|
Client.Builder | The current builder. |
setServicePath(String)
Set any appended service url to the base url, if necessary.
Declaration
public Client.Builder setServicePath(string servicePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | servicePath | Service path. |
Returns
Type | Description |
---|---|
Client.Builder | The current builder. |
SetSSOGroupKey(String)
Sets SSO group key.
Declaration
public Client.Builder SetSSOGroupKey(string ssoGroupKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | ssoGroupKey | SSO group key. |
Returns
Type | Description |
---|---|
Client.Builder | The current builder. |