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
public interface ILocalStorage IDisposable
The ILocalStorage type exposes the following members
Caches the Identity Id
Reparents all datasets from old identity id to a new one.
|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).
Create a dataset
Removes the Identity Id identified by the key from the cache
Deletes a dataset. It clears all records in this dataset and marked it as deleted for future sync.
Gets a list of dataset's metadata information.
Retrieves the metadata of a dataset.
Gets the cached identity id
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.
Retrieves a list of locally modified records since last successful sync operation.
|GetRecord(string, string, string)||
Gets a raw record from local store. If the dataset/key combo doesn't // exist, null will be returned.
Gets a list of all records.
|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.
Retrieves a key-value map from dataset, excluding marked as deleted values.
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).
|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.
|PutRecords(string, string, List<Record>)||
Puts a list of raw records into dataset.
|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.
Updates local dataset metadata
|UpdateLastSyncCount(string, string, Int64)||
Updates the last sync count after successful sync with the remote data store.
Wipes all locally cached data including dataset metadata and records. All opened dataset handler should not perform further operations to avoid inconsistent state.
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