次の方法で共有


ExpansionProvider.IsValidKind(IVsTextLines, TextSpan[], String, Int32) Method

Definition

Determines whether this is valid text for expansion. This method should be overridden if you want to specify where in the source document the expansion can take place.

public:
 virtual int IsValidKind(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ buffer, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ts, System::String ^ bstrKind, [Runtime::InteropServices::Out] int % fIsValid);
 virtual int IsValidKind(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines const & buffer, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ts, std::wstring const & bstrKind, [Runtime::InteropServices::Out] int & fIsValid);
public virtual int IsValidKind (Microsoft.VisualStudio.TextManager.Interop.IVsTextLines buffer, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ts, string bstrKind, out int fIsValid);
abstract member IsValidKind : Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * string * int -> int
override this.IsValidKind : Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * string * int -> int
Public Overridable Function IsValidKind (buffer As IVsTextLines, ts As TextSpan(), bstrKind As String, ByRef fIsValid As Integer) As Integer

Parameters

buffer
IVsTextLines

The IVsTextLines buffer.

ts
TextSpan[]

An array of TextSpan objects.

bstrKind
String

The kind of expansion to perform.

fIsValid
Int32

[out] Returns true if it is a valid expansion kind, otherwise false.

Returns

When overridden in derived classes, S_OK if the method succeeds, otherwise an error code.

Implements

Remarks

This method by default checks only that buffer is the same as the IVsTextLines of Source; it will throw an ArgumentException if not. Implementers must override this method if they wish to specify where in a document a given expansion can be performed.

Applies to