Freigeben über


IVsExpansionSession.EndCurrentExpansion Method

Called to indicate the end of the current code snippet insertion process.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

'Declaration
Function EndCurrentExpansion ( _
    fLeaveCaret As Integer _
) As Integer
int EndCurrentExpansion(
    int fLeaveCaret
)
int EndCurrentExpansion(
    [InAttribute] int fLeaveCaret
)
abstract EndCurrentExpansion : 
        fLeaveCaret:int -> int
function EndCurrentExpansion(
    fLeaveCaret : int
) : int

Parameters

  • fLeaveCaret
    Type: System.Int32

    [in] Non-zero (TRUE) if to leave the edit caret where it is; otherwise, zero (FALSE) if the edit caret should be positioned according to the code snippet template.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr2.idl:

HRESULT IVsExpansionSession::EndCurrentExpansion(
   [in]bool fLeaveCaret
);

A code snippet template typically marks where the edit caret should be positioned after the snippet has been inserted and the special edit mode is completed. This method is called during the special edit mode when the user types the Enter or ESC keys. If Enter is typed, the fLeaveCaret parameter should be set to non-zero (TRUE) and if ESC is typed, the fLeaveCaret parameter should be set to zero (FALSE). This method positions the caret appropriately in the associated text view before returning.

.NET Framework Security

See Also

Reference

IVsExpansionSession Interface

Microsoft.VisualStudio.TextManager.Interop Namespace