public XClient(ILifetimeScope scope) { state_managr = new ClientStateMgr(this, 10, 10); lift_scope = scope /*?? throw new ArgumentNullException(nameof(ILifetimeScope), "need set ILifetimeScope")*/; manager = new SubscrptionManager(); manager.Subscrption <HeartBeat, HeartBeatHandler>(new HeartBeatHandler(this)); manager.RegisterServerEventNameToLocalEventName(FixPackageDeal); PacketReceive = Receive; Connected = OnConnected; Disconnected = OnDisConnected; }
public void Subscrption <T, THandler>() where THandler : IEventHandler <T> { manager.Subscrption <T, THandler>(); }