Skip to content
Docs Try Aspire

ExpressionInterpolatedStringHandler Methods

Struct Methods 8 members
Represents a handler for interpolated strings that contain expressions. Those expressions will either be literal strings or instances of types that implement both IValueProvider and IManifestExpressionProvider.
Appends a formatted value to the expression.
public struct ExpressionInterpolatedStringHandler
{
public readonly void AppendFormatted(
string? value)
{
// ...
}
}
value string? 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 struct ExpressionInterpolatedStringHandler
{
public readonly void AppendFormatted(
string? value,
string? format = null)
{
// ...
}
}
value string? The formatted string to be appended to the interpolated string.
format string? optional The 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 struct ExpressionInterpolatedStringHandler
{
public void AppendFormatted<T>(
T valueProvider)
{
// ...
}
}
valueProvider T An 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 struct ExpressionInterpolatedStringHandler
{
public void AppendFormatted(
ReferenceExpression valueProvider,
string format)
{
// ...
}
}
valueProvider ReferenceExpression A reference expression that supplies the value to be formatted and appended.
format string A 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 struct ExpressionInterpolatedStringHandler
{
public void AppendFormatted<T>(
T valueProvider,
string? format = null)
{
// ...
}
}
valueProvider T An instance of an object which implements IValueProvider and IManifestExpressionProvider.
format string? optional The format to be applied to the value. e.g., "uri"
InvalidOperationException
AppendFormatted(IResourceBuilder<T>) Section titled AppendFormatted(IResourceBuilder<T>)
Appends a formatted value to the expression. The value must implement IValueProvider and IManifestExpressionProvider.
public struct ExpressionInterpolatedStringHandler
{
public void AppendFormatted<T>(
IResourceBuilder<T> valueProvider)
{
// ...
}
}
valueProvider IResourceBuilder<T> An instance of an object which implements IValueProvider and IManifestExpressionProvider.
InvalidOperationException
AppendFormatted(IResourceBuilder<T>, string?) Section titled AppendFormatted(IResourceBuilder<T>, string?)
Appends a formatted value to the expression. The value must implement IValueProvider and IManifestExpressionProvider.
public struct ExpressionInterpolatedStringHandler
{
public void AppendFormatted<T>(
IResourceBuilder<T> valueProvider,
string? format = null)
{
// ...
}
}
valueProvider IResourceBuilder<T> An instance of an object which implements IValueProvider and IManifestExpressionProvider.
format string? optional The format to be applied to the value. e.g., "uri"
InvalidOperationException
Appends a literal value to the expression.
public struct ExpressionInterpolatedStringHandler
{
public readonly void AppendLiteral(
string value)
{
// ...
}
}
value string The literal string value to be appended to the interpolated string.