/// <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;
        }
Exemple #2
0
 public SelectScope(object selectValue, Scope scope) : base(scope)
 {
     _selectValue = selectValue;
 }
Exemple #3
0
 public Scope(Scope scope)
 {
     boundVariables = new Dictionary<string, object>();
     parentScope = scope;
 }
Exemple #4
0
 public Scope()
 {
     boundVariables = new Dictionary<string, object>();
     parentScope = null;
 }