Method SaveAsync
SaveAsync(IDictionary<string, SaveItem>)
Upload one or more key-value pairs to the Cloud Save service, with optional write lock validation. If a write lock is provided on an item and it does not match with the existing write lock, will throw a conflict exception. If the write lock for an item is set to null, the write lock validation for that item will be skipped and any existing value currently stored for that key will be overwritten. Keys can only contain alphanumeric characters, dashes, and underscores and be up to a length of 255 characters. Throws a CloudSaveException with a reason code and explanation of what happened.
Dictionary
as a parameter ensures the uniqueness of given keys.
There is no client validation in place, which means the API can be called regardless if data or keys are incorrect, invalid, and/or missing.
Declaration
Task<Dictionary<string, string>> SaveAsync(IDictionary<string, SaveItem> data)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<string, SaveItem> | data | The dictionary of keys and corresponding values to upload, together with optional write lock to check conflict |
Returns
Type | Description |
---|---|
Task<Dictionary<string, string>> | The dictionary of saved keys and the corresponding updated write lock |
Exceptions
Type | Condition |
---|---|
CloudSaveException | Thrown if request is unsuccessful. |
CloudSaveValidationException | Thrown if the service returned validation error. |
CloudSaveRateLimitedException | Thrown if the service returned rate limited error. |
CloudSaveConflictException | Thrown if the service returned write lock conflict error. |
SaveAsync(IDictionary<string, object>)
Upload one or more key-value pairs to the Cloud Save service without write lock validation, overwriting any values that are currently stored under the given keys. Key can only contain alphanumeric characters, dashes, and underscores and be up to a length of 255 characters. Throws a CloudSaveException with a reason code and explanation of what happened.
Dictionary
as a parameter ensures the uniqueness of given keys.
There is no client validation in place, which means the API can be called regardless if data is incorrect, invalid, and/or missing.
Declaration
Task<Dictionary<string, string>> SaveAsync(IDictionary<string, object> data)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<string, object> | data | The dictionary of keys and corresponding values to upload |
Returns
Type | Description |
---|---|
Task<Dictionary<string, string>> | The dictionary of saved keys and the corresponding updated write lock |
Exceptions
Type | Condition |
---|---|
CloudSaveException | Thrown if request is unsuccessful. |
CloudSaveValidationException | Thrown if the service returned validation error. |
CloudSaveRateLimitedException | Thrown if the service returned rate limited error. |