Udostępnij za pośrednictwem


IVsExpansionSession.GetEndSpan(TextSpan[]) Method

Definition

Returns the position at which the edit caret is to be placed when the code snippet is committed to the source buffer.

public:
 int GetEndSpan(cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pts);
public:
 int GetEndSpan(Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pts);
int GetEndSpan(std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & pts);
public int GetEndSpan (Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pts);
abstract member GetEndSpan : Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function GetEndSpan (pts As TextSpan()) As Integer

Parameters

pts
TextSpan[]

[out] The span that is filled in with the position and extent where the edit caret is to be positioned

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr2.idl:

HRESULT GetEndSpan(  
   [out] TextSpan *pts  
);  

Typically, a code snippet specifies a marker position in the template file where the edit caret should go when the code snippet is committed to the source buffer. The edit caret position can also be overridden by a call to the SetEndSpan method.

Applies to