sdk/dotnet/src/Microsoft.Datasync.Client/Offline/SyncContext.cs
/// <summary>
/// Initialize the synchronization context for this offline store.
/// </summary>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns>A task that completes when initialization is complete.</returns>
Initialize the synchronization context for this offline store.
Initialize the synchronization context for this offline store .
public async Task InitializeAsync(CancellationToken cancellationToken = default)
        {
            using (await initializationLock.AcquireAsync(cancellationToken).ConfigureAwait(false))
            {
                if (IsInitialized)
                {
                    return;
                }
                await OfflineStore.InitializeAsync(cancellationToken).ConfigureAwait(false);
                OperationsQueue = new OperationsQueue(OfflineStore);
                await OperationsQueue.InitializeAsync(cancellationToken).ConfigureAwait(false);
                DeltaTokenStore = new DeltaTokenStore(OfflineStore);
                IsInitialized = true;
            }
        }
public async Task InitializeAsync ( CancellationToken cancellationToken = default ) { using ( await initializationLock . AcquireAsync ( cancellationToken ) . ConfigureAwait ( false ) ) { if ( IsInitialized ) { return ; } await OfflineStore . InitializeAsync ( cancellationToken ) . ConfigureAwait ( false ) ; OperationsQueue = new OperationsQueue ( OfflineStore ) ; await OperationsQueue . InitializeAsync ( cancellationToken ) . ConfigureAwait ( false ) ; DeltaTokenStore = new DeltaTokenStore ( OfflineStore ) ; IsInitialized = true ; } }
Initialize the synchronization context for this offline store.
Initialize the synchronization context for this offline store .
// Initialize the store // Initialize the operations queue. // Initialize the delta token store.
A task that completes when initialization is complete.
A task that completes when initialization is complete .
cancellationToken
CancellationToken
A  to observe.
A to observe .