Table of Contents

Class RepresentationMetadata.Builder

Namespace
Trellis
Assembly
Trellis.Results.dll

Fluent builder for constructing RepresentationMetadata instances.

public sealed class RepresentationMetadata.Builder
Inheritance
RepresentationMetadata.Builder
Inherited Members
Extension Methods

Methods

AddContentLanguage(params string[])

Adds one or more Content-Language values.

public RepresentationMetadata.Builder AddContentLanguage(params string[] languages)

Parameters

languages string[]

The language tags for the selected representation.

Returns

RepresentationMetadata.Builder

This builder instance for method chaining.

AddVary(params string[])

Adds one or more Vary field names, deduplicating case-insensitively.

public RepresentationMetadata.Builder AddVary(params string[] fieldNames)

Parameters

fieldNames string[]

The request header field names that influenced representation selection.

Returns

RepresentationMetadata.Builder

This builder instance for method chaining.

Build()

Builds the RepresentationMetadata instance from the current builder state.

public RepresentationMetadata Build()

Returns

RepresentationMetadata

A new RepresentationMetadata instance.

SetAcceptRanges(string)

Sets the Accept-Ranges value.

public RepresentationMetadata.Builder SetAcceptRanges(string value)

Parameters

value string

The accept-ranges value (e.g., "bytes" or "none").

Returns

RepresentationMetadata.Builder

This builder instance for method chaining.

SetContentLocation(string)

Sets the Content-Location URI.

public RepresentationMetadata.Builder SetContentLocation(string uri)

Parameters

uri string

The URI for the selected representation.

Returns

RepresentationMetadata.Builder

This builder instance for method chaining.

SetETag(EntityTagValue)

Sets the entity tag value.

public RepresentationMetadata.Builder SetETag(EntityTagValue eTag)

Parameters

eTag EntityTagValue

The entity tag.

Returns

RepresentationMetadata.Builder

This builder instance for method chaining.

SetLastModified(DateTimeOffset)

Sets the last modification date.

public RepresentationMetadata.Builder SetLastModified(DateTimeOffset lastModified)

Parameters

lastModified DateTimeOffset

The last modification date.

Returns

RepresentationMetadata.Builder

This builder instance for method chaining.

SetStrongETag(string)

Sets a strong entity tag from an opaque tag string.

public RepresentationMetadata.Builder SetStrongETag(string opaqueTag)

Parameters

opaqueTag string

The opaque tag string.

Returns

RepresentationMetadata.Builder

This builder instance for method chaining.

SetWeakETag(string)

Sets a weak entity tag from an opaque tag string.

public RepresentationMetadata.Builder SetWeakETag(string opaqueTag)

Parameters

opaqueTag string

The opaque tag string.

Returns

RepresentationMetadata.Builder

This builder instance for method chaining.