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
severityOdfIssueSeverity問題嚴重性
ruleIdstring規則識別碼
messagestring人類可讀的問題說明訊息
packagePathstring與此問題相關的套件進入路徑
xPathstring與此問題相關的 XML 路徑(可用時)
requiredVersionOdfVersion?問題與版本相關時所需的 ODF 版本
profileIdstring發出此問題的相容性設定檔識別碼
detailsIReadOnlyDictionary<string, string>可供工具處理的結構化診斷細節
cultureCultureInfo指定此問題生成時使用的文化特性,用於 SuggestedFix 的本地化
Properties
Culture
Gets the Culture value. 取得與此問題相關的文化特性,用於本地化翻譯。
public CultureInfo? Culture { get; set; }
Property Value
Details
Gets the Details value. 取得可供工具處理的結構化診斷細節。
public IReadOnlyDictionary<string, string?> Details { get; }
Property Value
Message
Gets the Message value. 取得人類可讀的問題說明訊息。
public string Message { get; }
Property Value
PackagePath
Gets the PackagePath value. 取得與此問題相關的套件進入路徑。
public string? PackagePath { get; }
Property Value
ProfileId
Gets the ProfileId value. 取得發出此問題的相容性設定檔識別碼。
public string? ProfileId { get; }
Property Value
RequiredVersion
Gets the RequiredVersion value. 取得問題與版本相關時所需的 ODF 版本。
public OdfVersion? RequiredVersion { get; }
Property Value
RuleId
Gets the RuleId value. 取得規則識別碼。
public string RuleId { get; }
Property Value
Severity
Gets the Severity value. 取得問題嚴重性。
public OdfIssueSeverity Severity { get; }
Property Value
SuggestedFix
Performs suggested fix. 取得使用者可採取的建議修復文字。
public string SuggestedFix { get; }
Property Value
XPath
Gets the XPath value. 取得與此問題相關的 XML 路徑(可用時)。
public string? XPath { get; }
Property Value
Methods
ToJsonModel()
Converts to json model. 建立可序列化的 JSON 匯出模型。
public OdfValidationIssueJsonModel ToJsonModel()
Returns
- OdfValidationIssueJsonModel
包含驗證問題欄位的 JSON 匯出模型