目錄 / Table of Contents

Class OdfDiagnostic

Namespace
OdfKit.Core
Assembly
OdfKit.dll

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

code string

A short machine-readable code identifying the diagnostic kind. / 識別診斷種類的簡短機器可讀代碼。

severity OdfIssueSeverity

The diagnostic severity. / 診斷嚴重程度。

message string

A human-readable description. / 人類可讀描述。

packagePath string

The package-relative path this diagnostic relates to, if any. / 此診斷相關的套件內相對路徑(若適用)。

objectId string

The identifier of the affected object (e.g. a shape or bookmark name), if any. / 受影響物件的識別碼(例如圖形或書籤名稱),若適用。

location string

A 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

string

Location

Gets a free-form location hint (e.g. a cell address or XPath), if any. 取得自由格式的位置提示(例如儲存格位址或 XPath),若適用。

public string? Location { get; }

Property Value

string

Message

Gets the human-readable description. 取得人類可讀描述。

public string Message { get; }

Property Value

string

ObjectId

Gets the identifier of the affected object (e.g. a shape or bookmark name), if any. 取得受影響物件的識別碼(例如圖形或書籤名稱),若適用。

public string? ObjectId { get; }

Property Value

string

PackagePath

Gets the package-relative path this diagnostic relates to, if any. 取得此診斷相關的套件內相對路徑(若適用)。

public string? PackagePath { get; }

Property Value

string

Severity

Gets the diagnostic severity. 取得診斷嚴重程度。

public OdfIssueSeverity Severity { get; }

Property Value

OdfIssueSeverity