Skip to content
Docs Try Aspire

ReferenceExpression Methods

Class Methods 3 members
Represents an expression that might be made up of multiple resource properties. For example, a connection string might be made up of a host, port, and password from different endpoints.
Creates a new instance of ReferenceExpression with the specified format and value providers.
public class ReferenceExpression
{
public static ReferenceExpression Create(
in ExpressionInterpolatedStringHandler handler)
{
// ...
}
}
handler ExpressionInterpolatedStringHandler The handler that contains the format and value providers.
ReferenceExpression A new instance of ReferenceExpression with the specified format and value providers.
GetValueAsync(ValueProviderContext, CancellationToken) Section titled GetValueAsync(ValueProviderContext, CancellationToken) ValueTask<string?>
Gets the value of the expression. The final string value after evaluating the format string and its parameters.
public class ReferenceExpression
{
public ValueTask<string?> GetValueAsync(
ValueProviderContext context,
CancellationToken cancellationToken)
{
// ...
}
}
context ValueProviderContext A context for resolving the value.
cancellationToken CancellationToken A Threading.CancellationToken.
GetValueAsync(CancellationToken) Section titled GetValueAsync(CancellationToken) ValueTask<string?>
Gets the value of the expression. The final string value after evaluating the format string and its parameters.
public class ReferenceExpression
{
public ValueTask<string?> GetValueAsync(
CancellationToken cancellationToken)
{
// ...
}
}
cancellationToken CancellationToken A Threading.CancellationToken.