public PortalPacketHandler Register(byte id, ushort length, PortalContext context, PortalReceive onReceive) { lock (((ICollection)Handlers).SyncRoot) { return(Handlers[id] = new PortalPacketHandler(id, length, context, onReceive)); } }
public PortalPacketHandler Register(ushort id, PortalContext context, PortalReceive onReceive) { if (Handlers.ContainsKey(id)) { ToConsole("Warning: Replacing Packet Handler for {0}", id); } return(Handlers[id] = new PortalPacketHandler(id, context, onReceive)); }
public PortalPacketHandler Register(ushort id, PortalContext context, PortalReceive onReceive) { lock (((ICollection)Handlers).SyncRoot) { if (Handlers.ContainsKey(id)) { ToConsole("Warning: Replacing Packet Handler for {0}", id); } return Handlers[id] = new PortalPacketHandler(id, context, onReceive); } }
public PortalPacketHandler Register(byte id, ushort length, PortalContext context, PortalReceive onReceive) { lock (((ICollection)Handlers).SyncRoot) { return Handlers[id] = new PortalPacketHandler(id, length, context, onReceive); } }