/// <summary> /// Converts a list of applicative groups into a Haxl monad. /// </summary> public static Haxl ToFetch(List<ApplicativeGroup> split, string parentBind, Scope parentScope) { if (parentScope == null) parentScope = Scope.New(); Haxl finalFetch = null; Action<Func<Scope, Haxl>> bindToFinal = f => { finalFetch = finalFetch == null ? f(parentScope) : finalFetch.Bind(f); }; foreach (var applicative in split) { bindToFinal(ApplicativeToHaxl(applicative, parentBind)); } return finalFetch; }
public SelectScope(object selectValue, Scope scope) : base(scope) { _selectValue = selectValue; }
public Scope(Scope scope) { boundVariables = new Dictionary<string, object>(); parentScope = scope; }
public Scope() { boundVariables = new Dictionary<string, object>(); parentScope = null; }