public void ProvideCodegen( CodegenMethod method, SAIFFInitializeSymbol symbols, CodegenClassScope classScope) { var factory = Ref("factory"); method.Block .DeclareVar<OutputProcessViewDirectFactory>( factory.Ref, NewInstance(typeof(OutputProcessViewDirectFactory))) .SetProperty( factory, "PostProcessFactory", _outputStrategyPostProcessForge == null ? ConstantNull() : _outputStrategyPostProcessForge.Make(method, symbols, classScope)) .MethodReturn(factory); }
public void ProvideCodegen( CodegenMethod method, SAIFFInitializeSymbol symbols, CodegenClassScope classScope) { method.Block.MethodReturn( NewInstance<OutputProcessViewDirectDistinctOrAfterFactory>( _outputStrategyPostProcessForge == null ? ConstantNull() : _outputStrategyPostProcessForge.Make(method, symbols, classScope), Constant(_isDistinct), MultiKeyCodegen.CodegenGetterEventDistinct( _isDistinct, ResultEventType, DistinctMultiKey, method, classScope), AfterTimePeriod == null ? ConstantNull() : AfterTimePeriod.TimePeriodComputeForge.MakeEvaluator(method, classScope), Constant(AfterConditionNumberOfEvents), EventTypeUtility.ResolveTypeCodegen(ResultEventType, symbols.GetAddInitSvc(method)))); }
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)); }