Submits a set of changes to blobs in this container with the provided friendly display name.
public:
IAsyncAction^ SubmitUpdatesAsync(
IMapView<String^ , IBuffer^ >^ blobsToWrite,
IIterable<String^ >^ blobsToDelete,
String^ displayName
)
blobsToWrite
Type: IMapView<String^ , IBuffer^ >
A collection of the blobs to write. The max length for a blob name is 63 characters.
blobsToDelete
Type: IIterable<String^ >
A collection of the blobs to delete. The max length for a blob name is 63 characters.
displayName
Type: String
A friendly display name for the container. The max length for a container display name is 127 characters.
Type: IAsyncAction
Error codes are reported through the ErrorCode property of the IAsyncAction object. The following is a list of possible error codes:
| Error Code | Description |
|---|---|
| E_INVALIDARG | The same name appears in blobsToWrite and blobsToDelete. |
| ConnectedStorageErrorStatus.NoAccess | The operation failed because the title does not have write access to the container storage space. |
| ConnectedStorageErrorStatus.UpdateTooBig | The operation failed because the update contained more than 16MB of data. |
| ConnectedStorageErrorStatus.QuotaExceeded | The operation failed because the update would have caused the connected storage space to exceed its quota. Use IConnectedStorageSpace::GetRemainingBytesInQuotaAsync to query the space for quota. |
| ConnectedStorageErrorStatus.OutOfLocalStorage | There isn’t any local storage available. |
Use of this overload is strongly encouraged instead of ConnectedStorageContainer.SubmitUpdatesAsync (Generic IMapView, Generic IIterable). You can use the provided friendly name in your app to provide friendly displays to the user without having to read from the container by calling ContainerInfoQueryResult::GetContainerInfo2Async.
Changes can be writes to blobs or deleting blobs. If the container does not exist a new container is created. All writes and updates are applied atomically. It is an error to attempt to write and delete the same blob.
The total size of blobs for a single SubmitUpdatesAsync call is limited to 16MB.
Each TitleID/SCID is limited to:
When a title has reached its storage limit for a user or the per-machine storage, calls to SubmitUpdatesAsync will fail.
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.
Important A signed-in user is required to perform operations on per-user Connected Storage containers.
You should not cache a per-user ConnectedStorageContainer after a user has signed-out - operations performed on it will fail with error code E_FAIL (0x80004005).
If you need to save data for a user as the user is signing-out, you will need to complete your SubmitUpdatesAsync operation within the User::SignOutStarted event callback, or take a deferral from within the User::SignOutStarted callback - see the documentation for SignOutDeferral for more information.
Namespace: Windows.Xbox.Storage
Metadata: windows.winmd
ConnectedStorageContainer Class