コード例 #1
0
ファイル: XClient.cs プロジェクト: yuchengit/BeetleX
 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;
 }
コード例 #2
0
ファイル: XClient.cs プロジェクト: yuchengit/BeetleX
 public void Subscrption <T, THandler>() where THandler : IEventHandler <T>
 {
     manager.Subscrption <T, THandler>();
 }