Class Consumer
Definition
- Namespace:
- Tizen.Applications.DataControl
- Assembly:
- Tizen.Applications.DataControl.dll
Represents the Consumer class for the DataControl consumer application.
public abstract class Consumer : IDisposable
- Inheritance
-
objectConsumer
- Implements
-
System.IDisposable
Constructors
View SourceConsumer(string, string)
Initializes the Consumer class with the providerId and the ataId.
Declaration
public Consumer(string providerId, string dataId)
Parameters
Type | Name | Description |
---|---|---|
string | providerId | The DataControl Provider ID. |
string | dataId | The DataControl Data ID. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.InvalidOperationException | Thrown in case of any internal error. |
Methods
View SourceBulkInsert(BulkData)
Sends the bulk insert request to the provider application.
Declaration
public void BulkInsert(BulkData insertData)
Parameters
Type | Name | Description |
---|---|---|
BulkData | insertData | The bulk insert data. |
Remarks
The OnBulkInsertResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.UnauthorizedAccessException | Thrown in case oif a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.InvalidOperationException | Thrown in case of any internal error. |
DataChangeListen()
Listens the DataChange event.
Declaration
public void DataChangeListen()
Remarks
The OnDataChangeListenResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.InvalidOperationException | Thrown in case of any internal error. |
Delete(string)
Sends the delete request to the provider application.
Declaration
public void Delete(string where)
Parameters
Type | Name | Description |
---|---|---|
string | where | The Where statement for the delete query. |
Remarks
The OnDeleteResult will recieve the result of this API
Exceptions
Type | Condition |
---|---|
System.UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.InvalidOperationException | Thrown in case of any internal error. |
Dispose()
Releases all resources used by the Consumer class.
Declaration
public void Dispose()
Dispose(bool)
Releases the unmanaged resources used by the Consumer class specifying whether to perform a normal dispose operation.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true for a normal dispose operation; false to finalize the handle. |
~Consumer()
Destructor of the Consumer class.
Declaration
protected ~Consumer()
Insert(Bundle)
Sends the insert request to the provider application.
Declaration
public void Insert(Bundle insertData)
Parameters
Type | Name | Description |
---|---|---|
Bundle | insertData | The insert data. |
Remarks
The OnInsertResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.InvalidOperationException | Thrown in case of any internal error. |
MapAdd(string, string)
Sends the map add request to the provider application.
Declaration
public void MapAdd(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
string | key | The key of the value to add. |
string | value | The value to add. |
Remarks
The OnMapAddResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.UnauthorizedAccessException | Thrown in case of if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.InvalidOperationException | Thrown in case of any internal error. |
MapBulkAdd(BulkData)
Sends the map bulk add request to the provider application.
Declaration
public void MapBulkAdd(BulkData addData)
Parameters
Type | Name | Description |
---|---|---|
BulkData | addData | The map bulk add data. |
Remarks
The OnMapBulkAddResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.InvalidOperationException | Thrown in case of any internal error. |
MapGet(string, int, int)
Sends the map get request to the provider application.
Declaration
public void MapGet(string key, int pageNumber = 1, int countPerPage = 20)
Parameters
Type | Name | Description |
---|---|---|
string | key | The key of the value list to obtain. |
int | pageNumber | The page number of the value set. |
int | countPerPage | The desired maximum count of the data items per page. |
Remarks
The OnMapGetResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.InvalidOperationException | Thrown in case of any internal error. |
MapRemove(string, string)
Sends the map remove request to the provider application.
Declaration
public void MapRemove(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
string | key | The key of the value to remove. |
string | value | The value to remove. |
Remarks
The OnMapRemoveResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.InvalidOperationException | Thrown in case of any internal error. |
MapSet(string, string, string)
Sends the map set request to the provider application.
Declaration
public void MapSet(string key, string oldValue, string newValue)
Parameters
Type | Name | Description |
---|---|---|
string | key | The key of the value to replace. |
string | oldValue | The value to be replaced. |
string | newValue | The new value that replaces the existing value. |
Remarks
The OnMapSetResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when message has exceeded the maximum limit (1MB). |
System.InvalidOperationException | Thrown in case of any internal error. |
OnBulkInsertResult(BulkInsertResult)
Overrides this method if you want to handle the behavior when the BulkInsert response is received.
Declaration
protected virtual void OnBulkInsertResult(BulkInsertResult result)
Parameters
Type | Name | Description |
---|---|---|
BulkInsertResult | result |
OnDataChange(ChangeType, Bundle)
Overrides this method if you want to handle the behavior when the data change event is received.
Declaration
protected virtual void OnDataChange(ChangeType type, Bundle data)
Parameters
Type | Name | Description |
---|---|---|
ChangeType | type | |
Bundle | data |
OnDataChangeListenResult(DataChangeListenResult)
Overrides this method if you want to handle the behavior when the DataChangeListen result is received.
Declaration
protected virtual void OnDataChangeListenResult(DataChangeListenResult result)
Parameters
Type | Name | Description |
---|---|---|
DataChangeListenResult | result |
OnDeleteResult(DeleteResult)
Overrides this method if want to handle the behavior when the delete response is received.
Declaration
protected abstract void OnDeleteResult(DeleteResult result)
Parameters
Type | Name | Description |
---|---|---|
DeleteResult | result |
OnInsertResult(InsertResult)
Overrides this method if you want to handle the behavior when the insert response is received.
Declaration
protected abstract void OnInsertResult(InsertResult result)
Parameters
Type | Name | Description |
---|---|---|
InsertResult | result |
OnMapAddResult(MapAddResult)
Overrides this method if you want to handle the behavior when the map add response is received.
Declaration
protected virtual void OnMapAddResult(MapAddResult result)
Parameters
Type | Name | Description |
---|---|---|
MapAddResult | result |
OnMapBulkAddResult(MapBulkAddResult)
Overrides this method if you want to handle the behavior when the BulkAdd response is received.
Declaration
protected virtual void OnMapBulkAddResult(MapBulkAddResult result)
Parameters
Type | Name | Description |
---|---|---|
MapBulkAddResult | result |
OnMapGetResult(MapGetResult)
Overrides this method if you want to handle the behavior when the map get response is received.
Declaration
protected virtual void OnMapGetResult(MapGetResult result)
Parameters
Type | Name | Description |
---|---|---|
MapGetResult | result |
OnMapRemoveResult(MapRemoveResult)
Overrides this method if you want to handle the behavior when the map remove response is received.
Declaration
protected virtual void OnMapRemoveResult(MapRemoveResult result)
Parameters
Type | Name | Description |
---|---|---|
MapRemoveResult | result |
OnMapSetResult(MapSetResult)
Overrides this method if you want to handle the behavior when the map set response is received.
Declaration
protected virtual void OnMapSetResult(MapSetResult result)
Parameters
Type | Name | Description |
---|---|---|
MapSetResult | result |
OnSelectResult(SelectResult)
Overrides this method if you want to handle the behavior when the select response is received.
Declaration
protected abstract void OnSelectResult(SelectResult result)
Parameters
Type | Name | Description |
---|---|---|
SelectResult | result |
OnUpdateResult(UpdateResult)
Overrides this method if you want to handle the behavior when the update response is received.
Declaration
protected abstract void OnUpdateResult(UpdateResult result)
Parameters
Type | Name | Description |
---|---|---|
UpdateResult | result |
Select(string[], string, string, int, int)
Sends the select request to the provider application.
Declaration
public void Select(string[] columnList, string where, string order, int pageNumber = 1, int countPerPage = 20)
Parameters
Type | Name | Description |
---|---|---|
string[] | columnList | Select the target column list. |
string | where | The Where statement for the select query. |
string | order | The Order statement for the select query. |
int | pageNumber | Select the target page number. |
int | countPerPage | Select the row count per page. |
Remarks
The OnSelectResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.UnauthorizedAccessException | Thrown in case if a permission is denied.. |
System.InvalidOperationException | Thrown in case of any internal error. |
Update(Bundle, string)
Sends the update request to the provider application.
Declaration
public void Update(Bundle updateData, string where)
Parameters
Type | Name | Description |
---|---|---|
Bundle | updateData | The update data. |
string | where | The Where statement for the query. |
Remarks
The OnUpdateResult will recieve result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.InvalidOperationException | Thrown in case of any internal error. |