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

            args.ConnKey = connkey;
            CallRemoveByKey(args);
            return(!args.Canceled);
        }
示例#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)));
 }
示例#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);
            }
        }