Share via


ExpansionProvider.IsValidType Method

Definition

Determines whether or not a given type is valid for expansion purposes. This method should be overridden if you want to specify where in the source document the expansion can take place.

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

Parameters

buffer
IVsTextLines

The IVsTextLines buffer.

ts
TextSpan[]

An array of TextSpan objects.

rgTypes
String[]

An array of expansion types.

iCountTypes
Int32

The number of expansion types in the rgTypes array.

fIsValid
Int32

[out] Returns true if the type is valid, 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