Share via


GameSaveContainer.SubmitUpdatesAsync Method

Definition

Submits a set of changes to the game save blobs in this container. Changes can be writes to blobs or the deletion of existing blobs. If the container doesn't exist, then a new one is created. All writes and updates are applied atomically. Attempting to write and delete the same blob results in an error. Only 16MB of data may be written per call.

public:
 virtual IAsyncOperation<GameSaveOperationResult ^> ^ SubmitUpdatesAsync(IMapView<Platform::String ^, IBuffer ^> ^ blobsToWrite, IIterable<Platform::String ^> ^ blobsToDelete, Platform::String ^ displayName) = SubmitUpdatesAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<GameSaveOperationResult> SubmitUpdatesAsync(IMapView<winrt::hstring, IBuffer const&> const& blobsToWrite, IIterable<winrt::hstring> const& blobsToDelete, winrt::hstring const& displayName);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<GameSaveOperationResult> SubmitUpdatesAsync(IReadOnlyDictionary<string,IBuffer> blobsToWrite, IEnumerable<string> blobsToDelete, string displayName);
function submitUpdatesAsync(blobsToWrite, blobsToDelete, displayName)
Public Function SubmitUpdatesAsync (blobsToWrite As IReadOnlyDictionary(Of String, IBuffer), blobsToDelete As IEnumerable(Of String), displayName As String) As IAsyncOperation(Of GameSaveOperationResult)

Parameters

blobsToWrite

IMapView<String,IBuffer>

IReadOnlyDictionary<String,IBuffer>

IMapView<Platform::String,IBuffer>

IMapView<winrt::hstring,IBuffer>

Type: IMapView<;String, IBuffer>; [JavaScript/C++] | System.Collections.Generic.IReadOnlyDictionary<;String, IBuffer>; [.NET]

Collection of blob names and the data to write for each blob. The max length for a blob name is 63 characters.

blobsToDelete

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

Type: IIterable<;String>; [JavaScript/C++] | System.Collections.Generic.IEnumerable<;String>; [.NET]

Collection containing the string names of blobs to delete. The max length for a blob name is 63 characters.

displayName
String

Platform::String

winrt::hstring

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The save game container's display name. Set this to the name that will be displayed for the game save. The max length for the display name is 127 characters.

Returns

Type: IAsyncOperation<;GameSaveOperationResult>;

IAsyncOperation<;GameSaveOperationResult>; that represents the state of the asynchronous operation.

Attributes

Remarks

After the asynchronous operation completes, check the Status property of the result to determine whether the operation succeeded with GameSaveErrorStatus.Ok.

Each TitleID/SCID is limited to a total of 256MB of storage per user.

When a title has reached its storage limit for a user, calls to SubmitUpdatesAsync will fail.

If a blob name or the display name exceeds the max length, the game save will fail to upload.

SubmitUpdatesAsync calls must not assume that a future SubmitUpdatesAsync call will be completed successfully in order to leave the container in a valid state. Each SubmitUpdatesAsync call must leave the contents of the specified container in a valid state for the app to read later. For example, if a player purchases food with gold in a game, the new values for the gold and food should be updated in the same call to SubmitUpdatesAsync. This ensures that both values will be updated at the same time or in the event of a power failure or some other event preventing the update, both food and gold will still have their original values.

Applies to

See also