Skip to content
Auto
Products

IExpressionMemberResolverContext

Namespace: TagBites.Expressions
Assembly: TagBites.Expressions.dll
Product: TagBites.Expressions v. 1.5.0

Provides data for a ExpressionParserOptions.CustomPropertyResolver call.

public interface IExpressionMemberResolverContext

The resolver is called for a member access on an instance (instance.Member). Return the expression that reads the member, or null to let the parser resolve it in the usual way.

Gets the expression the member is accessed on.

public virtual Expression Instance { get; }

Expression

Gets the type info attached to Instance by an earlier IncludeTypeInfo(Expression, object) call, or null when there is none.

public virtual object InstanceTypeInfo { get; }

object

For an element of a sequence this is the type info of the sequence, so a lambda parameter keeps the info attached to the collection it iterates.

Gets the full member path from the root of the expression (for example this.Person.Name), or null when the path is not known.

public virtual string MemberFullPath { get; }

string

Gets the name of the accessed member.

public virtual string MemberName { get; }

string

Returns the parameter of the resulting lambda with the given name.

public virtual ParameterExpression GetParameter(string name)
  • name string
    The parameter name.

ParameterExpression

The parameter expression.

Attaches type info to an expression, so a later member access on it can read the info back through InstanceTypeInfo.

public virtual Expression IncludeTypeInfo(Expression expression, object typeInfo)
  • expression Expression
    The expression to attach the info to.
  • typeInfo object
    The type info to attach.

Expression

The expression carrying the type info.