# HtmlCapabilityGalleryArtifact

Describes one artifact emitted by an HTML capability-gallery scenario.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

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

**Modifiers**

sealed

Describes one artifact emitted by an HTML capability-gallery scenario.

## Inheritance

- object
- HtmlCapabilityGalleryArtifact

## Usage

Explore 6 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

- Method [HtmlCapabilityGalleryArtifact.FromFile](/api/html/officeimo-html-htmlcapabilitygalleryartifact/#method-fromfile-string-string-string-string)
- Method [HtmlCapabilityGalleryArtifact.WithEvidence](/api/html/officeimo-html-htmlcapabilitygalleryartifact/#method-withevidence-officeimo-html-htmlcapabilitygalleryartifactevidence)
- Method [HtmlCapabilityGalleryArtifact.WriteTextFile](/api/html/officeimo-html-htmlcapabilitygalleryartifact/#method-writetextfile-string-string-string-string-string)
- Property [HtmlCapabilityGalleryResult.Artifacts](/api/html/officeimo-html-htmlcapabilitygalleryresult/#property-artifacts)

### Accepted by parameters 2

- 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 `artifacts`
- Method [HtmlCapabilityGalleryResult.AddArtifact](/api/html/officeimo-html-htmlcapabilitygalleryresult/#method-addartifact-officeimo-html-htmlcapabilitygalleryartifact) parameter `artifact`

Filter members 

Show inherited

## Constructors

`public HtmlCapabilityGalleryArtifact(string id, string kind, string path, string mediaType, long length, string sha256)` [#](#constructor-ctor-string-string-string-string-int64-string)

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

Creates an artifact descriptor.

Parameters

**id string required**

Stable artifact identifier within the scenario.

**kind string required**

Artifact kind, such as input-html, docx, or roundtrip-html.

**path string required**

Artifact file path.

**mediaType string required**

Artifact media type.

**length long required**

Artifact length in bytes.

**sha256 string required**

Lowercase hexadecimal SHA-256 hash of the artifact bytes.

## Methods

`public static HtmlCapabilityGalleryArtifact FromFile(string id, string kind, string path, string mediaType)` [#](#method-fromfile-string-string-string-string)

[HtmlCapabilityGalleryArtifact.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Gallery/HtmlCapabilityGalleryArtifact.cs#L37)

Creates an artifact descriptor from an existing file.

Parameters

**id string required**

Stable artifact identifier within the scenario.

**kind string required**

Artifact kind, such as input-html, docx, or roundtrip-html.

**path string required**

Artifact file path.

**mediaType string required**

Artifact media type.

Returns

`HtmlCapabilityGalleryArtifact` A descriptor containing file length and SHA-256 hash.

`public HtmlCapabilityGalleryArtifact WithEvidence(HtmlCapabilityGalleryArtifactEvidence evidence)` [#](#method-withevidence-officeimo-html-htmlcapabilitygalleryartifactevidence)

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

Returns a descriptor with immutable artifact observations attached.

Parameters

**evidence OfficeIMO.Html.HtmlCapabilityGalleryArtifactEvidence required**

Returns

`HtmlCapabilityGalleryArtifact`

`public static HtmlCapabilityGalleryArtifact WriteTextFile(string id, string kind, string path, string mediaType, string content)` [#](#method-writetextfile-string-string-string-string-string)

[HtmlCapabilityGalleryArtifact.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Gallery/HtmlCapabilityGalleryArtifact.cs#L56)

Writes text content to an artifact file and returns its descriptor.

Parameters

**id string required**

Stable artifact identifier within the scenario.

**kind string required**

Artifact kind, such as semantic-html or manifest-json.

**path string required**

Artifact file path.

**mediaType string required**

Artifact media type.

**content string required**

Text content to write.

Returns

`HtmlCapabilityGalleryArtifact` A descriptor containing file length and SHA-256 hash.

## 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 string Id { get; }` [#](#property-id)

[HtmlCapabilityGalleryArtifact.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Gallery/HtmlCapabilityGalleryArtifact.cs#L70)

Stable artifact identifier within the scenario.

`public string Kind { get; }` [#](#property-kind)

[HtmlCapabilityGalleryArtifact.cs:75](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Gallery/HtmlCapabilityGalleryArtifact.cs#L75)

Artifact kind, such as input-html, docx, or roundtrip-html.

`public string Path { get; }` [#](#property-path)

[HtmlCapabilityGalleryArtifact.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Gallery/HtmlCapabilityGalleryArtifact.cs#L80)

Artifact file path.

`public string MediaType { get; }` [#](#property-mediatype)

[HtmlCapabilityGalleryArtifact.cs:85](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Gallery/HtmlCapabilityGalleryArtifact.cs#L85)

Artifact media type.

`public long Length { get; }` [#](#property-length)

[HtmlCapabilityGalleryArtifact.cs:90](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Gallery/HtmlCapabilityGalleryArtifact.cs#L90)

Artifact length in bytes.

`public string Sha256 { get; }` [#](#property-sha256)

[HtmlCapabilityGalleryArtifact.cs:95](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Gallery/HtmlCapabilityGalleryArtifact.cs#L95)

Lowercase hexadecimal SHA-256 hash of the artifact bytes.

`public HtmlCapabilityGalleryArtifactEvidence? Evidence { get; private set; }` [#](#property-evidence)

[HtmlCapabilityGalleryArtifact.cs:98](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Gallery/HtmlCapabilityGalleryArtifact.cs#L98)

Optional observations captured from the operation that produced these exact bytes.

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