public SubcriptionIncomingEvent(IFactoryBroker brokers, EngineGeneratorConfiguration configuration, WebEngineProvider provider, KilledGracefulInterceptor killed)
     : base("Service consume incoming event.")
 {
     _provider          = provider;
     _domainHeader      = configuration.EngineGeneratorModel.DomainHeader;
     Subscription       = brokers.CreateSubscription(configuration.EngineGeneratorModel.WorkflowQueue, context => Callback(context));
     _deadQueue         = brokers.CreatePublisher(configuration.EngineGeneratorModel.PublishDeadQueueWorkflow);
     _killed            = killed;
     _killed.StopAction = this.PrepareStop;
 }
Esempio n. 2
0
        public EngineGenerator(EngineGeneratorConfiguration configuration)
        {
            this.Services       = configuration.Services;
            this._configuration = configuration;

            this._methods   = new Dictionary <string, MethodInfo>();
            this.serializer = new JsonWorkflowSerializer();

            this._templateTypes = new Type[] { typeof(TemplatesProviders) };
            this._metadataTypes = new Type[] { typeof(MatadataProviders) };
        }
Esempio n. 3
0
        /// <summary>
        /// IOC inject configuration because EngineConfigurationModel is registered in ioc by ExposeClassAttribute
        /// </summary>
        /// <param name="configuration"></param>
        public WebEngineProvider(EngineGeneratorConfiguration configuration, KilledGracefulInterceptor killer)
            : base(configuration)
        {
            this._killer            = killer;
            this._killer.StopAction = this.Stop;

            var domains = configuration.EngineConfiguration.Domains;

            if (domains != null)
            {
                foreach (EngineProviderConfiguration config in domains)
                {
                    this.Add(config.Domain, config.Path);
                }
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="path"></param>
 public EngineFactory(EngineGeneratorConfiguration configuration)
 {
     this._engineCreator = new EngineGenerator <RunContext>(configuration);
 }
Esempio n. 5
0
 public EngineProvider(EngineGeneratorConfiguration configuration)
 {
     this._configuration = configuration;
     this._last          = new Queue <WorkflowEngine>();
 }