# HtmlDiagnosticReport

Mutable report of diagnostics emitted by OfficeIMO HTML workflows.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[HtmlDiagnosticReport.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L7)

**Implements**

`IReadOnlyList<HtmlDiagnostic>` `IReadOnlyCollection<HtmlDiagnostic>` `IEnumerable<HtmlDiagnostic>` `IEnumerable`

**Modifiers**

sealed

**Attributes**

`DefaultMember("Item")`

Mutable report of diagnostics emitted by OfficeIMO HTML workflows.

## Inheritance

- object
- HtmlDiagnosticReport

## Usage

Explore 7 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 4

- Property [HtmlCapabilityGalleryResult.Diagnostics](/api/html/officeimo-html-htmlcapabilitygalleryresult/#property-diagnostics)
- Method [HtmlDiagnosticReport.Clone](/api/html/officeimo-html-htmldiagnosticreport/#method-clone)
- Method [HtmlDiagnosticReport.Snapshot](/api/html/officeimo-html-htmldiagnosticreport/#method-snapshot)
- Property [HtmlResourceSession.Diagnostics](/api/html/officeimo-html-htmlresourcesession/#property-diagnostics)

### Accepted by parameters 3

- Method [HtmlActiveMediaFilter.Filter](/api/html/officeimo-html-htmlactivemediafilter/#method-filter-string-officeimo-html-htmlcssmediacontext-officeimo-html-htmldiagnosticreport) parameter `diagnostics`
- Method [HtmlResourceSession.Resolve](/api/html/officeimo-html-htmlresourcesession/#method-resolve-officeimo-html-htmlresourcemanifest-officeimo-html-htmlrenderoptions-officeimo-html-htmldiagnosticreport-threading-cancellationtoken) parameter `diagnostics`
- Method [HtmlResourceSession.ResolveAsync](/api/html/officeimo-html-htmlresourcesession/#method-resolveasync-officeimo-html-htmlresourcemanifest-officeimo-html-htmlrenderoptions-officeimo-html-htmldiagnosticreport-threading-cancellationtoken) parameter `diagnostics`

Filter members 

Show inherited

## Constructors

`public HtmlDiagnosticReport()` [#](#constructor-ctor)

[HtmlDiagnosticReport.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L7)

Creates an empty diagnostic report.

## Methods

Add 3 overloads

`public void Add(HtmlDiagnostic diagnostic)` [#](#method-add-officeimo-html-htmldiagnostic)

[HtmlDiagnosticReport.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L42)

Adds an existing diagnostic instance to the report.

Parameters

**diagnostic OfficeIMO.Html.HtmlDiagnostic required**

Diagnostic to add.

`public void Add(string component, string code, string message, HtmlDiagnosticSeverity severity = Warning, string? source = null, string? detail = null, OfficeConversionLossKind lossKind = None)` [#](#method-add-string-string-string-officeimo-html-htmldiagnosticseverity-string-string-officeimo-officeconversionlosskind)

[HtmlDiagnosticReport.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L71)

Adds a diagnostic to the report.

Parameters

**component string required**

Component that emitted the diagnostic.

**code string required**

Stable diagnostic code.

**message string required**

Human-readable diagnostic message.

**severity OfficeIMO.Html.HtmlDiagnosticSeverity = Warning optional**

Diagnostic severity.

**source string? = null optional**

Optional HTML, resource, or artifact source associated with the diagnostic.

**detail string? = null optional**

Optional low-level detail.

**lossKind OfficeIMO.OfficeConversionLossKind = None optional**

Conversion fidelity impact represented by the diagnostic.

`public void Add(string component, string code, string message, HtmlDiagnosticSeverity severity, string? source, string? detail, OfficeConversionLossKind lossKind, HtmlSemanticSourceLocation? sourceLocation, string? targetAddress)` [#](#method-add-string-string-string-officeimo-html-htmldiagnosticseverity-string-string-officeimo-officeconversionlosskind-officeimo-html-htmlsemanticsourcelocation-string)

[HtmlDiagnosticReport.cs:94](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L94)

Adds a diagnostic with typed source-to-target provenance.

Parameters

**component string required**

Component that emitted the diagnostic.

**code string required**

Stable diagnostic code.

**message string required**

Human-readable diagnostic message.

**severity OfficeIMO.Html.HtmlDiagnosticSeverity required**

Diagnostic severity.

**source string? required**

Optional source.

**detail string? required**

Optional low-level detail.

**lossKind OfficeIMO.OfficeConversionLossKind required**

Conversion fidelity impact.

**sourceLocation OfficeIMO.Html.HtmlSemanticSourceLocation? required**

Optional typed HTML source location.

**targetAddress string? required**

Optional target artifact address.

`public void AddRange(IEnumerable<HtmlDiagnostic> diagnostics)` [#](#method-addrange-collections-generic-ienumerable-officeimo-html-htmldiagnostic)

[HtmlDiagnosticReport.cs:102](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L102)

Adds diagnostics to the report in enumeration order.

Parameters

**diagnostics System.Collections.Generic.IEnumerable<OfficeIMO.Html.HtmlDiagnostic> required**

Diagnostics to add.

`public void Clear()` [#](#method-clear)

[HtmlDiagnosticReport.cs:114](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L114)

Removes all diagnostics from the report.

`public HtmlDiagnosticReport Clone()` [#](#method-clone)

[HtmlDiagnosticReport.cs:123](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L123)

Creates an independent copy of the current diagnostic report.

Returns

`HtmlDiagnosticReport` A report containing the same immutable diagnostics.

`public IEnumerator<HtmlDiagnostic> GetEnumerator()` [#](#method-getenumerator)

[HtmlDiagnosticReport.cs:142](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L142)

Returns an enumerator that iterates through the collection.

Returns

`IEnumerator<HtmlDiagnostic>` An enumerator that can be used to iterate through the collection.

`public HtmlDiagnosticReport Snapshot()` [#](#method-snapshot)

[HtmlDiagnosticReport.cs:130](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L130)

Creates an independent, read-only snapshot of the current diagnostics.

Returns

`HtmlDiagnosticReport`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IReadOnlyList<HtmlDiagnostic> Diagnostics { get; }` [#](#property-diagnostics)

[HtmlDiagnosticReport.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L19)

Diagnostics captured by the report in emission order.

`public bool IsReadOnly { get; }` [#](#property-isreadonly)

[HtmlDiagnosticReport.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L22)

True when this report is a frozen result snapshot and can no longer be modified.

`public int Count { get; }` [#](#property-count)

[HtmlDiagnosticReport.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L27)

Number of diagnostics currently captured.

`public HtmlDiagnostic this[int index] { get; }` [#](#property-item-int32)

[HtmlDiagnosticReport.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L30)

Gets a diagnostic by emission index.

Parameters

**index int required**

`public bool HasErrors { get; }` [#](#property-haserrors)

[HtmlDiagnosticReport.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnosticReport.cs#L35)

Indicates whether any captured diagnostic has error severity.

<!-- PowerForge markdown artifact sha256:4516C2B21AC20732C74485CD8E5B4FF405D5E5347CE3341146144DC0B2180E02 -->
