Ejemplo n.º 1
0
            virtual public void ClearAppDelgate(string _appname)
            {
                if (mReCallDelgate != null && mReCallDelgate.Method.DeclaringType.IsSubclassOf(typeof(ILRuntime.Runtime.Intepreter.DelegateAdapter)))
                {
                    ILRuntime.Runtime.Intepreter.DelegateAdapter ttypeinstance = (ILRuntime.Runtime.Intepreter.DelegateAdapter)mReCallDelgate.Target;
                    if (ttypeinstance != null && ttypeinstance.AppName.Equals(_appname))
                    {
                        mReCallDelgate = null;
                    }
                }

                if (mMsgHandlerList.Count > 0)
                {
                    List <int> tkeys = new List <int>(mMsgHandlerList.Keys);
                    for (int i = tkeys.Count - 1; i >= 0; i--)
                    {
                        SafeList <System.Action <ReceiveData> > tlist = mMsgHandlerList[tkeys[i]];
                        for (int j = tlist.Count - 1; j >= 0; j--)
                        {
                            System.Action <ReceiveData> tact = tlist[j];

                            if (tact.Method.DeclaringType.IsSubclassOf(typeof(ILRuntime.Runtime.Intepreter.DelegateAdapter)))
                            {
                                ILRuntime.Runtime.Intepreter.DelegateAdapter ttypeinstance = (ILRuntime.Runtime.Intepreter.DelegateAdapter)tact.Target;
                                if (ttypeinstance != null && ttypeinstance.AppName.Equals(_appname))
                                {
                                    tlist.RemoveAt(j);
                                }
                            }
                        }
                        if (tlist.Count == 0)
                        {
                            mMsgHandlerList.Remove(tkeys[i]);
                        }
                    }
                }
            }
Ejemplo n.º 2
0
 override protected void DisposeGC()
 {
     sUnZipMap.Remove(mKey);
     if (mUnZipObject != null)
     {
         mUnZipObject.Dispose();
     }
     if (mUpdateObject != null)
     {
         mUpdateObject.UnRegToOwner();
     }
     mUpdateObject = null;
     mFinished     = null;
     mProgress     = null;
 }
Ejemplo n.º 3
0
 override protected void DisposeGC()
 {
     sDownLoadMap.Remove(mURL);
     if (mObject != null)
     {
         mObject.Dispose();
     }
     if (mUpdateObject != null)
     {
         mUpdateObject.UnRegToOwner();
     }
     mUpdateObject = null;
     mFinished     = null;
     mProgress     = null;
 }
Ejemplo n.º 4
0
        virtual public void _UnReg(int msgid, System.Action <object> func)
        {
            if (!mMsgHandlerList.ContainsKey(msgid))
            {
                return;
            }
            SafeList <System.Action <object> > tlist = mMsgHandlerList[msgid];

            if (tlist.Contains(func))
            {
                tlist.Remove(func);
            }
            if (tlist.Count == 0)
            {
                mMsgHandlerList.Remove(msgid);
            }
        }