Udostępnij za pośrednictwem


LanguageService.GetColorableItem(Int32, IVsColorableItem) Method

Definition

Returns the requested IVsColorableItem object.

public:
 virtual int GetColorableItem(int index, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsColorableItem ^ % item);
public:
 virtual int GetColorableItem(int index, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsColorableItem ^ &  item);
 virtual int GetColorableItem(int index, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsColorableItem const & & item);
public virtual int GetColorableItem (int index, out Microsoft.VisualStudio.TextManager.Interop.IVsColorableItem item);
abstract member GetColorableItem : int * IVsColorableItem -> int
override this.GetColorableItem : int * IVsColorableItem -> int
Public Overridable Function GetColorableItem (index As Integer, ByRef item As IVsColorableItem) As Integer

Parameters

index
Int32

[in] A zero-based index into the list of colorable items maintained by the language service.

item
IVsColorableItem

[out] Returns the IVsColorableItem object.

Returns

If successful, returns S_OK; otherwise, returns an error code.

Implements

Remarks

If your language service supports custom colorable items, you must derive a class from the LanguageService class and implement this method as well as GetItemCount. Note that this method is never called with an index of 0 since that index represents the default text format set by the user. You should return an error if the index is outside the range of your list.

In the Managed Package Framework, a custom colorable item is represented by the ColorableItem class, which implements the IVsColorableItem interface.

The base method always returns E_NOTIMPL indicating the method is not implemented.

Applies to