Example #1
0
        internal BatchLoadInfo[] GetBachInfos()
        {
            var tails   = this.myDependencies.GetTails();
            var sources = this.myDependencies.GetSources(tails);
            var result  = this.myDependencies.TopologicalSort(sources);
            var infos   = new BatchLoadInfo[result.Count - 1 + 1];
            var num     = result.Count - 1;

            for (var i = 0; i <= num; i++)
            {
                infos[i] = this.myNameInfoMap[result[i]];
            }
            return(infos);
        }
Example #2
0
 private void DoBatchLoadAdd(BatchLoadInfo info)
 {
     try
     {
         this.Add(info.Name, info.ExpressionText, info.Context);
     }
     catch (ExpressionCompileException expr_1D)
     {
         ProjectData.SetProjectError(expr_1D);
         var ex = expr_1D;
         this.Clear();
         throw new BatchLoadCompileException(info.Name, info.ExpressionText, ex);
     }
 }
Example #3
0
        public void Add(string atomName, string expression, ExpressionContext context)
        {
            Utility.AssertNotNull(atomName, "atomName");
            Utility.AssertNotNull(expression, "expression");
            Utility.AssertNotNull(context, "context");
            var info = new BatchLoadInfo(atomName, expression, context);

            this.myNameInfoMap.Add(atomName, info);
            this.myDependencies.AddTail(atomName);
            var references = this.GetReferences(expression, context);

            foreach (var reference in references)
            {
                this.myDependencies.AddTail(reference);

                this.myDependencies.AddDepedency(reference, atomName);
            }
        }