ISharePointCommandLogger.WriteLine 方法

定义

重载

WriteLine(String, LogCategory)

将消息写入具有指定类别的“输出”窗口或“错误列表”窗口。

WriteLine(String, LogCategory, String)

将消息写入具有指定类别和“帮助”关键字的“输出”窗口或“错误列表”窗口。

WriteLine(String, LogCategory, String, Int32, Int32)

将消息写入具有指定类别和错误位置信息的“输出”窗口或“错误列表”窗口。

WriteLine(String, LogCategory, String, Int32, Int32, String)

将消息写入具有指定类别、错误位置信息和“帮助”关键字的“输出”窗口或“错误列表”窗口。

WriteLine(String, LogCategory)

将消息写入具有指定类别的“输出”窗口或“错误列表”窗口。

public:
 void WriteLine(System::String ^ message, Microsoft::VisualStudio::SharePoint::Commands::LogCategory category);
public void WriteLine (string message, Microsoft.VisualStudio.SharePoint.Commands.LogCategory category);
abstract member WriteLine : string * Microsoft.VisualStudio.SharePoint.Commands.LogCategory -> unit
Public Sub WriteLine (message As String, category As LogCategory)

参数

message
String

消息文本。

category
LogCategory

消息的类别。 这指定消息是否在“输出”窗口和/或“错误列表”窗口中显示,以及消息在“错误列表”窗口的何处显示。

适用于

WriteLine(String, LogCategory, String)

将消息写入具有指定类别和“帮助”关键字的“输出”窗口或“错误列表”窗口。

public:
 void WriteLine(System::String ^ message, Microsoft::VisualStudio::SharePoint::Commands::LogCategory category, System::String ^ helpKeyword);
public void WriteLine (string message, Microsoft.VisualStudio.SharePoint.Commands.LogCategory category, string helpKeyword);
abstract member WriteLine : string * Microsoft.VisualStudio.SharePoint.Commands.LogCategory * string -> unit
Public Sub WriteLine (message As String, category As LogCategory, helpKeyword As String)

参数

message
String

消息文本。

category
LogCategory

消息的类别。 这指定消息是否在“输出”窗口和/或“错误列表”窗口中显示,以及消息在“错误列表”窗口的何处显示。

helpKeyword
String

此错误的“帮助”关键字。

适用于

WriteLine(String, LogCategory, String, Int32, Int32)

将消息写入具有指定类别和错误位置信息的“输出”窗口或“错误列表”窗口。

public:
 void WriteLine(System::String ^ message, Microsoft::VisualStudio::SharePoint::Commands::LogCategory category, System::String ^ filePath, int lineNumber, int columnNumber);
public void WriteLine (string message, Microsoft.VisualStudio.SharePoint.Commands.LogCategory category, string filePath, int lineNumber, int columnNumber);
abstract member WriteLine : string * Microsoft.VisualStudio.SharePoint.Commands.LogCategory * string * int * int -> unit
Public Sub WriteLine (message As String, category As LogCategory, filePath As String, lineNumber As Integer, columnNumber As Integer)

参数

message
String

消息文本。

category
LogCategory

消息的类别。 这指定消息是否在“输出”窗口和/或“错误列表”窗口中显示,以及消息在“错误列表”窗口的何处显示。

filePath
String

具有错误或警告的文件的完整路径。

lineNumber
Int32

错误或警告的行号。

columnNumber
Int32

错误或警告的列号。

注解

当 Visual Studio 写入 IDE(如 “错误”窗口) 时,和 lineNumbercolumnNumber 值从零开始,但当用户代码写入 IDE 时,值从 1 开始。 这意味着,例如,如果在代码中将 指定 lineNumber 为 10,将 指定 columnNumber 为 20 的 ,则 Visual Studio 会将其报告为第 11 行和第 21 列。

适用于

WriteLine(String, LogCategory, String, Int32, Int32, String)

将消息写入具有指定类别、错误位置信息和“帮助”关键字的“输出”窗口或“错误列表”窗口。

public:
 void WriteLine(System::String ^ message, Microsoft::VisualStudio::SharePoint::Commands::LogCategory category, System::String ^ filePath, int lineNumber, int columnNumber, System::String ^ helpKeyword);
public void WriteLine (string message, Microsoft.VisualStudio.SharePoint.Commands.LogCategory category, string filePath, int lineNumber, int columnNumber, string helpKeyword);
abstract member WriteLine : string * Microsoft.VisualStudio.SharePoint.Commands.LogCategory * string * int * int * string -> unit
Public Sub WriteLine (message As String, category As LogCategory, filePath As String, lineNumber As Integer, columnNumber As Integer, helpKeyword As String)

参数

message
String

消息文本。

category
LogCategory

消息的类别。 这指定消息是否在“输出”窗口和/或“错误列表”窗口中显示,以及消息在“错误列表”窗口的何处显示。

filePath
String

具有错误或警告的文件的完整路径。

lineNumber
Int32

错误或警告的行号。

columnNumber
Int32

错误或警告的列号。

helpKeyword
String

此错误的“帮助”关键字。

注解

当 Visual Studio 写入 IDE(如 “错误”窗口) 时,和 lineNumbercolumnNumber 值从零开始,但当用户代码写入 IDE 时,值从 1 开始。 这意味着,例如,如果在代码中将 指定 lineNumber 为 10,将 指定 columnNumber 为 20 的 ,则 Visual Studio 会将其报告为第 11 行和第 21 列。

适用于