Class Consumer

Definition

Namespace:
Tizen.Applications.DataControl
Assembly:
Tizen.Applications.DataControl.dll

Represents the Consumer class for the DataControl consumer application.

C#
Copy
public abstract class Consumer : IDisposable
Inheritance
object
Consumer
Implements
System.IDisposable

Constructors

View Source

Consumer(string, string)

Initializes the Consumer class with the providerId and the ataId.

Declaration
C#
Copy
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 Source

BulkInsert(BulkData)

Sends the bulk insert request to the provider application.

Declaration
C#
Copy
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.

View Source

DataChangeListen()

Listens the DataChange event.

Declaration
C#
Copy
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.

View Source

Delete(string)

Sends the delete request to the provider application.

Declaration
C#
Copy
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.

View Source

Dispose()

Releases all resources used by the Consumer class.

Declaration
C#
Copy
public void Dispose()
View Source

Dispose(bool)

Releases the unmanaged resources used by the Consumer class specifying whether to perform a normal dispose operation.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing

true for a normal dispose operation; false to finalize the handle.

View Source

~Consumer()

Destructor of the Consumer class.

Declaration
C#
Copy
protected ~Consumer()
View Source

Insert(Bundle)

Sends the insert request to the provider application.

Declaration
C#
Copy
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.

View Source

MapAdd(string, string)

Sends the map add request to the provider application.

Declaration
C#
Copy
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.

View Source

MapBulkAdd(BulkData)

Sends the map bulk add request to the provider application.

Declaration
C#
Copy
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.

View Source

MapGet(string, int, int)

Sends the map get request to the provider application.

Declaration
C#
Copy
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.

View Source

MapRemove(string, string)

Sends the map remove request to the provider application.

Declaration
C#
Copy
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.

View Source

MapSet(string, string, string)

Sends the map set request to the provider application.

Declaration
C#
Copy
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.

View Source

OnBulkInsertResult(BulkInsertResult)

Overrides this method if you want to handle the behavior when the BulkInsert response is received.

Declaration
C#
Copy
protected virtual void OnBulkInsertResult(BulkInsertResult result)
Parameters
Type Name Description
BulkInsertResult result
View Source

OnDataChange(ChangeType, Bundle)

Overrides this method if you want to handle the behavior when the data change event is received.

Declaration
C#
Copy
protected virtual void OnDataChange(ChangeType type, Bundle data)
Parameters
Type Name Description
ChangeType type
Bundle data
View Source

OnDataChangeListenResult(DataChangeListenResult)

Overrides this method if you want to handle the behavior when the DataChangeListen result is received.

Declaration
C#
Copy
protected virtual void OnDataChangeListenResult(DataChangeListenResult result)
Parameters
Type Name Description
DataChangeListenResult result
View Source

OnDeleteResult(DeleteResult)

Overrides this method if want to handle the behavior when the delete response is received.

Declaration
C#
Copy
protected abstract void OnDeleteResult(DeleteResult result)
Parameters
Type Name Description
DeleteResult result
View Source

OnInsertResult(InsertResult)

Overrides this method if you want to handle the behavior when the insert response is received.

Declaration
C#
Copy
protected abstract void OnInsertResult(InsertResult result)
Parameters
Type Name Description
InsertResult result
View Source

OnMapAddResult(MapAddResult)

Overrides this method if you want to handle the behavior when the map add response is received.

Declaration
C#
Copy
protected virtual void OnMapAddResult(MapAddResult result)
Parameters
Type Name Description
MapAddResult result
View Source

OnMapBulkAddResult(MapBulkAddResult)

Overrides this method if you want to handle the behavior when the BulkAdd response is received.

Declaration
C#
Copy
protected virtual void OnMapBulkAddResult(MapBulkAddResult result)
Parameters
Type Name Description
MapBulkAddResult result
View Source

OnMapGetResult(MapGetResult)

Overrides this method if you want to handle the behavior when the map get response is received.

Declaration
C#
Copy
protected virtual void OnMapGetResult(MapGetResult result)
Parameters
Type Name Description
MapGetResult result
View Source

OnMapRemoveResult(MapRemoveResult)

Overrides this method if you want to handle the behavior when the map remove response is received.

Declaration
C#
Copy
protected virtual void OnMapRemoveResult(MapRemoveResult result)
Parameters
Type Name Description
MapRemoveResult result
View Source

OnMapSetResult(MapSetResult)

Overrides this method if you want to handle the behavior when the map set response is received.

Declaration
C#
Copy
protected virtual void OnMapSetResult(MapSetResult result)
Parameters
Type Name Description
MapSetResult result
View Source

OnSelectResult(SelectResult)

Overrides this method if you want to handle the behavior when the select response is received.

Declaration
C#
Copy
protected abstract void OnSelectResult(SelectResult result)
Parameters
Type Name Description
SelectResult result
View Source

OnUpdateResult(UpdateResult)

Overrides this method if you want to handle the behavior when the update response is received.

Declaration
C#
Copy
protected abstract void OnUpdateResult(UpdateResult result)
Parameters
Type Name Description
UpdateResult result
View Source

Select(string[], string, string, int, int)

Sends the select request to the provider application.

Declaration
C#
Copy
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.

View Source

Update(Bundle, string)

Sends the update request to the provider application.

Declaration
C#
Copy
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.

Implements

System.IDisposable