# HtmlDiagnostic

Shared diagnostic record for OfficeIMO HTML ingestion, conversion, and artifact workflows.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[HtmlDiagnostic.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L25)

**Modifiers**

sealed

Shared diagnostic record for OfficeIMO HTML ingestion, conversion, and artifact workflows.

## Inheritance

- object
- HtmlDiagnostic

## Usage

Explore 22 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 15

- Property [HtmlCapabilityGalleryArtifactEvidence.NativeDiagnostics](/api/html/officeimo-html-htmlcapabilitygalleryartifactevidence/#property-nativediagnostics)
- Property [HtmlConversionDocument.Diagnostics](/api/html/officeimo-html-htmlconversiondocument/#property-diagnostics)
- Property [HtmlConversionException.Diagnostics](/api/html/officeimo-html-htmlconversionexception/#property-diagnostics)
- Property [HtmlConversionPreflight.Diagnostics](/api/html/officeimo-html-htmlconversionpreflight/#property-diagnostics)
- Property [HtmlConversionReport.NativeDiagnostics](/api/html/officeimo-html-htmlconversionreport/#property-nativediagnostics)
- Method [HtmlDiagnostic.WithProvenance](/api/html/officeimo-html-htmldiagnostic/#method-withprovenance-officeimo-html-htmlsemanticsourcelocation-string)
- Method [HtmlDiagnosticReport.GetEnumerator](/api/html/officeimo-html-htmldiagnosticreport/#method-getenumerator)
- Property [HtmlDiagnosticReport.Diagnostics](/api/html/officeimo-html-htmldiagnosticreport/#property-diagnostics)
- Property [HtmlDiagnosticReport.Item](/api/html/officeimo-html-htmldiagnosticreport/#property-item-int32)
- Property [HtmlEditableLayoutProjection.Diagnostics](/api/html/officeimo-html-htmleditablelayoutprojection/#property-diagnostics)
- Property [HtmlRenderArchiveManifest.Diagnostics](/api/html/officeimo-html-htmlrenderarchivemanifest/#property-diagnostics)
- Property [HtmlRenderDocument.NativeDiagnostics](/api/html/officeimo-html-htmlrenderdocument/#property-nativediagnostics)
- Property [HtmlRenderResult.Diagnostics](/api/html/officeimo-html-htmlrenderresult/#property-diagnostics)
- Property [HtmlRenderResult.LossDiagnostics](/api/html/officeimo-html-htmlrenderresult/#property-lossdiagnostics)
- Property [HtmlResourceManifest.Diagnostics](/api/html/officeimo-html-htmlresourcemanifest/#property-diagnostics)

### Accepted by parameters 7

- Constructor [HtmlCapabilityGalleryArtifactEvidence.HtmlCapabilityGalleryArtifactEvidence](/api/html/officeimo-html-htmlcapabilitygalleryartifactevidence/#constructor-ctor-int32-nullable-system-int32-nullable-system-double-nullable-system-double-string-collections-generic-ienumerable-officeimo-html-htmldiagnostic-collections-generic-ienumerable-officeimo-html-htmlcapabilitygallerycheck) parameter `diagnostics`
- Constructor [HtmlCapabilityGalleryResult.HtmlCapabilityGalleryResult](/api/html/officeimo-html-htmlcapabilitygalleryresult/#constructor-ctor-officeimo-html-htmlcapabilitygalleryscenario-collections-generic-ienumerable-officeimo-html-htmlcapabilitygalleryartifact-collections-generic-ienumerable-officeimo-html-htmldiagnostic) parameter `diagnostics`
- Constructor [HtmlConversionException.HtmlConversionException](/api/html/officeimo-html-htmlconversionexception/#constructor-ctor-collections-generic-ienumerable-officeimo-html-htmldiagnostic) parameter `diagnostics`
- Method [HtmlDiagnosticReport.Add](/api/html/officeimo-html-htmldiagnosticreport/#method-add-officeimo-html-htmldiagnostic) parameter `diagnostic`
- Method [HtmlDiagnosticReport.AddRange](/api/html/officeimo-html-htmldiagnosticreport/#method-addrange-collections-generic-ienumerable-officeimo-html-htmldiagnostic) parameter `diagnostics`
- Method [HtmlRenderResult.WithAdditionalDiagnostics](/api/html/officeimo-html-htmlrenderresult/#method-withadditionaldiagnostics-collections-generic-ienumerable-officeimo-html-htmldiagnostic) parameter `diagnostics`
- Constructor [HtmlTextConversionResult.HtmlTextConversionResult](/api/html/officeimo-html-htmltextconversionresult/#constructor-ctor-string-collections-generic-ienumerable-officeimo-html-htmldiagnostic) parameter `diagnostics`

Filter members 

Show inherited

## Constructors

HtmlDiagnostic 2 overloads

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

[HtmlDiagnostic.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L25)

Creates a shared HTML diagnostic.

Parameters

**component string required**

Component that emitted the diagnostic, such as OfficeIMO.Word.Html.

**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, such as an exception type, status text, or limit data.

**lossKind OfficeIMO.OfficeConversionLossKind = None optional**

Conversion fidelity impact represented by the diagnostic.

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

[HtmlDiagnostic.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L38)

Creates a shared 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 HTML, resource, or artifact 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.

## Methods

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

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

Returns a string that represents the current object.

Returns

`string` A string that represents the current object.

`public HtmlDiagnostic WithProvenance(HtmlSemanticSourceLocation? sourceLocation, string targetAddress)` [#](#method-withprovenance-officeimo-html-htmlsemanticsourcelocation-string)

[HtmlDiagnostic.cs:106](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L106)

Creates an equivalent diagnostic with a more precise source and target address.

Parameters

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

**targetAddress string required**

Returns

`HtmlDiagnostic`

## 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`

## Properties

`public string Component { get; }` [#](#property-component)

[HtmlDiagnostic.cs:69](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L69)

Component that emitted the diagnostic.

`public string Code { get; }` [#](#property-code)

[HtmlDiagnostic.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L74)

Stable diagnostic code.

`public string Message { get; }` [#](#property-message)

[HtmlDiagnostic.cs:79](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L79)

Human-readable diagnostic message.

`public HtmlDiagnosticSeverity Severity { get; }` [#](#property-severity)

[HtmlDiagnostic.cs:84](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L84)

Diagnostic severity.

`public string? Source { get; }` [#](#property-source)

[HtmlDiagnostic.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L89)

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

`public string? Detail { get; }` [#](#property-detail)

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

Optional low-level detail, such as an exception type, status text, or limit data.

`public OfficeConversionLossKind LossKind { get; }` [#](#property-losskind)

[HtmlDiagnostic.cs:99](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Diagnostics/HtmlDiagnostic.cs#L99)

Describes whether this diagnostic represents approximation, omission, or complete conversion failure.

`public HtmlDiagnosticProvenance Provenance { get; }` [#](#property-provenance)

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

Stable source-to-target provenance. This is always present, with document/component fallbacks.

<!-- PowerForge markdown artifact sha256:B0862278F76E6CC021ED5447264E94722906499C9C5F52BB280155AFCA829F3D -->
