Sdílet prostřednictvím


IWorkspaceSettingsManager.GetPersistanceAsync(Boolean) Method

Definition

Access the settings writer. All changes made are in memory until the writer is released. note we will not lock any of the settings files until commit. Also we are not going to lock the writer within the process. the individual actions (like individual property writes) will be protected. We would ensure a machine-wise locking via named event, which will protect against multiple VS instance writing at the same time, yet it would be possible if via other editor (notepad) or when settings file is shared on network, to have a conflicting writes. in this rare case commit may still fail.

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::Workspace::Settings::IWorkspaceSettingsPersistance ^> ^ GetPersistanceAsync(bool autoCommit);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettingsPersistance> GetPersistanceAsync (bool autoCommit);
abstract member GetPersistanceAsync : bool -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettingsPersistance>
Public Function GetPersistanceAsync (autoCommit As Boolean) As Task(Of IWorkspaceSettingsPersistance)

Parameters

autoCommit
Boolean

if true the caller does not need to call commit at the end (note it is still possible to abort)

Returns

the persistence instance

Applies to