Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

ReferenceExpressionBuilder

Handle
📦 Aspire.Hosting v17.0.0

A builder for creating ReferenceExpression instances.

type ReferenceExpressionBuilder interface{}

Properties

propertyIsEmptyboolget
Indicates whether the expression is empty.
IsEmpty() (bool, error)

Methods

Appends a formatted value to the expression.
AppendFormatted(
value string,
options ...*AppendFormattedOptions,
) error
valuestringThe formatted string to be appended to the interpolated string.
options...*AppendFormattedOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AppendFormattedOptions argument.

Format*stringThe format to be applied to the value. e.g., "uri"
error

Returns error.

Appends a literal value to the expression.
AppendLiteral(value string) error
valuestringThe literal string value to be appended to the interpolated string.
error

Returns error.

Appends a value provider to the reference expression
AppendValueProvider(
valueProvider any,
options ...*AppendValueProviderOptions,
) error
valueProvideranyThe value provider to append.
options...*AppendValueProviderOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AppendValueProviderOptions argument.

Format*stringOptional format specifier.
error

Returns error.

methodBuild
Builds the reference expression
Build() *ReferenceExpression
*ReferenceExpression

Returns a handle; failures surface later via Err().