Compartilhar via


IVsProvideColorableItems.GetItemCount Method

Determines the number of custom colorable items proffered by the language service.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaration
Function GetItemCount ( _
    <OutAttribute> ByRef piCount As Integer _
) As Integer
int GetItemCount(
    out int piCount
)
int GetItemCount(
    [OutAttribute] int% piCount
)
abstract GetItemCount : 
        piCount:int byref -> int
function GetItemCount(
    piCount : int
) : int

Parameters

  • piCount
    Type: System.Int32%

    [out] The number of custom colorable items provided by the language service.

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 textmgr.idl:

HRESULT IVsProvideColorableItems::GetItemCount(
   [out] int *piCount
);

The core editor calls GetItemCount when it is loading a language service and needs to know how many custom colorable items the language service is proffering. This count includes only the number of colors the language service actually provides. If the language service chooses to include a placeholder for index 0, that placeholder should not be included in the count returned from this method.

.NET Framework Security

See Also

Reference

IVsProvideColorableItems Interface

Microsoft.VisualStudio.TextManager.Interop Namespace