Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Called to verify that the specified location can accept the specified kind of snippet.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)
Syntax
'Declaration
Function IsValidKind ( _
pBuffer As IVsTextLines, _
ts As TextSpan(), _
bstrKind As String, _
<OutAttribute> ByRef pfIsValidKind As Integer _
) As Integer
int IsValidKind(
IVsTextLines pBuffer,
TextSpan[] ts,
string bstrKind,
out int pfIsValidKind
)
int IsValidKind(
[InAttribute] IVsTextLines^ pBuffer,
[InAttribute] array<TextSpan>^ ts,
[InAttribute] String^ bstrKind,
[OutAttribute] int% pfIsValidKind
)
abstract IsValidKind :
pBuffer:IVsTextLines *
ts:TextSpan[] *
bstrKind:string *
pfIsValidKind:int byref -> int
function IsValidKind(
pBuffer : IVsTextLines,
ts : TextSpan[],
bstrKind : String,
pfIsValidKind : int
) : int
Parameters
- pBuffer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLines
[in] An IVsTextLines object that represents the text buffer where the code snippet is to be inserted.
- ts
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[in] A TextSpan object that describes the location where the code snippet is to be inserted.
- bstrKind
Type: System.String
[in] A string that specifies the kind of code snippet that is to be inserted. See Remarks.
- pfIsValidKind
Type: System.Int32%
[out] Non-zero (TRUE) if the code snippet can be inserted into the specified location based on its kind; zero (FALSE) if the code snippet cannot be inserted.
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:
bool IVsExpansionClient::IsValidKind(
[in]IVsTextLines *pBuffer,
[in]TextSpan *ts,
[in]BSTR bstrKind
);
The bstrKind parameter is a string that specifies the kinds of snippets to display, such as MethodBody, Page, and File. The snippet kind can control in what context the snippet is inserted. For example, a snippet kind of MethodBody should be inserted only in a method. See Code Element (IntelliSense Code Snippets) for a list of all snippet kinds that are supported. It is possible for a code snippet to not have a kind associated with it in which case the bstrKind parameter is an empty string.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.