Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code.​Syntax­Builders / Expression­Factory / To­Expression

Method ToExpression

ToExpression(IFieldOrProperty, IExpression)

Gets an IExpression that represents a given field or property.

Declaration
public static IExpression ToExpression(this IFieldOrProperty fieldOrProperty, IExpression instance = null)
Parameters
Type Name Description
IFieldOrProperty fieldOrProperty

A field or property.

IExpression instance

An expression representing the instance. This argument is ignored for static members. Its default value is the this expression.

Returns
Type Description
IExpression

ToExpression(IParameter)

Gets an IExpression that represents a given parameter.

Declaration
public static IExpression ToExpression(this IParameter parameter)
Parameters
Type Name Description
IParameter parameter

A parameter.

Returns
Type Description
IExpression