IVsUserContext::GetAttrUsage Method (Int32, Int32, array<VSUSERCONTEXTATTRIBUTEUSAGE>^)
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.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int GetAttrUsage( int index, int fIncludeChildren, array<VSUSERCONTEXTATTRIBUTEUSAGE>^ pUsage )
Parameters
- index
-
Type:
System::Int32
[in] Index position of the context item in the context bag. The index is zero based.
- fIncludeChildren
-
Type:
System::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: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.