ISharePointCommandLogger.WriteLine 方法

定義

多載

WriteLine(String, LogCategory)

將訊息寫入至具有指定類別的 [輸出] 視窗或 [錯誤清單] 視窗。Writes a message to the Output window or Error List window with the specified category.

WriteLine(String, LogCategory, String)

將訊息寫入至具有指定類別和 Help 關鍵字的 [輸出] 視窗或 [錯誤清單] 視窗。Writes a message to the Output window or Error List window with the specified category and Help keyword.

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

將訊息寫入至具有指定類別和錯誤位置資訊的 [輸出] 視窗或 [錯誤清單] 視窗。Writes a message to the Output window or Error List window with the specified category and error location information.

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

將訊息寫入至具有指定類別、錯誤位置資訊和 Help 關鍵字的 [輸出] 視窗或 [錯誤清單] 視窗。Writes a message to the Output window or Error List window with the specified category, error location information, and Help keyword.

WriteLine(String, LogCategory)

將訊息寫入至具有指定類別的 [輸出] 視窗或 [錯誤清單] 視窗。Writes a message to the Output window or Error List window with the specified category.

public void WriteLine (string message, Microsoft.VisualStudio.SharePoint.Commands.LogCategory category);

參數

message
String

訊息文字。The message text.

category
LogCategory

訊息的分類。The category of the message. 這會指定訊息出現在 [輸出] 視窗還是 [錯誤清單] 視窗 (或兩者),以及訊息出現在 [錯誤清單] 視窗中的位置。This specifies whether the message appears in the Output window or Error List window (or both), and where the message appears in the Error List window.

適用於

WriteLine(String, LogCategory, String)

將訊息寫入至具有指定類別和 Help 關鍵字的 [輸出] 視窗或 [錯誤清單] 視窗。Writes a message to the Output window or Error List window with the specified category and Help keyword.

public void WriteLine (string message, Microsoft.VisualStudio.SharePoint.Commands.LogCategory category, string helpKeyword);

參數

message
String

訊息文字。The message text.

category
LogCategory

訊息的分類。The category of the message. 這會指定訊息出現在 [輸出] 視窗還是 [錯誤清單] 視窗 (或兩者),以及訊息出現在 [錯誤清單] 視窗中的位置。This specifies whether the message appears in the Output window or Error List window (or both), and where the message appears in the Error List window.

helpKeyword
String

錯誤的 Help 關鍵字。The Help keyword for the error.

適用於

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

將訊息寫入至具有指定類別和錯誤位置資訊的 [輸出] 視窗或 [錯誤清單] 視窗。Writes a message to the Output window or Error List window with the specified category and error location information.

public void WriteLine (string message, Microsoft.VisualStudio.SharePoint.Commands.LogCategory category, string filePath, int lineNumber, int columnNumber);

參數

message
String

訊息文字。The message text.

category
LogCategory

訊息的分類。The category of the message. 這會指定訊息出現在 [輸出] 視窗還是 [錯誤清單] 視窗 (或兩者),以及訊息出現在 [錯誤清單] 視窗中的位置。This specifies whether the message appears in the Output window or Error List window (or both), and where the message appears in the Error List window.

filePath
String

含有錯誤或警告之檔案的完整路徑。The full path to the file with the error or warning.

lineNumber
Int32

錯誤或警告的行號。The line number of the error or warning.

columnNumber
Int32

錯誤或警告的資料行號碼。The column number of the error or warning.

備註

Visual StudioVisual Studio 寫入 ide 時(例如 [錯誤] 視窗), lineNumbercolumnNumber 值是以零為起始,但當使用者程式碼寫入 ide 時,這些值是以一為基礎。When Visual StudioVisual Studio writes to the IDE, such as the Error window, then the lineNumber and columnNumber values are zero-based, but when user code writes to the IDE, then the values are one-based. 這表示,如果您在 lineNumber 程式碼中指定的為10,而為 columnNumber 20,則 Visual StudioVisual Studio 會將它報告為第11行和第21欄。This means that if, for example, you specify a lineNumber of 10 and a columnNumber of 20 in your code, Visual StudioVisual Studio reports it as line 11 and column 21.

適用於

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

將訊息寫入至具有指定類別、錯誤位置資訊和 Help 關鍵字的 [輸出] 視窗或 [錯誤清單] 視窗。Writes a message to the Output window or Error List window with the specified category, error location information, and Help keyword.

public void WriteLine (string message, Microsoft.VisualStudio.SharePoint.Commands.LogCategory category, string filePath, int lineNumber, int columnNumber, string helpKeyword);

參數

message
String

訊息文字。The message text.

category
LogCategory

訊息的分類。The category of the message. 這會指定訊息出現在 [輸出] 視窗還是 [錯誤清單] 視窗 (或兩者),以及訊息出現在 [錯誤清單] 視窗中的位置。This specifies whether the message appears in the Output window or Error List window (or both), and where the message appears in the Error List window.

filePath
String

含有錯誤或警告之檔案的完整路徑。The full path to the file with the error or warning.

lineNumber
Int32

錯誤或警告的行號。The line number of the error or warning.

columnNumber
Int32

錯誤或警告的資料行號碼。The column number of the error or warning.

helpKeyword
String

錯誤的 Help 關鍵字。The Help keyword for the error.

備註

Visual StudioVisual Studio 寫入 ide 時(例如 [錯誤] 視窗), lineNumbercolumnNumber 值是以零為起始,但當使用者程式碼寫入 ide 時,這些值是以一為基礎。When Visual StudioVisual Studio writes to the IDE, such as the Error window, then the lineNumber and columnNumber values are zero-based, but when user code writes to the IDE, then the values are one-based. 這表示,如果您在 lineNumber 程式碼中指定的為10,而為 columnNumber 20,則 Visual StudioVisual Studio 會將它報告為第11行和第21欄。This means that if, for example, you specify a lineNumber of 10 and a columnNumber of 20 in your code, Visual StudioVisual Studio reports it as line 11 and column 21.

適用於