Share via


GameSaveProvider.GetSyncOnDemandForUserAsync(User, String) Method

Definition

Gets a partially-synced game save provider that syncs containers on demand.

public:
 static IAsyncOperation<GameSaveProviderGetResult ^> ^ GetSyncOnDemandForUserAsync(User ^ user, Platform::String ^ serviceConfigId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<GameSaveProviderGetResult> GetSyncOnDemandForUserAsync(User const& user, winrt::hstring const& serviceConfigId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<GameSaveProviderGetResult> GetSyncOnDemandForUserAsync(User user, string serviceConfigId);
function getSyncOnDemandForUserAsync(user, serviceConfigId)
Public Shared Function GetSyncOnDemandForUserAsync (user As User, serviceConfigId As String) As IAsyncOperation(Of GameSaveProviderGetResult)

Parameters

user
User

Type: User

User who the game saves are for.

serviceConfigId
String

Platform::String

winrt::hstring

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

The service configuration ID (SCID) used by your game.

Returns

Type: IAsyncOperation<;GameSaveProviderGetResult>;

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

Attributes

Remarks

A sync-on-demand provider is not guaranteed to have all containers synced locally. A sync is required when there is a conflict the user must resolve, or, more commonly, when the container has newer data in the cloud that must be downloaded. This condition is indicated by GameSaveContainerInfo.NeedsSync.

Calls to read, delete, or query blobs from a container will sync the container if it needs to sync.

Attempts to submit updates to a container will fail (with GameSaveErrorStatus.ContainerNotInSync) while the container still needs to sync.

GetSyncOnDemandForUserAsync obtains a GameSaveProvider instance for the specified user. After the asynchronous operation completes, check the Status property of the result to determine whether the operation succeeded with GameSaveErrorStatus.Ok.

Your title ID and service configuration ID (SCID) must be properly configured or this method will fail.

Applies to

See also