using Filter.Handlers.Instances; using System; using System.Collections.Generic; using System.Reflection; namespace Filter.Handlers.Manager { internal class ManagerHandlerLoader : HandlerLoader { public ManagerHandlerLoader() { foreach (Combine combine in FilterAssembly.FindHandlers()) { ManagerPacketHandler packetAttribute = combine.PacketAttribute; MethodInfo methodInfo = combine.MethodInfo; if (!this.Handlers.ContainsKey(packetAttribute.Header)) { this.Handlers.Add(packetAttribute.Header, new Dictionary()); } if (this.Handlers[packetAttribute.Header].ContainsKey(packetAttribute.Type)) { continue; } this.Handlers[packetAttribute.Header].Add(packetAttribute.Type, methodInfo); } } } }