IVsUserContext.GetAttrUsage Method
Returns the type of context (attribute, lookup keyword, or F1 keyword) that is present at a specified index position in the context or subcontext bag.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function GetAttrUsage ( _
index As Integer, _
fIncludeChildren As Integer, _
<OutAttribute> pUsage As VSUSERCONTEXTATTRIBUTEUSAGE() _
) As Integer
int GetAttrUsage(
int index,
int fIncludeChildren,
VSUSERCONTEXTATTRIBUTEUSAGE[] pUsage
)
int GetAttrUsage(
[InAttribute] int index,
[InAttribute] int fIncludeChildren,
[OutAttribute] array<VSUSERCONTEXTATTRIBUTEUSAGE>^ pUsage
)
abstract GetAttrUsage :
index:int *
fIncludeChildren:int *
pUsage:VSUSERCONTEXTATTRIBUTEUSAGE[] byref -> int
function GetAttrUsage(
index : int,
fIncludeChildren : int,
pUsage : VSUSERCONTEXTATTRIBUTEUSAGE[]
) : int
Parameters
index
Type: Int32[in] Index position of the context item in the context bag. The index is zero based.
fIncludeChildren
Type: Int32[in] If true, then the subcontext associated with the context bag is included. If false, then the subcontext is excluded.
pUsage
Type: array<Microsoft.VisualStudio.Shell.Interop.VSUSERCONTEXTATTRIBUTEUSAGE[][out] Specifies whether an attribute or keyword is located at the specified index position in the context bag. For a list of pUsage values, see VSUSERCONTEXTATTRIBUTEUSAGE.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From context.idl:
HRESULT IVsUserContext::GetAttrUsage(
[in] int index,
[in] BOOL fIncludeChildren,
[out, retval] VSUSERCONTEXTATTRIBUTEUSAGE * pUsage);
Use the IVsUserContext.GetAttrUsage method to determine whether keywords returned from the GetAttribute or GetAttributePri methods are F1 or lookup keywords.
The value of the fIncludeChildren parameter has no effect if the context bag does not have any subcontext.
.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.