AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

A local storage like a sqlite database on which we can invoke actions like creating a dataset, or record

Inheritance Hierarchy


Namespace: Amazon.CognitoSync.SyncManager
Assembly: AWSSDK.CognitoSync.dll
Version: 3.x.y.z


public interface ILocalStorage

The ILocalStorage type exposes the following members



Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

Public Method CacheIdentity(string, string)

Caches the Identity Id

Public Method ChangeIdentityId(string, string)

Reparents all datasets from old identity id to a new one.

Public Method ConditionallyPutRecords(string, string, List<Record>, List<Record>)

Puts a list of raw records into that dataset if the local version hasn't changed (to be used in synchronizations).

Public Method CreateDataset(string, string)

Create a dataset

Public Method DeleteCachedIdentity(string)

Removes the Identity Id identified by the key from the cache

Public Method DeleteDataset(string, string)

Deletes a dataset. It clears all records in this dataset and marked it as deleted for future sync.

Public Method GetDatasetMetadata(string)

Gets a list of dataset's metadata information.

Public Method GetDatasetMetadata(string, string)

Retrieves the metadata of a dataset.

Public Method GetIdentity(string)

Gets the cached identity id

Public Method GetLastSyncCount(string, string)

Retrieves the last sync count. This sync count is a counter that represents when the last sync happened. The counter should be updated on a successful sync.

Public Method GetModifiedRecords(string, string)

Retrieves a list of locally modified records since last successful sync operation.

Public Method GetRecord(string, string, string)

Gets a raw record from local store. If the dataset/key combo doesn't // exist, null will be returned.

Public Method GetRecords(string, string)

Gets a list of all records.

Public Method GetValue(string, string, string)

Retrieves the string value of a key in dataset. The value can be null when the record doesn't exist or is marked as deleted.

Public Method GetValueMap(string, string)

Retrieves a key-value map from dataset, excluding marked as deleted values.

Public Method PurgeDataset(string, string)

This is different from Amazon.CognitoSync.SyncManager.ILocalStorage.DeleteDataset(System.String,System.String). Not only does it clears all records in the dataset, it also remove it from metadata table. It won't be visible in Amazon.CognitoSync.SyncManager.ILocalStorage.GetDatasetMetadata(System.String,System.String).

Public Method PutAllValues(string, string, IDictionary<String, String>)

Puts a key-value map into a dataset. This is optimized for batch operation. It's the preferred way to put a list of records into dataset.

Public Method PutRecords(string, string, List<Record>)

Puts a list of raw records into dataset.

Public Method PutValue(string, string, string, string)

Puts the value of a key in dataset. If a new value is assigned to the key, the record is marked as dirty. If the value is null, then the record is marked as deleted. The changed record will be synced with remote storage.

Public Method UpdateDatasetMetadata(string, List<DatasetMetadata>)

Updates local dataset metadata

Public Method UpdateLastSyncCount(string, string, Int64)

Updates the last sync count after successful sync with the remote data store.

Public Method WipeData()

Wipes all locally cached data including dataset metadata and records. All opened dataset handler should not perform further operations to avoid inconsistent state.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone