Поделиться через


LanguageService.GetItemCount Method

Returns the number of custom colorable items supported by the language service.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'Declaration
Public Overridable Function GetItemCount ( _
    <OutAttribute> ByRef count As Integer _
) As Integer
public virtual int GetItemCount(
    out int count
)
public:
virtual int GetItemCount(
    [OutAttribute] int% count
)
abstract GetItemCount : 
        count:int byref -> int 
override GetItemCount : 
        count:int byref -> int 
public function GetItemCount(
    count : int
) : int

Parameters

  • count
    Type: System.Int32%
    [out] The number of custom colorable items available.

Return Value

Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.

Implements

IVsProvideColorableItems.GetItemCount(Int32%)

Remarks

This method determines the maximum number of IVsColorableItem objects that can be accessed by GetColorableItem. If you support custom colorable items, you must derive a class from the LanguageService class and implement this method as well as GetColorableItem.

The base method always returns E_NOTIMPL, indicating that custom colorable items are not supported. In this case, Visual Studio uses the default colors for all colorable items.

.NET Framework Security

See Also

Reference

LanguageService Class

Microsoft.VisualStudio.Package Namespace