ISharePointCommandLogger.WriteLine 方法 (String, LogCategory, String, Int32, Int32, String)
使用指定的分類、錯誤位置資訊及 Help 關鍵字,將訊息寫入 [輸出] 視窗或 [錯誤清單] 視窗中。
命名空間: Microsoft.VisualStudio.SharePoint.Commands
組件: Microsoft.VisualStudio.SharePoint.Commands (在 Microsoft.VisualStudio.SharePoint.Commands.dll 中)
語法
'宣告
Sub WriteLine ( _
message As String, _
category As LogCategory, _
filePath As String, _
lineNumber As Integer, _
columnNumber As Integer, _
helpKeyword As String _
)
void WriteLine(
string message,
LogCategory category,
string filePath,
int lineNumber,
int columnNumber,
string helpKeyword
)
參數
- message
型別:System.String
訊息文字。
- category
型別:Microsoft.VisualStudio.SharePoint.Commands.LogCategory
訊息的分類。此會指定訊息是出現在 [輸出] 視窗或 [錯誤清單] 視窗 (或皆出現),以及會出現在 [錯誤清單] 視窗中的哪個位置。
- filePath
型別:System.String
含有錯誤或警告之檔案的完整路徑。
- lineNumber
型別:System.Int32
錯誤或警告的行號。
- columnNumber
型別:System.Int32
錯誤或警告的欄號。
- helpKeyword
型別:System.String
錯誤的 Help 關鍵字。
備註
當 Visual Studio 寫入 IDE (例如 錯誤 視窗), lineNumber 和 columnNumber 值會以零為基底,但當使用者程式碼寫入 IDE 時,值則會以一為基底。例如,這表示如果在程式碼中指定 lineNumber 為 10,並指定 columnNumber 為 20,Visual Studio 會回報第 11 行、第 21 個資料行。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。