Class Client
This class is the entry point for access to all of the Kinvey's library features. Use a Client.Builder to create one. Once the Client is created and a user is logged in, all of Kinvey's features can be accessed through their respective accessors. This implementation is thread safe.
Implements
Inherited Members
Namespace: Kinvey
Assembly: Kinvey.dll
Syntax
public class Client : AbstractClient, IDisposable
Constructors
| Improve this Doc View SourceClient(HttpClient, String, String, KinveyClientRequestInitializer, ICredentialStore)
Initializes a new instance of the Client class. Use a Client.Builder to create one.
Declaration
protected Client(HttpClient client, string rootUrl, string servicePath, KinveyClientRequestInitializer initializer, ICredentialStore store)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | client | The RestClient. |
System.String | rootUrl | The Root URL of the Kinvey instance this is associated with. |
System.String | servicePath | The service path, appended to the rootURL. |
KinveyClientRequestInitializer | initializer | The request initializer, maintaining headers and authentication. |
ICredentialStore | store | The credential store, where the current user's credentials will be stored. |
Properties
| Improve this Doc View SourceDefaultFilePath
Default file path.
Declaration
public static string DefaultFilePath { get; }
Property Value
Type | Description |
---|---|
System.String | The string value with default file path. |
DevicePlatform
Device platform.
Declaration
public Constants.DevicePlatform DevicePlatform { get; }
Property Value
Type | Description |
---|---|
Constants.DevicePlatform | The enumeration value with device platform. |
logger
Gets or sets the logger, this action is performed when writing to the logs.
Declaration
public Action<string> logger { get; set; }
Property Value
Type | Description |
---|---|
Action<System.String> | The logger. |
senderID
The Sender ID for GCM Push
Declaration
public string senderID { get; set; }
Property Value
Type | Description |
---|---|
System.String | The sender ID. |
SharedClient
The Shared Client instance. Whenever a new Client is built with Client.Builder(...).build(), it is set as the SharedClient. SharedClient must be built before it is accessed. Attempting to access a null SharedClient will result in a KinveyException thrown from the getter.
Declaration
public static Client SharedClient { get; set; }
Property Value
Type | Description |
---|---|
Client | The shared client. |
Methods
| Improve this Doc View SourceCustomEndpoint<I, O>()
Execute custom endpoints.
Declaration
public CustomEndpoint<I, O> CustomEndpoint<I, O>()
Returns
Type | Description |
---|---|
CustomEndpoint<I, O> | A configured instance of the Custom Endpoint object. |
Type Parameters
Name | Description |
---|---|
I | The Type of the input. |
O | The Type of the output. |
PingAsync()
Pings the backend service in order to ensure that a connection can be established to Kinvey from this client.
Declaration
public Task<PingResponse> PingAsync()
Returns
Type | Description |
---|---|
Task<PingResponse> | The PingResponse object, from which the version can be accessed. |