Beispiel #1
0
 public CodegenExpression Make(
     CodegenMethod method,
     SAIFFInitializeSymbol symbols,
     CodegenClassScope classScope)
 {
     var resolveTable = table == null
         ? ConstantNull()
         : TableDeployTimeResolver.MakeResolveTable(table, symbols.GetAddInitSvc(method));
     var insertIntoStreamSelectorExpr = insertIntoStreamSelector == null
         ? ConstantNull()
         : EnumValue(typeof(SelectClauseStreamSelectorEnum), insertIntoStreamSelector.Value.GetName());
     
     return NewInstance<OutputStrategyPostProcessFactory>(
         Constant(isRouted),
         insertIntoStreamSelectorExpr,
         EnumValue(typeof(SelectClauseStreamSelectorEnum), selectStreamSelector.GetName()),
         Constant(routeToFront),
         resolveTable);
 }
Beispiel #2
0
 public void ProvideCodegen(
     CodegenMethod method,
     SAIFFInitializeSymbol symbols,
     CodegenClassScope classScope)
 {
     var spec = Ref("spec");
     method.Block
         .DeclareVar<OutputProcessViewConditionSpec>(
             spec.Ref,
             NewInstance(typeof(OutputProcessViewConditionSpec)))
         .SetProperty(
             spec,
             "ConditionType",
             EnumValue(typeof(ResultSetProcessorOutputConditionType), _conditionType.GetName()))
         .SetProperty(
             spec,
             "OutputConditionFactory",
             _outputConditionFactoryForge.Make(method, symbols, classScope))
         .SetProperty(
             spec,
             "StreamCount",
             Constant(_streamCount))
         .SetProperty(
             spec,
             "IsTerminable",
             Constant(_terminable))
         .SetProperty(
             spec,
             "SelectClauseStreamSelector",
             EnumValue(typeof(SelectClauseStreamSelectorEnum), _selectClauseStreamSelector.GetName()))
         .SetProperty(
             spec,
             "PostProcessFactory",
             _outputStrategyPostProcessForge == null
                 ? ConstantNull()
                 : _outputStrategyPostProcessForge.Make(method, symbols, classScope))
         .SetProperty(
             spec,
             "HasAfter",
             Constant(_hasAfter))
         .SetProperty(
             spec,
             "IsDistinct",
             Constant(_isDistinct))
         .SetProperty(
             spec,
             "DistinctKeyGetter",
             MultiKeyCodegen.CodegenGetterEventDistinct(
                 _isDistinct, _resultEventType, _distinctMultiKey, method, classScope))
         .SetProperty(
             spec,
             "ResultEventType",
             EventTypeUtility.ResolveTypeCodegen(_resultEventType, symbols.GetAddInitSvc(method)))
         .SetProperty(
             spec,
             "AfterTimePeriod",
             _afterTimePeriodExpr == null
                 ? ConstantNull()
                 : _afterTimePeriodExpr.TimePeriodComputeForge.MakeEvaluator(method, classScope))
         .SetProperty(
             spec,
             "AfterConditionNumberOfEvents",
             Constant(_afterNumberOfEvents))
         .SetProperty(
             spec,
             "IsUnaggregatedUngrouped",
             Constant(_unaggregatedUngrouped))
         .SetProperty(
             spec,
             "EventTypes",
             EventTypeUtility.ResolveTypeArrayCodegen(_eventTypes, EPStatementInitServicesConstants.REF))
         .MethodReturn(NewInstance<OutputProcessViewConditionFactory>(spec));
 }