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
languagesstring[]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
fieldNamesstring[]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
valuestringThe 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
uristringThe 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
eTagEntityTagValueThe 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
lastModifiedDateTimeOffsetThe 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
opaqueTagstringThe 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
opaqueTagstringThe opaque tag string.
Returns
- RepresentationMetadata.Builder
This builder instance for method chaining.