using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Jace.Operations { public class Function : Operation { private IList arguments; public Function(DataType dataType, string functionName, IList arguments, bool isIdempotent) : base(dataType, arguments.FirstOrDefault(o => o.DependsOnVariables) != null, isIdempotent && arguments.All(o => o.IsIdempotent)) { this.FunctionName = functionName; this.arguments = arguments; } public string FunctionName { get; private set; } public IList Arguments { get { return arguments; } internal set { this.arguments = value; this.DependsOnVariables = arguments.FirstOrDefault(o => o.DependsOnVariables) != null; } } } }