# HtmlSrcSetParser

Parses HTML srcset attributes into URL and descriptor candidates.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[HtmlSrcSetParser.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Images/HtmlSrcSetParser.cs#L11)

**Modifiers**

static

Parses HTML srcset attributes into URL and descriptor candidates.

## Inheritance

- object
- HtmlSrcSetParser

Filter members 

Show inherited

## Methods

Enumerate 2 overloads

`public static IEnumerable<HtmlSrcSetCandidate> Enumerate(string? srcSet)` [#](#method-enumerate-string)

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

Enumerates a srcset value while preserving candidate descriptors.

Parameters

**srcSet string? required**

Returns

`IEnumerable<HtmlSrcSetCandidate>`

`public static IEnumerable<HtmlSrcSetCandidate> Enumerate(string? srcSet, int? maxCandidates)` [#](#method-enumerate-string-nullable-system-int32)

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

Enumerates a srcset value while preserving candidate descriptors, stopping after the requested number of candidates.

Parameters

**srcSet string? required**

**maxCandidates int? required**

Returns

`IEnumerable<HtmlSrcSetCandidate>`

Parse 2 overloads

`public static IReadOnlyList<HtmlSrcSetCandidate> Parse(string? srcSet)` [#](#method-parse-string)

[HtmlSrcSetParser.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Images/HtmlSrcSetParser.cs#L11)

Parses a srcset value while preserving candidate descriptors.

Parameters

**srcSet string? required**

Returns

`IReadOnlyList<HtmlSrcSetCandidate>`

`public static IReadOnlyList<HtmlSrcSetCandidate> Parse(string? srcSet, int? maxCandidates)` [#](#method-parse-string-nullable-system-int32)

[HtmlSrcSetParser.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Images/HtmlSrcSetParser.cs#L18)

Parses a srcset value while preserving candidate descriptors, stopping after the requested number of candidates.

Parameters

**srcSet string? required**

**maxCandidates int? required**

Returns

`IReadOnlyList<HtmlSrcSetCandidate>`

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

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