Class OdfDiagnostic
Unifies non-fatal diagnostic information across OdfKit report types into one strongly typed shape. 將 OdfKit 各報告類別的非致命診斷資訊統一為單一強型別形狀。
public sealed class OdfDiagnostic
- Inheritance
-
OdfDiagnostic
- Inherited Members
Constructors
OdfDiagnostic(string, OdfIssueSeverity, string, string?, string?, string?)
Unifies non-fatal diagnostic information across OdfKit report types into one strongly typed shape. 將 OdfKit 各報告類別的非致命診斷資訊統一為單一強型別形狀。
public OdfDiagnostic(string code, OdfIssueSeverity severity, string message, string? packagePath = null, string? objectId = null, string? location = null)
Parameters
codestringA short machine-readable code identifying the diagnostic kind. / 識別診斷種類的簡短機器可讀代碼。
severityOdfIssueSeverityThe diagnostic severity. / 診斷嚴重程度。
messagestringA human-readable description. / 人類可讀描述。
packagePathstringThe package-relative path this diagnostic relates to, if any. / 此診斷相關的套件內相對路徑(若適用)。
objectIdstringThe identifier of the affected object (e.g. a shape or bookmark name), if any. / 受影響物件的識別碼(例如圖形或書籤名稱),若適用。
locationstringA free-form location hint (e.g. a cell address or XPath), if any. / 自由格式的位置提示(例如儲存格位址或 XPath),若適用。
Properties
Code
Gets the short machine-readable code identifying the diagnostic kind. 取得識別診斷種類的簡短機器可讀代碼。
public string Code { get; }
Property Value
Location
Gets a free-form location hint (e.g. a cell address or XPath), if any. 取得自由格式的位置提示(例如儲存格位址或 XPath),若適用。
public string? Location { get; }
Property Value
Message
Gets the human-readable description. 取得人類可讀描述。
public string Message { get; }
Property Value
ObjectId
Gets the identifier of the affected object (e.g. a shape or bookmark name), if any. 取得受影響物件的識別碼(例如圖形或書籤名稱),若適用。
public string? ObjectId { get; }
Property Value
PackagePath
Gets the package-relative path this diagnostic relates to, if any. 取得此診斷相關的套件內相對路徑(若適用)。
public string? PackagePath { get; }
Property Value
Severity
Gets the diagnostic severity. 取得診斷嚴重程度。
public OdfIssueSeverity Severity { get; }