C# Класс Amazon.CognitoSync.SyncManager.Internal.CognitoSyncStorage

Remote data storage using Cognito Sync service on which we can invoke actions like creating a dataset or record.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BeginDeleteDataset ( string datasetName, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DeleteDataset operation.

BeginGetDatasetMetadata ( string datasetName, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the GetDatasetMetadata operation.

BeginListDatasetMetadata ( AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListDatasetMetadata operation.

BeginListUpdates ( string datasetName, long lastSyncCount, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListUpdates operation.

BeginPutRecords ( string datasetName, List records, string syncSessionToken, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the PutRecords operation.

DeleteDataset ( string datasetName ) : void

Deletes a dataset.

DeleteDatasetAsync ( string datasetName, CancellationToken cancellationToken ) : Task

Deletes a dataset.

EndDeleteDataset ( IAsyncResult asyncResult ) : void

Finishes the asynchronous execution of the DeleteDataset operation.

EndGetDatasetMetadata ( IAsyncResult asyncResult ) : DatasetMetadata

Finishes the asynchronous execution of the GetDatasetMetadata operation.

EndListDatasetMetadata ( IAsyncResult asyncResult ) : List

Finishes the asynchronous execution of the ListDatasetMetadata operation.

EndListUpdates ( IAsyncResult asyncResult ) : DatasetUpdates

Finishes the asynchronous execution of the ListUpdates operation.

EndPutRecords ( IAsyncResult asyncResult ) : List

Finishes the asynchronous execution of the PutRecords operation.

GetDatasetMetadata ( string datasetName ) : DatasetMetadata

Retrieves the metadata of a dataset.

GetDatasetMetadataAsync ( string datasetName, CancellationToken cancellationToken ) : Task

Retrieves the metadata of a dataset.

ListDatasetMetadata ( ) : List

Gets a list of DatasetMetadata

ListDatasetMetadataAsync ( CancellationToken cancellationToken ) : Task>

Gets a list of DatasetMetadata

ListUpdates ( string datasetName, long lastSyncCount ) : DatasetUpdates

Gets a list of records which have been updated since lastSyncCount (inclusive). If the value of a record equals null, then the record is deleted. If you pass 0 as lastSyncCount, the full list of records will be returned.

ListUpdatesAsync ( string datasetName, long lastSyncCount, CancellationToken cancellationToken ) : Task

Gets a list of records which have been updated since lastSyncCount (inclusive). If the value of a record equals null, then the record is deleted. If you pass 0 as lastSyncCount, the full list of records will be returned.

PutRecords ( string datasetName, List records, string syncSessionToken ) : List

Post updates to remote storage. Each record has a sync count. If the sync count doesn't match what's on the remote storage, i.e. the record is modified by a different device, this operation throws ConflictException. Otherwise it returns a list of records that are updated successfully.

PutRecordsAsync ( string datasetName, List records, string syncSessionToken, CancellationToken cancellationToken ) : Task>

Post updates to remote storage. Each record has a sync count. If the sync count doesn't match what's on the remote storage, i.e. the record is modified by a different device, this operation throws ConflictException. Otherwise it returns a list of records that are updated successfully.

Приватные методы

Метод Описание
ExtractRecords ( Amazon.CognitoSync.Model.UpdateRecordsResponse response ) : List
PopulateListDatasetMetadata ( string nextToken, List datasets ) : List
PopulateListDatasetMetadata ( string nextToken, List datasets, CancellationToken cancellationToken ) : Task>
PopulateListUpdates ( string datasetName, long lastSyncCount, List records, string nextToken ) : DatasetUpdates
PopulateListUpdatesAsync ( string datasetName, long lastSyncCount, List records, string nextToken, CancellationToken cancellationToken ) : Task
PrepareDeleteDatasetRequest ( string datasetName ) : DeleteDatasetRequest
PrepareDescribeDatasetRequest ( string datasetName ) : DescribeDatasetRequest
PrepareListDatasetsRequest ( ) : ListDatasetsRequest
PrepareListRecordsRequest ( string datasetName, long lastSyncCount ) : ListRecordsRequest
PrepareUpdateRecordsRequest ( string datasetName, List records, string syncSessionToken ) : UpdateRecordsRequest

Описание методов

BeginDeleteDataset() публичный Метод

Initiates the asynchronous execution of the DeleteDataset operation.
public BeginDeleteDataset ( string datasetName, AsyncCallback callback, object state ) : IAsyncResult
datasetName string Dataset name.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginGetDatasetMetadata() публичный Метод

Initiates the asynchronous execution of the GetDatasetMetadata operation.
public BeginGetDatasetMetadata ( string datasetName, AsyncCallback callback, object state ) : IAsyncResult
datasetName string Dataset name.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginListDatasetMetadata() публичный Метод

Initiates the asynchronous execution of the ListDatasetMetadata operation.
public BeginListDatasetMetadata ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginListUpdates() публичный Метод

Initiates the asynchronous execution of the ListUpdates operation.
public BeginListUpdates ( string datasetName, long lastSyncCount, AsyncCallback callback, object state ) : IAsyncResult
datasetName string Dataset name.
lastSyncCount long Last sync count.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginPutRecords() публичный Метод

Initiates the asynchronous execution of the PutRecords operation.
public BeginPutRecords ( string datasetName, List records, string syncSessionToken, AsyncCallback callback, object state ) : IAsyncResult
datasetName string Dataset name.
records List Records.
syncSessionToken string Sync session token.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

DeleteDataset() публичный Метод

Deletes a dataset.
public DeleteDataset ( string datasetName ) : void
datasetName string Dataset name.
Результат void

DeleteDatasetAsync() публичный Метод

Deletes a dataset.
public DeleteDatasetAsync ( string datasetName, CancellationToken cancellationToken ) : Task
datasetName string Dataset name.
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

EndDeleteDataset() публичный Метод

Finishes the asynchronous execution of the DeleteDataset operation.
public EndDeleteDataset ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDeleteDataset.
Результат void

EndGetDatasetMetadata() публичный Метод

Finishes the asynchronous execution of the GetDatasetMetadata operation.
public EndGetDatasetMetadata ( IAsyncResult asyncResult ) : DatasetMetadata
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginGetDatasetMetadata.
Результат DatasetMetadata

EndListDatasetMetadata() публичный Метод

Finishes the asynchronous execution of the ListDatasetMetadata operation.
public EndListDatasetMetadata ( IAsyncResult asyncResult ) : List
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListDatasetMetadata.
Результат List

EndListUpdates() публичный Метод

Finishes the asynchronous execution of the ListUpdates operation.
public EndListUpdates ( IAsyncResult asyncResult ) : DatasetUpdates
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListUpdates.
Результат DatasetUpdates

EndPutRecords() публичный Метод

Finishes the asynchronous execution of the PutRecords operation.
public EndPutRecords ( IAsyncResult asyncResult ) : List
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginPutRecords.
Результат List

GetDatasetMetadata() публичный Метод

Retrieves the metadata of a dataset.
public GetDatasetMetadata ( string datasetName ) : DatasetMetadata
datasetName string Dataset name.
Результат DatasetMetadata

GetDatasetMetadataAsync() публичный Метод

Retrieves the metadata of a dataset.
public GetDatasetMetadataAsync ( string datasetName, CancellationToken cancellationToken ) : Task
datasetName string Dataset name.
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

ListDatasetMetadata() публичный Метод

Gets a list of DatasetMetadata
public ListDatasetMetadata ( ) : List
Результат List

ListDatasetMetadataAsync() публичный Метод

Gets a list of DatasetMetadata
public ListDatasetMetadataAsync ( CancellationToken cancellationToken ) : Task>
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task>

ListUpdates() публичный Метод

Gets a list of records which have been updated since lastSyncCount (inclusive). If the value of a record equals null, then the record is deleted. If you pass 0 as lastSyncCount, the full list of records will be returned.
public ListUpdates ( string datasetName, long lastSyncCount ) : DatasetUpdates
datasetName string Dataset name.
lastSyncCount long Last sync count.
Результат DatasetUpdates

ListUpdatesAsync() публичный Метод

Gets a list of records which have been updated since lastSyncCount (inclusive). If the value of a record equals null, then the record is deleted. If you pass 0 as lastSyncCount, the full list of records will be returned.
public ListUpdatesAsync ( string datasetName, long lastSyncCount, CancellationToken cancellationToken ) : Task
datasetName string Dataset name.
lastSyncCount long Last sync count.
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

PutRecords() публичный Метод

Post updates to remote storage. Each record has a sync count. If the sync count doesn't match what's on the remote storage, i.e. the record is modified by a different device, this operation throws ConflictException. Otherwise it returns a list of records that are updated successfully.
public PutRecords ( string datasetName, List records, string syncSessionToken ) : List
datasetName string Dataset name.
records List Records.
syncSessionToken string Sync session token.
Результат List

PutRecordsAsync() публичный Метод

Post updates to remote storage. Each record has a sync count. If the sync count doesn't match what's on the remote storage, i.e. the record is modified by a different device, this operation throws ConflictException. Otherwise it returns a list of records that are updated successfully.
public PutRecordsAsync ( string datasetName, List records, string syncSessionToken, CancellationToken cancellationToken ) : Task>
datasetName string Dataset name.
records List Records.
syncSessionToken string Sync session token.
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task>