IAsyncPersistFile.SaveAsync(String, Boolean, IVsProgress) Method

Definition

Saves a copy of the object to the specified file, asynchronously.

public Microsoft.VisualStudio.Shell.Interop.IVsTask SaveAsync (string filename, bool remember, Microsoft.VisualStudio.Shell.Interop.IVsProgress? progress);
abstract member SaveAsync : string * bool * Microsoft.VisualStudio.Shell.Interop.IVsProgress -> Microsoft.VisualStudio.Shell.Interop.IVsTask
Public Function SaveAsync (filename As String, remember As Boolean, progress As IVsProgress) As IVsTask

Parameters

filename
String

The file name. This parameter can be null, in which case the object is saved to its current file. If the object is in the untitled state and filename is null, ArgumentException is thrown.

remember
Boolean

Indicates whether filename is to be used as the current working file. If true, filename becomes the current file and the object should clear its dirty flag after the save. If false, this save operation is a Save a Copy As operation. In this case, the current file is unchanged and the object does not clear its dirty flag. If filename is null, remember is ignored.

progress
IVsProgress

The interface through which progress is reported.

Returns

A task representing the asynchronous operation. The result of the returned task will be IVsAsyncSaveResult. The FileName property is unused.

Remarks

Implementers should be prepared for this method to be called on any thread.

Applies to