Exemple #1
0
        public static void RegisterHandler(InstructHandlerBase handler)
        {
            List <InstructHandlerBase> handlers;

            lock (locker)
            {
                if (s_Processor.ContainsKey(handler.InstructType))
                {
                    handlers = s_Processor[handler.InstructType];
                }
                else
                {
                    handlers = new List <InstructHandlerBase>();
                    s_Processor.Add(handler.InstructType, handlers);
                }
                handlers.Add(handler);
            }
        }
        public static void RegisterHandler(InstructHandlerBase handler)
        {
            List<InstructHandlerBase> handlers;

            lock (locker)
            {
                if (s_Processor.ContainsKey(handler.InstructType))
                {
                    handlers = s_Processor[handler.InstructType];
                }
                else
                {
                    handlers = new List<InstructHandlerBase>();
                    s_Processor.Add(handler.InstructType, handlers);
                }
                handlers.Add(handler);
            }
        }