获取一个选定项的前景色和背景色。
命名空间: Microsoft.VisualStudio.Package
程序集: Microsoft.VisualStudio.Package.LanguageService.11.0(在 Microsoft.VisualStudio.Package.LanguageService.11.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService.10.0(在 Microsoft.VisualStudio.Package.LanguageService.10.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService(在 Microsoft.VisualStudio.Package.LanguageService.dll 中)
Microsoft.VisualStudio.Package.LanguageService.9.0(在 Microsoft.VisualStudio.Package.LanguageService.9.0.dll 中)
语法
声明
Public Overridable Function GetCompletionItemColor ( _
iIndex As Integer, _
<OutAttribute> ByRef dwFGColor As UInteger, _
<OutAttribute> ByRef dwBGColor As UInteger _
) As Integer
public virtual int GetCompletionItemColor(
int iIndex,
out uint dwFGColor,
out uint dwBGColor
)
参数
- iIndex
类型:System.Int32
项索引获取颜色。
- dwFGColor
类型:System.UInt32%
[in] 返回前景色。
- dwBGColor
类型:System.UInt32%
[in] 返回背景色。
返回值
类型:System.Int32
如果方法成功,则返回 [F:Microsoft.VisualStudio.VSConstants.S_OKiftherearecolorsset,S_FALSEifthedefaultsareused]。如果失败,它会返回一个错误代码。
实现
IVsCompletionSetEx.GetCompletionItemColor(Int32, UInt32%, UInt32%)
备注
此方法是 IVsCompletionSetEx 接口的 GetCompletionItemColor 方法的实现。
此方法不执行不返回 dwFGColor 和 dwBGColor 为 0,并返回 E_NOTIMPL。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。