public void AddClientHanderModule([NotNull] PayloadHandlerRegisterationModule <GamePacketPayload, GamePacketPayload, IProxiedMessageContext <GamePacketPayload, GamePacketPayload> > handlerModule) { if (handlerModule == null) { throw new ArgumentNullException(nameof(handlerModule)); } var list = this.ClientMessageHandlerModules as List <PayloadHandlerRegisterationModule <GamePacketPayload, GamePacketPayload, IProxiedMessageContext <GamePacketPayload, GamePacketPayload> > >; list.Add(handlerModule); }
public void AddServerHandlerModule([NotNull] PayloadHandlerRegisterationModule <AuthenticationServerPayload, AuthenticationClientPayload, IProxiedMessageContext <AuthenticationClientPayload, AuthenticationServerPayload> > handlerModule) { if (handlerModule == null) { throw new ArgumentNullException(nameof(handlerModule)); } var list = this.ServerMessageHandlerModules as List <PayloadHandlerRegisterationModule <AuthenticationServerPayload, AuthenticationClientPayload, IProxiedMessageContext <AuthenticationClientPayload, AuthenticationServerPayload> > >; list.Add(handlerModule); }