Delen via


ICachingExternalSettingsProvider.CommitPendingChangesAsync Method

Definition

Persist any in-memory changes to the backing store. Normally this will be called after each change, but in some "batch" scenarios, this could be preceded by multiple calls to SetValueAsync<T>(String, T, CancellationToken).

There is no need to raise SettingValuesChanged for changes to the backing store made via this method, but it's OK if you do.

This will always be preceded closely by a call to RefreshCacheAsync(CancellationToken) so it's reasonable for the setting owner to assume that the backing store probably hasn't been updated since the last refresh. Therefore, conflict detection and resolution isn't necessary unless 100% protection against data loss is required; you can just write the cache directly to the backing store.

public System.Threading.Tasks.Task<Microsoft.VisualStudio.Utilities.UnifiedSettings.ExternalSettingOperationResult> CommitPendingChangesAsync (System.Threading.CancellationToken cancellationToken);
abstract member CommitPendingChangesAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Utilities.UnifiedSettings.ExternalSettingOperationResult>
Public Function CommitPendingChangesAsync (cancellationToken As CancellationToken) As Task(Of ExternalSettingOperationResult)

Parameters

cancellationToken
CancellationToken

Returns

Applies to