Skip to content
DocsTry Aspire
DocsTry

ReferenceExpressionBuilder Methods

ClassMethods9 members
A builder for creating ReferenceExpression instances.
Append(ReferenceExpressionBuilderInterpolatedStringHandler)Section titled Append(ReferenceExpressionBuilderInterpolatedStringHandler)
Appends an interpolated string to the expression.
public class ReferenceExpressionBuilder
{
public void Append(
in ReferenceExpressionBuilderInterpolatedStringHandler handler)
{
// ...
}
}
Appends a formatted value to the expression.
public class ReferenceExpressionBuilder
{
public void AppendFormatted(
string? value)
{
// ...
}
}
valuestring?The formatted string to be appended to the interpolated string.
AppendFormatted(string?, string?)Section titled AppendFormatted(string?, string?)
Appends a formatted value to the expression.
public class ReferenceExpressionBuilder
{
public void AppendFormatted(
string? value,
string? format = null)
{
// ...
}
}
valuestring?The formatted string to be appended to the interpolated string.
formatstring?optionalThe format to be applied to the value. e.g., "uri"
Appends a formatted value to the expression. The value must implement IValueProvider and IManifestExpressionProvider.
public class ReferenceExpressionBuilder
{
public void AppendFormatted<T>(
T valueProvider)
{
// ...
}
}
valueProviderTAn instance of an object which implements IValueProvider and IManifestExpressionProvider.
InvalidOperationException
AppendFormatted(ReferenceExpression, string)Section titled AppendFormatted(ReferenceExpression, string)
Appends the formatted value provided by the specified reference expression to the output.
public class ReferenceExpressionBuilder
{
public void AppendFormatted(
ReferenceExpression valueProvider,
string format)
{
// ...
}
}
valueProviderReferenceExpressionA reference expression that supplies the value to be formatted and appended.
formatstringA composite format string that specifies how the value should be formatted, or null to use the default format.
This method is marked obsolete only to prevent usages of this type explicitly.
Appends a formatted value to the expression. The value must implement IValueProvider and IManifestExpressionProvider.
public class ReferenceExpressionBuilder
{
public void AppendFormatted<T>(
T valueProvider,
string? format)
{
// ...
}
}
valueProviderTAn instance of an object which implements IValueProvider and IManifestExpressionProvider.
formatstring?The format to be applied to the value. e.g., "uri"
InvalidOperationException
Appends a literal value to the expression.
public class ReferenceExpressionBuilder
{
public void AppendLiteral(
string value)
{
// ...
}
}
valuestringThe literal string value to be appended to the interpolated string.
AppendValueProvider(object, string?)Section titled AppendValueProvider(object, string?)
Appends a value provider to the expression using late binding. The object must implement both IValueProvider and IManifestExpressionProvider, or be an ApplicationModel.IResourceBuilder`1 where T implements both interfaces.
public class ReferenceExpressionBuilder
{
public void AppendValueProvider(
object valueProvider,
string? format = null)
{
// ...
}
}
valueProviderobjectAn object that implements both interfaces, or an IResourceBuilder wrapping such an object.
formatstring?optionalOptional format specifier.
ArgumentExceptionThrown if the object doesn't implement the required interfaces.
Builds the ReferenceExpression.
public class ReferenceExpressionBuilder
{
public ReferenceExpression Build()
{
// ...
}
}