public NodeChangedEventMaker(Event eventInstance, Type fireHandlerType, Type completeHandlerType, HandlerCollector handlerCollector) { this.eventInstance = eventInstance; this._fireHandlerType = fireHandlerType; this._completeHandlerType = completeHandlerType; this.handlerCollector = handlerCollector; }
public static ICollection <Handler> CollectHandlers(HandlerCollector handlerCollector, Type handlerType, ICollection <NodeDescription> changedNodes) { Collections.Enumerator <NodeDescription> enumerator = Collections.GetEnumerator <NodeDescription>(changedNodes); enumerator.MoveNext(); ICollection <Handler> handlers = handlerCollector.GetHandlers(handlerType, enumerator.Current); if (!enumerator.MoveNext()) { return(handlers); } List <Handler> list = new List <Handler>(handlers); while (true) { list.AddRange(handlerCollector.GetHandlers(handlerType, enumerator.Current)); if (!enumerator.MoveNext()) { return(list); } } }
protected override void Activate() { TemplateRegistryImpl service = new TemplateRegistryImpl(); ServiceRegistry.Current.RegisterService <TemplateRegistry>(service); ServiceRegistry.Current.RegisterService <ConfigEntityLoader>(new ConfigEntityLoaderImpl()); ComponentBitIdRegistryImpl impl2 = new ComponentBitIdRegistryImpl(); ServiceRegistry.Current.RegisterService <ComponentBitIdRegistry>(impl2); HandlerCollector handlerCollector = new HandlerCollector(); ServiceRegistry.Current.RegisterService <NodeDescriptionRegistry>(new NodeDescriptionRegistryImpl()); EngineServiceImpl impl3 = new EngineServiceImpl(service, handlerCollector, new EventMaker(handlerCollector), impl2); ServiceRegistry.Current.RegisterService <EngineService>(impl3); ServiceRegistry.Current.RegisterService <EngineServiceInternal>(impl3); ServiceRegistry.Current.RegisterService <TemplateRegistry>(service); ServiceRegistry.Current.RegisterService <GroupRegistry>(new GroupRegistryImpl()); impl3.HandlerCollector.AddHandlerListener(impl2); YamlService.RegisterConverter(new EntityYamlConverter(impl3)); YamlService.RegisterConverter(new TemplateDescriptionYamlConverter(service)); ServiceRegistry.Current.RegisterService <FlowInstancesCache>(new FlowInstancesCache()); }
public BroadcastEventHandlerCollector(HandlerCollector handlerCollector) { this.handlerCollector = handlerCollector; }
public HandlerStateListener(HandlerCollector handlerCollector) { this.handlerCollector = handlerCollector; }
public EventMaker(HandlerCollector handlerCollector) { this.handlerCollector = handlerCollector; }