ISharePointCommandLogger.WriteLine 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
WriteLine(String, LogCategory) |
將訊息寫入至具有指定類別的 [輸出] 視窗或 [錯誤清單] 視窗。 |
WriteLine(String, LogCategory, String) |
將訊息寫入至具有指定類別和 Help 關鍵字的 [輸出] 視窗或 [錯誤清單] 視窗。 |
WriteLine(String, LogCategory, String, Int32, Int32) |
將訊息寫入至具有指定類別和錯誤位置資訊的 [輸出] 視窗或 [錯誤清單] 視窗。 |
WriteLine(String, LogCategory, String, Int32, Int32, String) |
將訊息寫入至具有指定類別、錯誤位置資訊和 Help 關鍵字的 [輸出] 視窗或 [錯誤清單] 視窗。 |
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)
將訊息寫入至具有指定類別和 Help 關鍵字的 [輸出] 視窗或 [錯誤清單] 視窗。
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
錯誤的 Help 關鍵字。
適用於
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 時,例如 [ 錯誤 ] 視窗,然後 lineNumber
和 columnNumber
值會以零起始,但當使用者程式代碼寫入 IDE 時,這些值會以單一為基礎。 這表示,例如,如果您在程式代碼中指定 lineNumber
10 和 columnNumber
20 的 ,Visual Studio 會將它回報為第 11 行和數據行 21。
適用於
WriteLine(String, LogCategory, String, Int32, Int32, String)
將訊息寫入至具有指定類別、錯誤位置資訊和 Help 關鍵字的 [輸出] 視窗或 [錯誤清單] 視窗。
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
錯誤的 Help 關鍵字。
備註
當 Visual Studio 寫入 IDE 時,例如 [ 錯誤 ] 視窗,然後 lineNumber
和 columnNumber
值會以零起始,但當使用者程式代碼寫入 IDE 時,這些值會以單一為基礎。 這表示,例如,如果您在程式代碼中指定 lineNumber
10 和 columnNumber
20 的 ,Visual Studio 會將它回報為第 11 行和數據行 21。