public static void CallRemoveByKey(RemoveConntectionByKeyArgs args) { if (RemoveByKey != null) { RemoveByKey(args); } }
public static bool CallRemoveByKey(string connkey) { var args = new RemoveConntectionByKeyArgs(); args.ConnKey = connkey; CallRemoveByKey(args); return(!args.Canceled); }
void HConnection_RemoveByKey(RemoveConntectionByKeyArgs obj) { if (Root == null || Root.ConnPack == null) { return; } Root.ConnPack.BeginRemoveByKey(obj.ConnKey, Async.CreateInvokeCallback(m_invoker, async => RemovedConnection(async, obj.ConnKey))); }
void HConnection_RemoveByKey(RemoveConntectionByKeyArgs e) { if (ConnPack == null) { return; } if (!ConnPack.Contains(e.ConnKey)) { return; } if (!AllowCloseConnection(e.ConnKey)) { e.Canceled = true; return; } var async = ConnPack.BeginRemoveByKey(e.ConnKey, Async.CreateInvokeCallback(m_invoker, RemovedConnection)); if (async.CompletedSynchronously) { RemovedConnection(async); } }