다음을 통해 공유


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

‘선언
Function GetAttrUsage ( _
    index As Integer, _
    fIncludeChildren As Integer, _
    <OutAttribute> pUsage As VSUSERCONTEXTATTRIBUTEUSAGE() _
) As Integer
‘사용 방법
Dim instance As IVsUserContext
Dim index As Integer
Dim fIncludeChildren As Integer
Dim pUsage As VSUSERCONTEXTATTRIBUTEUSAGE()
Dim returnValue As Integer

returnValue = instance.GetAttrUsage(index, _
    fIncludeChildren, pUsage)
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: 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.

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 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

See Also

Reference

IVsUserContext Interface

IVsUserContext Members

Microsoft.VisualStudio.Shell.Interop Namespace