예제 #1
0
 public NodeChangedEventMaker(Event eventInstance, Type fireHandlerType, Type completeHandlerType, HandlerCollector handlerCollector)
 {
     this.eventInstance        = eventInstance;
     this._fireHandlerType     = fireHandlerType;
     this._completeHandlerType = completeHandlerType;
     this.handlerCollector     = handlerCollector;
 }
예제 #2
0
        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);
                }
            }
        }
예제 #3
0
        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());
        }
예제 #4
0
 public BroadcastEventHandlerCollector(HandlerCollector handlerCollector)
 {
     this.handlerCollector = handlerCollector;
 }
예제 #5
0
 public HandlerStateListener(HandlerCollector handlerCollector)
 {
     this.handlerCollector = handlerCollector;
 }
예제 #6
0
 public EventMaker(HandlerCollector handlerCollector)
 {
     this.handlerCollector = handlerCollector;
 }