IVsUserContext::CountAttributes Method (String^, Int32, Int32)
Returns the number of attributes or keywords present in the context or subcontext bag.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Parameters
- pszName
-
Type:
System::String^
[in] Attribute name or keyword. Specify the attribute name to determine the number of attributes of a given name in the context bag. Specify "keyword" to determine the number of F1 or lookup keywords in the context or subcontext bag.
- fIncludeChildren
-
Type:
System::Int32
[in] If true, then the number of subcontext attributes or keywords are also returned in the count. If false, then the subcontext is excluded from the count.
- pc
-
Type:
System::Int32
[out, retval] Pointer to an integer that indicates the number of attributes of a specific name or the number of keywords.
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::CountAttributes( [in] LPCOLESTR pszName, [in] BOOL fIncludeChildren, [out, retval] int * pc );
Use this method to determine the number of attributes of a specific name, or the number of keywords present in the context or subcontext bag. If you set the fIncludeChildren parameter to true, then this method also includes in the count the number of attributes or keywords present in any subcontext bags associated with the context bag. The value of the fIncludeChildren parameter has no effect if the context bag does not have any subcontext.