public StmtClassForgableStmtProvider( string statementAIFactoryClassName, string statementProviderClassName, StatementInformationalsCompileTime statementInformationals, CodegenNamespaceScope namespaceScope) { _statementAiFactoryClassName = statementAIFactoryClassName; ClassName = statementProviderClassName; _statementInformationals = statementInformationals; _namespaceScope = namespaceScope; }
public StmtForgeMethodResult Make( string @namespace, string classPostfix, StatementCompileTimeServices services) { string objectName = Register(services); // define output event type string statementEventTypeName = services.EventTypeNameGeneratorStatement.AnonymousTypeName; EventTypeMetadata statementTypeMetadata = new EventTypeMetadata( statementEventTypeName, _base.ModuleName, EventTypeTypeClass.STATEMENTOUT, EventTypeApplicationType.MAP, NameAccessModifier.TRANSIENT, EventTypeBusModifier.NONBUS, false, EventTypeIdPair.Unassigned()); EventType statementEventType = BaseNestableEventUtil.MakeMapTypeCompileTime( statementTypeMetadata, EmptyDictionary <string, object> .Instance, null, null, null, null, services.BeanEventTypeFactoryPrivate, services.EventTypeCompileTimeResolver); services.EventTypeCompileTimeRegistry.NewType(statementEventType); string statementFieldsClassName = CodeGenerationIDGenerator.GenerateClassNameSimple(typeof(StatementFields), classPostfix); CodegenNamespaceScope namespaceScope = new CodegenNamespaceScope( @namespace, statementFieldsClassName, services.IsInstrumented); string aiFactoryProviderClassName = CodeGenerationIDGenerator.GenerateClassNameSimple(typeof(StatementAIFactoryProvider), classPostfix); StmtClassForgeable aiFactoryForgeable = AiFactoryForgable(aiFactoryProviderClassName, namespaceScope, statementEventType, objectName); SelectSubscriberDescriptor selectSubscriberDescriptor = new SelectSubscriberDescriptor(); StatementInformationalsCompileTime informationals = StatementInformationalsUtil.GetInformationals( _base, EmptyList <FilterSpecCompiled> .Instance, EmptyList <ScheduleHandleCallbackProvider> .Instance, EmptyList <NamedWindowConsumerStreamSpec> .Instance, false, selectSubscriberDescriptor, namespaceScope, services); informationals.Properties.Put(StatementProperty.CREATEOBJECTNAME, objectName); string statementProviderClassName = CodeGenerationIDGenerator.GenerateClassNameSimple(typeof(StatementProvider), classPostfix); StmtClassForgeableStmtProvider stmtProvider = new StmtClassForgeableStmtProvider( aiFactoryProviderClassName, statementProviderClassName, informationals, namespaceScope); var stmtClassForgeableStmtFields = new StmtClassForgeableStmtFields( statementFieldsClassName, namespaceScope, 1); IList <StmtClassForgeable> forgeables = new List <StmtClassForgeable>(); forgeables.Add(aiFactoryForgeable); forgeables.Add(stmtProvider); forgeables.Add(stmtClassForgeableStmtFields); return(new StmtForgeMethodResult( forgeables, EmptyList <FilterSpecCompiled> .Instance, EmptyList <ScheduleHandleCallbackProvider> .Instance, EmptyList <NamedWindowConsumerStreamSpec> .Instance, EmptyList <FilterSpecParamExprNodeForge> .Instance)); }