Esempio n. 1
0
 public static void CallRemoveByKey(RemoveConntectionByKeyArgs args)
 {
     if (RemoveByKey != null)
     {
         RemoveByKey(args);
     }
 }
Esempio n. 2
0
        public static bool CallRemoveByKey(string connkey)
        {
            var args = new RemoveConntectionByKeyArgs();

            args.ConnKey = connkey;
            CallRemoveByKey(args);
            return(!args.Canceled);
        }
Esempio n. 3
0
 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)));
 }
Esempio n. 4
0
        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);
            }
        }