MetalamaAPI documentationAspect APIMetalama.​Framework.​Code.​Syntax­BuildersExpression­FactoryLiteral
Open sandboxFocus

Method Literal

Literal(Int32)

Returns an expression that represents a literal of type System.Int32 to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(int value)
Parameters
Type Name Description
System.Int32 value
Returns
Type Description
IExpression

Literal(UInt32, Boolean)

Returns an expression that represents a literal of type System.UInt32 to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(uint value, bool stronglyTyped = false)
Parameters
Type Name Description
System.UInt32 value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(Int16, Boolean)

Returns an expression that represents a literal of type System.Int16 to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(short value, bool stronglyTyped = false)
Parameters
Type Name Description
System.Int16 value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(UInt16, Boolean)

Returns an expression that represents a literal of type System.UInt16 to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(ushort value, bool stronglyTyped = false)
Parameters
Type Name Description
System.UInt16 value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(Int64, Boolean)

Returns an expression that represents a literal of type System.Int64 to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(long value, bool stronglyTyped = false)
Parameters
Type Name Description
System.Int64 value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(UInt64, Boolean)

Returns an expression that represents a literal of type System.UInt64 to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(ulong value, bool stronglyTyped = false)
Parameters
Type Name Description
System.UInt64 value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(Byte, Boolean)

Returns an expression that represents a literal of type System.Byte to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(byte value, bool stronglyTyped = false)
Parameters
Type Name Description
System.Byte value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(SByte, Boolean)

Returns an expression that represents a literal of type System.SByte to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(sbyte value, bool stronglyTyped = false)
Parameters
Type Name Description
System.SByte value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(Double, Boolean)

Returns an expression that represents a literal of type System.Double to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(double value, bool stronglyTyped = false)
Parameters
Type Name Description
System.Double value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(Single, Boolean)

Returns an expression that represents a literal of type System.Single to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(float value, bool stronglyTyped = false)
Parameters
Type Name Description
System.Single value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(Decimal, Boolean)

Returns an expression that represents a literal of type System.Decimal to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(Decimal value, bool stronglyTyped = false)
Parameters
Type Name Description
System.Decimal value

The literal value.

System.Boolean stronglyTyped

A value indicating if the literal should be qualified to remove any type ambiguity, for instance if the literal can only represent an System.Int32.

Returns
Type Description
IExpression

Literal(String, Boolean)

Returns an expression that represents a literal of type System.String to the System.Text.StringBuilder.

Declaration
public static IExpression Literal(string value, bool stronglyTyped = false)
Parameters
Type Name Description
System.String value

The literal value.

System.Boolean stronglyTyped

A value indicating if the null value should be qualified as (string?) null.

Returns
Type Description
IExpression