MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeISource­Expression
Open sandboxFocus

ISourceExpression Interface

Represents an IExpression defined in source code, as opposed to a generated expression.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
public interface ISourceExpression : IExpression, IHasType

Properties

Name Description
AsFullString

Gets the string representing the current expression, including original whitespaces.

AsString

Gets the string representing the current expression, with normalize whitespaces.

AsSyntaxNode

Gets the source Roslyn object representing the current expression.

AsTypedConstant

Gets the TypedConstant corresponding to the current expression, or null if the current expression cannot be represented as a TypedConstant.

Extension Methods

ExpressionFactory.CastTo(IExpression, IType)
ExpressionFactory.CastTo(IExpression, Type)
ExpressionFactory.CastTo<T>(IExpression)