ExpansionProvider::IsValidType Method (IVsTextLines^, array<TextSpan>^, array<String^>^, Int32, Int32)
Visual Studio 2015
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.
Assembly: Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)
public: virtual int IsValidType( IVsTextLines^ buffer, array<TextSpan>^ ts, array<String^>^ rgTypes, int iCountTypes, [OutAttribute] int% fIsValid )
Parameters
- buffer
-
Type:
Microsoft.VisualStudio.TextManager.Interop::IVsTextLines^
The IVsTextLines buffer.
- ts
-
Type:
array<Microsoft.VisualStudio.TextManager.Interop::TextSpan>^
An array of TextSpan objects.
- rgTypes
-
Type:
array<System::String^>^
An array of expansion types.
- iCountTypes
-
Type:
System::Int32
The number of expansion types in the rgTypes array.
- fIsValid
-
Type:
System::Int32
[out] Returns true if the type is valid, otherwise false.
Return Value
Type: System::Int32When overridden in derived classes, S_OK if the method succeeds, otherwise an error code.
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.
Show: