Ejemplo n.º 1
0
 public CodegenExpression Make(
     CodegenMethodScope parent,
     ModuleIndexesInitializeSymbol symbols,
     CodegenClassScope classScope)
 {
     return NewInstance<IndexDetail>(
         indexMultiKey.Make(parent, classScope),
         queryPlanIndexItem.Make(parent, classScope));
 }
Ejemplo n.º 2
0
        public CodegenMethod InitializeCodegen(
            CodegenMethodScope parent,
            SAIFFInitializeSymbol symbols,
            CodegenClassScope classScope)
        {
            CodegenMethod method = parent.MakeChild(
                typeof(StatementAgentInstanceFactoryCreateIndex),
                this.GetType(),
                classScope);
            CodegenExpressionRef saiff = Ref("saiff");
            method.Block
                .DeclareVar<StatementAgentInstanceFactoryCreateIndex>(
                    saiff.Ref,
                    NewInstance(typeof(StatementAgentInstanceFactoryCreateIndex)))
                .SetProperty(
                    saiff,
                    "EventType",
                    EventTypeUtility.ResolveTypeCodegen(eventType, symbols.GetAddInitSvc(method)))
                .SetProperty(saiff, "IndexName", Constant(indexName))
                .SetProperty(saiff, "IndexModuleName", Constant(indexModuleName))
                .SetProperty(saiff, "IndexMultiKey", imk.Make(method, classScope))
                .SetProperty(saiff, "ExplicitIndexDesc", explicitIndexDesc.Make(method, classScope));
            if (namedWindow != null) {
                method.Block.SetProperty(
                    saiff,
                    "NamedWindow",
                    NamedWindowDeployTimeResolver.MakeResolveNamedWindow(namedWindow, symbols.GetAddInitSvc(method)));
            }
            else {
                method.Block.SetProperty(
                    saiff,
                    "Table",
                    TableDeployTimeResolver.MakeResolveTable(table, symbols.GetAddInitSvc(method)));
            }

            method.Block.MethodReturn(saiff);
            return method;
        }