Class InterpolationExpression
Represents string interpolation expression.
Namespace: DotNext.Linq.Expressions
Assembly: DotNext.Metaprogramming.dll
Syntax
public sealed class InterpolationExpression : Expression
Properties
| Improve this Doc View SourceArguments
Returns a collection that contains one or more objects to format.
Declaration
public IReadOnlyList<Expression> Arguments { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<Expression> |
CanReduce
Always returns true because
this expression is
Declaration
public override bool CanReduce { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Format
Gets formatting pattern.
Declaration
public string Format { get; }
Property Value
| Type | Description |
|---|---|
| String |
NodeType
Always returns
Declaration
public override ExpressionType NodeType { get; }
Property Value
| Type | Description |
|---|---|
| ExpressionType |
Type
Gets type of this expression.
Declaration
public override Type Type { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Remarks
May be
Methods
| Improve this Doc View SourceFormattableString(FormattableString)
Returns string interpolation expression which produces
instance of
Declaration
public static InterpolationExpression FormattableString(FormattableString str)
Parameters
| Type | Name | Description |
|---|---|---|
| FormattableString | str | Formatting pattern and actual arguments. |
Returns
| Type | Description |
|---|---|
| InterpolationExpression | String interpolation expression. |
PlainString(FormattableString)
Returns string interpolation expression which produces
formatted string as
Declaration
public static InterpolationExpression PlainString(FormattableString str)
Parameters
| Type | Name | Description |
|---|---|---|
| FormattableString | str | Formatting pattern and actual arguments. |
Returns
| Type | Description |
|---|---|
| InterpolationExpression | String interpolation expression. |
Reduce()
Translates this expression into predefined set of expressions using Lowering technique.
Declaration
public override Expression Reduce()
Returns
| Type | Description |
|---|---|
| Expression | Translated expression. |