Compartir a través de


IVsRunningDocTableEvents7.OnAfterSaveAsync(UInt32, UInt32) Method

Definition

Called right after a save has occurred.

public Microsoft.VisualStudio.Shell.Interop.IVsTask? OnAfterSaveAsync (uint cookie, uint flags);
abstract member OnAfterSaveAsync : uint32 * uint32 -> Microsoft.VisualStudio.Shell.Interop.IVsTask
Public Function OnAfterSaveAsync (cookie As UInteger, flags As UInteger) As IVsTask

Parameters

cookie
UInt32

The document cookie.

flags
UInt32

Provides additional information about the save.

Returns

An optional task representing async work done by the event sink. If this is non-null, the RunningDocTable will await its completion before continuing the save.

Examples

async IVsTask OnAfterSaveAsync(uint cookie, uint flags)
{
    await jtf.Run(() => /** Do work *// );
}

Remarks

When the RunningDocTable notifies the event sink about save events, it will first check if the event implements this interface and call this method. If not, it will check if it implements IVsRunningDocTableEvents3 and call OnAfterSave(UInt32). Note that this means the RDT will not call both methods.

This method is safe to access from any thread.

Applies to