Veil.Parser.SyntaxTreeExpression.Field C# (CSharp) Method

Field() public static method

Evaluate a field on the model object
public static Field ( Type modelType, string fieldName, SourceLocation location, ExpressionScope scope = ExpressionScope.CurrentModelOnStack, int recursionLevel ) : FieldExpressionNode
modelType System.Type The type of the scoped model
fieldName string The name of the field
location SourceLocation
scope ExpressionScope The scope this expression evaluated in
recursionLevel int
return Veil.Parser.Nodes.FieldExpressionNode
	    public static FieldExpressionNode Field(Type modelType, string fieldName, SourceLocation location, ExpressionScope scope = ExpressionScope.CurrentModelOnStack, int recursionLevel = 0)
		{
			return new FieldExpressionNode
			{
				Location = location,
				FieldInfo = modelType.GetField(fieldName),
				Scope = scope,
                RecursionLevel = recursionLevel
			};
		}