IVsProjectBuildMessageEvents.OnBuildMessage 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
由的实施者从生成系统收到的每个生成消息调用 IVsProjectBuildMessageReporter 。 在实施者对消息进行任何常规处理之前,将调用此方法 (如创建相应的错误列表项等) 。
bool OnBuildMessage(unsigned int Category, std::wstring const & szMessage, std::wstring const & szErrorCode, std::wstring const & szHelpKeyword, int line, int column, int endingLine, int endingColumn, std::wstring const & szFile, winrt::Windows::Foundation::IInspectable const & pAdditionalInfo);
public bool OnBuildMessage (uint Category, string szMessage, string szErrorCode, string szHelpKeyword, int line, int column, int endingLine, int endingColumn, string szFile, object pAdditionalInfo);
abstract member OnBuildMessage : uint32 * string * string * string * int * int * int * int * string * obj -> bool
Public Function OnBuildMessage (Category As UInteger, szMessage As String, szErrorCode As String, szHelpKeyword As String, line As Integer, column As Integer, endingLine As Integer, endingColumn As Integer, szFile As String, Optional pAdditionalInfo As Object) As Boolean
参数
- Category
- UInt32
中描述错误消息的严重级别。
- szMessage
- String
中错误消息。
- szErrorCode
- String
中错误消息的错误代码。
- szHelpKeyword
- String
中用于错误消息的关键字。
- line
- Int32
中出现错误的起始行。 行号从 1 开始。
- column
- Int32
中出现错误的起始列。 列数从 1 开始。
- endingLine
- Int32
中发生错误的结束行。
- endingColumn
- Int32
中发生错误的结束列。
- szFile
- String
中发生错误的文件。
- pAdditionalInfo
- Object
[in,可选]包含有关错误消息的任何附加信息的对象。
返回
指示是否应处理更多错误消息的布尔值。 如果为 true ,则调用方必须假定此方法的实现对其正确处理和报告具有完全责任。 具体而言,调用方不能创建与此消息对应的任何错误列表项。 此外,如果此事件有多个订阅服务器,则不会调用剩余的订阅服务器。 如果 false 为,则调用方必须继续调用所有剩余的订阅服务器。 如果所有订阅服务器将此值设置为 false ,则消息将正常处理 (即,) 创建错误列表项。