Exemple #1
0
 public void TestInit()
 {
     MEFUtilities.MyClassInit();
     MEFUtilities.AddPart(new TypeHandlers.TypeHandlerConvert());
     MEFUtilities.AddPart(new ROSum());
     DummyQueryExectuor.GlobalInitalized = false;
 }
Exemple #2
0
        public void Setup()
        {
            TestUtils.ResetLINQLibrary();
            MEFUtilities.AddPart(new QVResultOperators());
            MEFUtilities.AddPart(new TypeHandlerCache());
            MEFUtilities.AddPart(new DealWithInt32());

            MEFUtilities.AddPart(new ArrayArrayInfoFactory());
            MEFUtilities.AddPart(new SubQueryArrayTypeFactory());
            MEFUtilities.AddPart(new SubQueryExpressionArrayInfoFactory());
            MEFUtilities.AddPart(new TranslatedArrayInfoFactory());
            MEFUtilities.AddPart(new EnumerableRangeArrayTypeFactory());
            MEFUtilities.AddPart(new GroupByFactory());
            MEFUtilities.AddPart(new GroupByArrayFactory());
            MEFUtilities.AddPart(new MemberAccessArrayTypeFactory());

            MEFUtilities.AddPart(new ROTakeSkipOperators());
            MEFUtilities.AddPart(new ROFirstLast());
            MEFUtilities.AddPart(new ROCount());

            GeneratedCode gc = new GeneratedCode();
            CodeContext   cc = new CodeContext();
            var           qv = new QueryVisitor(gc, cc, MEFUtilities.MEFContainer);

            MEFUtilities.Compose(qv);
        }
 public void Setup()
 {
     TestUtils.ResetLINQLibrary();
     MEFUtilities.AddPart(new TypeHandlerROOT());
     MEFUtilities.AddPart(new TypeHandlerHelpers());
     MEFUtilities.Compose(new TypeHandlerCache());
 }
Exemple #4
0
        public void Setup()
        {
            TestUtils.ResetLINQLibrary();
            MEFUtilities.AddPart(new QVResultOperators());
            MEFUtilities.AddPart(new TypeHandlerCache());
            MEFUtilities.AddPart(new DealWithMyTypes());
            GeneratedCode gc = new GeneratedCode();
            CodeContext   cc = new CodeContext();
            var           qv = new QueryVisitor(gc, cc, MEFUtilities.MEFContainer);

            MEFUtilities.Compose(qv);
        }
Exemple #5
0
        private void CommonExecute(QueryModel queryModel)
        {
            LastQueryModel = queryModel;

            Result = new GeneratedCode();
            if (DoQMFunctions)
            {
                foreach (var f in LINQToTTreeLib.QMFunctions.QMFuncFinder.FindQMFunctions(queryModel))
                {
                    if (!f.Arguments.Any())
                    {
                        Result.Add(new QMFuncSource(f));
                    }
                }
            }

            if (!_doExecution)
            {
                return;
            }

            if (!GlobalInitalized)
            {
                GlobalInitalized = true;
                MEFUtilities.AddPart(new QVResultOperators());
                MEFUtilities.AddPart(new ROCount());
                MEFUtilities.AddPart(new ROTakeSkipOperators());
                MEFUtilities.AddPart(new ROAggregate());
                MEFUtilities.AddPart(new ROMinMax());
                MEFUtilities.AddPart(new ROAnyAll());
                MEFUtilities.AddPart(new ROUniqueCombinations());
                MEFUtilities.AddPart(new ROAsCSV());
                MEFUtilities.AddPart(new ROAsTTree());
                MEFUtilities.AddPart(new ROPairWiseAll());
                MEFUtilities.AddPart(new ROAsQueriable());
                MEFUtilities.AddPart(new ROSum());
                MEFUtilities.AddPart(new ROFirstLast());
                MEFUtilities.AddPart(new ROGroup());

                MEFUtilities.AddPart(new TypeHandlerROOT());
                MEFUtilities.AddPart(new TypeHandlerHelpers());
                MEFUtilities.AddPart(new TypeHandlerReplacementCall());
                MEFUtilities.AddPart(new TypeHandlerCache());
                MEFUtilities.AddPart(new TypeHandlerCPPCode());
                MEFUtilities.AddPart(new TypeHandlerOnTheFlyCPP());
                MEFUtilities.AddPart(new TypeHandlerTranslationClass());
                MEFUtilities.AddPart(new TypeHandlerConvert());
                MEFUtilities.AddPart(new GroupByArrayFactory());
                MEFUtilities.AddPart(new GroupByFactory());

                MEFUtilities.AddPart(new ArrayArrayInfoFactory());
                MEFUtilities.AddPart(new EnumerableRangeArrayTypeFactory());
                MEFUtilities.AddPart(new SubQueryArrayTypeFactory());
                MEFUtilities.AddPart(new TranslatedArrayInfoFactory());
                MEFUtilities.AddPart(new MemberAccessArrayTypeFactory());
                MEFUtilities.AddPart(new HandleGroupType());
                MEFUtilities.AddPart(new SubQueryExpressionArrayInfoFactory());

                //var b = new CompositionBatch();
                //b.AddPart(new DataSchemeHandlerFile());
                //b.AddPart(new DataSchemeHandlerRemoteBash());
                //b.AddPart(new DataSchemeHandlerLocalBash());
                //b.AddPart(new DataSchemeHandlerLocalWin());
                //b.AddPart(new DataSchemeHandlerProof());
                //b.AddPart(new CommandLineExecutorFactory());
                //b.AddPart(new LocalBashExecutorFactory());
                //b.AddPart(new RemoteBashExecutorFactory());
                //TTreeQueryExecutor.CContainer.Compose(b);

                MEFUtilities.AddPart(new AdderInt());
            }

            var cc = new CodeContext()
            {
                BaseNtupleObjectType = _baseType
            };

            cc.SetTopLevelQuery(queryModel);
            var qv = new QueryVisitor(Result, cc, MEFUtilities.MEFContainer);

            MEFUtilities.Compose(qv);

            MEFInitialPartCount = MEFUtilities.CountParts();

            qv.VisitQueryModel(queryModel);

            FinalResult = Result;
        }