Table of Contents

Class OdfValidationIssue

Namespace
OdfKit.Compliance
Assembly
OdfKit.dll

Provides the OdfValidationIssue API. 代表單一驗證問題。

public sealed class OdfValidationIssue
Inheritance
OdfValidationIssue
Inherited Members

Constructors

OdfValidationIssue(OdfIssueSeverity, string, string, string?, string?, OdfVersion?, string?, IReadOnlyDictionary<string, string?>?, CultureInfo?)

Provides the OdfValidationIssue API. 代表單一驗證問題。

public OdfValidationIssue(OdfIssueSeverity severity, string ruleId, string message, string? packagePath = null, string? xPath = null, OdfVersion? requiredVersion = null, string? profileId = null, IReadOnlyDictionary<string, string?>? details = null, CultureInfo? culture = null)

Parameters

severity OdfIssueSeverity

問題嚴重性

ruleId string

規則識別碼

message string

人類可讀的問題說明訊息

packagePath string

與此問題相關的套件進入路徑

xPath string

與此問題相關的 XML 路徑(可用時)

requiredVersion OdfVersion?

問題與版本相關時所需的 ODF 版本

profileId string

發出此問題的相容性設定檔識別碼

details IReadOnlyDictionary<string, string>

可供工具處理的結構化診斷細節

culture CultureInfo

指定此問題生成時使用的文化特性,用於 SuggestedFix 的本地化

Properties

Culture

Gets the Culture value. 取得與此問題相關的文化特性,用於本地化翻譯。

public CultureInfo? Culture { get; set; }

Property Value

CultureInfo

Details

Gets the Details value. 取得可供工具處理的結構化診斷細節。

public IReadOnlyDictionary<string, string?> Details { get; }

Property Value

IReadOnlyDictionary<string, string>

Message

Gets the Message value. 取得人類可讀的問題說明訊息。

public string Message { get; }

Property Value

string

PackagePath

Gets the PackagePath value. 取得與此問題相關的套件進入路徑。

public string? PackagePath { get; }

Property Value

string

ProfileId

Gets the ProfileId value. 取得發出此問題的相容性設定檔識別碼。

public string? ProfileId { get; }

Property Value

string

RequiredVersion

Gets the RequiredVersion value. 取得問題與版本相關時所需的 ODF 版本。

public OdfVersion? RequiredVersion { get; }

Property Value

OdfVersion?

RuleId

Gets the RuleId value. 取得規則識別碼。

public string RuleId { get; }

Property Value

string

Severity

Gets the Severity value. 取得問題嚴重性。

public OdfIssueSeverity Severity { get; }

Property Value

OdfIssueSeverity

SuggestedFix

Performs suggested fix. 取得使用者可採取的建議修復文字。

public string SuggestedFix { get; }

Property Value

string

XPath

Gets the XPath value. 取得與此問題相關的 XML 路徑(可用時)。

public string? XPath { get; }

Property Value

string

Methods

ToJsonModel()

Converts to json model. 建立可序列化的 JSON 匯出模型。

public OdfValidationIssueJsonModel ToJsonModel()

Returns

OdfValidationIssueJsonModel

包含驗證問題欄位的 JSON 匯出模型