public void Setup() { _windsor = new WindsorContainer(); var facility = new DarkFlowFacility() .RouteTasks(x => x.ByNamespace("Codestellation.*").To("someExecutor")) .PersistTasks(x => { //TODO: Calls to To() are ugly, because they are completely ignored. Need more elegant solution to this. x.ByNamespace("Codestellation.*").To("xx"); x.MarkedWith(typeof(MarkerAttribute)).To("xx"); }); _windsor.AddFacility(facility); _windsor.Register( Component .For<TaskInterceptor>() .LifestyleTransient()); _releaser = _windsor.Resolve<ITaskReleaser>(); }
private void AddCodedFacility() { var facility = new DarkFlowFacility() .EnableMonitoring() .MaxConcurrency(4) .UsingInMemoryPersistence() .WithQueuedExecutor(new QueuedExecutorSettings {Name = "someExecutor"}) .RouteTasks(x => { x.ByNamespace("Codestellation.*").To("someExecutor"); x.MarkedWith<MarkerAttribute>().To("someExecutor"); x.ByContent("executor.{Name}").CacheEnvironments(); }) .PersistTasks(x => { //TODO: Calls to To() are ugly, because they are completely ignored. Need more elegant solution to this. x.ByNamespace("Codestellation.*").To("xx"); x.MarkedWith<MarkerAttribute>().To("xx"); }); _windsor.AddFacility(facility); }
private void AddXmlConfiguredFacility() { var facility = new DarkFlowFacility().ConfigureFromXml(); _windsor.AddFacility(facility); }