Class NetworkFactory
The class creates network requests.
Inheritance
Namespace: Kinvey
Assembly: Kinvey.dll
Syntax
public class NetworkFactory : object
Constructors
| Improve this Doc View SourceNetworkFactory(AbstractClient)
Initializes a new instance of the NetworkFactory class.
Declaration
public NetworkFactory(AbstractClient client)
Parameters
Type | Name | Description |
---|---|---|
AbstractClient | client | Client that the user is logged in. |
Properties
| Improve this Doc View Sourceclient
Client that the user is logged in
Declaration
public AbstractClient client { get; }
Property Value
Type | Description |
---|---|
AbstractClient | The instance of the class inherited from the AbstractClient class. |
Methods
| Improve this Doc View SourcebuildCreateRequest<T>(String, T)
Builds a network request for creating an entity.
Declaration
public NetworkRequest<T> buildCreateRequest<T>(string collectionName, T entity)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
T | entity | The entity. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
buildDeleteRequest<T>(String, String)
Builds a network request for deleting an entity.
Declaration
public NetworkRequest<T> buildDeleteRequest<T>(string collectionName, string entityID)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
System.String | entityID | Id of the entity. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
buildDeleteRequestWithQuery<T>(String, String)
Builds a network request for deleting entities.
Declaration
public NetworkRequest<T> buildDeleteRequestWithQuery<T>(string collectionName, string queryString)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
System.String | queryString | Query string. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
BuildDeltaSetRequest<T>(String, String, String)
Builds a network request for getting deltaset.
Declaration
public NetworkRequest<T> BuildDeltaSetRequest<T>(string collectionName, string lastRequestTime, string query = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
System.String | lastRequestTime | The last time of the request. |
System.String | query | String query. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
BuildGetAggregateRequest<T>(String, EnumReduceFunction, String, String, String)
Builds a network request for getting entities using aggregate functions.
Declaration
public NetworkRequest<T> BuildGetAggregateRequest<T>(string collectionName, EnumReduceFunction reduceFunction, string query, string groupField, string aggregateField)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
EnumReduceFunction | reduceFunction | Aggregate function type. |
System.String | query | Query string. |
System.String | groupField | The field for grouping. |
System.String | aggregateField | The field for aggregating. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
buildGetByIDRequest<T>(String, String)
Builds a network request for getting an entity.
Declaration
public NetworkRequest<T> buildGetByIDRequest<T>(string collectionName, string entityID)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
System.String | entityID | Id of the entity. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
buildGetCountRequest<T>(String, String)
Builds a network request for getting a count of entities.
Declaration
public NetworkRequest<T> buildGetCountRequest<T>(string collectionName, string queryString = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
System.String | queryString | Query string. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
buildGetRequest<T>(String, String)
Builds a network request for getting entities.
Declaration
public NetworkRequest<List<T>> buildGetRequest<T>(string collectionName, string queryString = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
System.String | queryString | Query string. |
Returns
Type | Description |
---|---|
NetworkRequest<List<T>> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
BuildMultiInsertRequest<T, U>(String, List<T>)
Builds a network request for multi creating of entities.
Declaration
public NetworkRequest<U> BuildMultiInsertRequest<T, U>(string collectionName, List<T> entities)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
List<T> | entities | The list of entities. |
Returns
Type | Description |
---|---|
NetworkRequest<U> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
U | The type of the network response. |
BuildSubscribeRequest<T>(String, String)
Builds a network request for subscribing on Kinvey Live services.
Declaration
public NetworkRequest<T> BuildSubscribeRequest<T>(string collectionName, string deviceID)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
System.String | deviceID | Id of the device. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
BuildUnsubscribeRequest<T>(String)
Builds a network request for unsubscribing from Kinvey Live services.
Declaration
public NetworkRequest<T> BuildUnsubscribeRequest<T>(string collectionName)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
buildUpdateRequest<T>(String, T, String)
Builds a network request for updating an entity.
Declaration
public NetworkRequest<T> buildUpdateRequest<T>(string collectionName, T entity, string entityID)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | The name of the collection. |
T | entity | The entity. |
System.String | entityID | Id of the entity. |
Returns
Type | Description |
---|---|
NetworkRequest<T> | All data of the built network request. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |