Table of Contents

Class OdfValidationReport

Namespace
OdfKit.Compliance
Assembly
OdfKit.dll

Provides the OdfValidationReport API. 代表 ODF 套件或文件的驗證結果。

public sealed class OdfValidationReport
Inheritance
OdfValidationReport
Inherited Members

Constructors

OdfValidationReport(OdfVersion, OdfDocumentKind, IEnumerable<OdfValidationIssue>)

Provides the OdfValidationReport API. 代表 ODF 套件或文件的驗證結果。

public OdfValidationReport(OdfVersion detectedVersion, OdfDocumentKind documentKind, IEnumerable<OdfValidationIssue> issues)

Parameters

detectedVersion OdfVersion

偵測到的 ODF 版本

documentKind OdfDocumentKind

偵測到的 ODF 文件種類

issues IEnumerable<OdfValidationIssue>

驗證問題集合

Properties

BlockingIssueCount

Provides the BlockingIssueCount member. 取得會讓驗證失敗的問題數量。

public int BlockingIssueCount { get; }

Property Value

int

DetectedVersion

Gets the DetectedVersion value. 取得偵測到的 ODF 版本。

public OdfVersion DetectedVersion { get; }

Property Value

OdfVersion

DocumentKind

Gets the DocumentKind value. 取得偵測到的 ODF 文件種類。

public OdfDocumentKind DocumentKind { get; }

Property Value

OdfDocumentKind

ErrorCount

Performs error count. 取得錯誤問題數量。

public int ErrorCount { get; }

Property Value

int

FatalCount

Performs fatal count. 取得致命問題數量。

public int FatalCount { get; }

Property Value

int

InfoCount

Performs info count. 取得資訊性問題數量。

public int InfoCount { get; }

Property Value

int

IsValid

Provides the IsValid member. 取得一個值,表示驗證的文件是否符合選取的檢查專案。

public bool IsValid { get; }

Property Value

bool

Issues

Provides the Issues member. 取得所有驗證問題。

public IReadOnlyList<OdfValidationIssue> Issues { get; }

Property Value

IReadOnlyList<OdfValidationIssue>

IssuesBySeverity

Provides the IssuesBySeverity member. 取得依嚴重性彙整的問題數量。

public IReadOnlyDictionary<OdfIssueSeverity, int> IssuesBySeverity { get; }

Property Value

IReadOnlyDictionary<OdfIssueSeverity, int>

WarningCount

Performs warning count. 取得警告問題數量。

public int WarningCount { get; }

Property Value

int

Methods

ToJson()

Converts to json. 將驗證報告匯出為穩定 JSON 字串。

public string ToJson()

Returns

string

JSON 格式的驗證報告

ToJsonModel()

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

public OdfValidationReportJsonModel ToJsonModel()

Returns

OdfValidationReportJsonModel

包含驗證報告摘要與問題清單的 JSON 匯出模型