Ejemplo n.º 1
0
 public IBaseType GetICLRTypeAss(Type _type)
 {
     if (mMapType.ContainsKey(_type.FullName))
     {
         return(mMapType[_type.FullName]);
     }
     mMapType.Add(_type.FullName, new SystemType(_type));
     return(mMapType[_type.FullName]);
 }
Ejemplo n.º 2
0
        public FileSettings Get(string fileName)
        {
            lock (threadLock)
            {
                if (!SafeMap.ContainsKey(fileName))
                {
                    SafeMap.Add(fileName, FileSettings.Default);
                }

                return(SafeMap[fileName]);
            }
        }
Ejemplo n.º 3
0
    void AccaptThread()
    {
        while (taskStart)
        {
            Debug.Log("等待一个新玩家");
            Socket     tuser = testServer.Accept();
            UserObject tobj  = new UserObject(tuser);

            userMap.Add(tobj.Key, tobj);

            Debug.Log("新玩家." + tobj.Key);
            tobj.BeginReceive();
        }
    }
Ejemplo n.º 4
0
 public bool StartUnZipAsync()
 {
     if (mUpdateObject == null)
     {
         DLog.LogError("UpdateObject == null");
         return(false);
     }
     if (mIsStart)
     {
         return(true);
     }
     mIsStart = true;
     sUnZipMap.Add(mKey, this);
     mUnZipObject.StartUnZipAsync();
     PublicUpdateManager.AddUpdate(mUpdateObject);
     return(true);
 }
Ejemplo n.º 5
0
        virtual public void _Reg(int msgid, System.Action <object> func)
        {
            SafeList <System.Action <object> > tlist = null;

            if (mMsgHandlerList.ContainsKey(msgid))
            {
                tlist = mMsgHandlerList[msgid];
            }
            else
            {
                tlist = new SafeList <System.Action <object> >();
                mMsgHandlerList.Add(msgid, tlist);
            }
            if (!tlist.Contains(func))
            {
                tlist.Add(func);
            }
        }
Ejemplo n.º 6
0
 public void InitByAssembly(Assembly _assembly)
 {
     if (_assembly == null)
     {
         return;
     }
     mAssembly = _assembly;
     if (mAssembType == null)
     {
         mAssembType = new SafeMap <string, Type>();
     }
     Type[] ttypes = mAssembly.GetTypes();
     foreach (Type ttype in ttypes)
     {
         if (mAssembType.ContainsKey(ttype.FullName))
         {
             continue;
         }
         mAssembType.Add(ttype.FullName, ttype);
     }
 }
Ejemplo n.º 7
0
            public DownLoadTask(UpdateObjectVector _owner, string _key, string _sourceurl, string _destination, bool _IsClear, Action <string, string> _finished, Action <long, long, float> _progress)
            {
                try
                {
                    AppName = _key;
                    mURL    = _sourceurl;
                    mObject = new DownLoadObject(_sourceurl, _destination, _IsClear);

                    mFinished = _finished;
                    mProgress = _progress;

                    mUpdateObject       = new UpdateNeedDisObject(AppName, Update, Dispose);
                    mUpdateObject.Owner = _owner;

                    sDownLoadMap.Add(mURL, this);
                }
                catch (Exception _error)
                {
                    DLog.LogError(_error);
                }
            }