Exemplo n.º 1
0
 public static TableUnitManager GetTableUnitManager(string clientkey)
 {
     NetClient client = NetClientManager.GetNetClient(clientkey);
     string source = mSourceStringMap[client.Database];
     if (!mTableUnitManangers.ContainsKey(client.Database))
     {
         lock (mTableUnitManangers)
         {
             if (!mTableUnitManangers.ContainsKey(client.Database))
             {
                 TableUnitManager tm = new TableUnitManager();
                 tm.Init(source, client.Database);
                 mTableUnitManangers.Add(client.Database, tm);
             }
         }
     }
     return mTableUnitManangers[client.Database];
 }
Exemplo n.º 2
0
        public static TableUnitManager GetTableUnitManangerByDbname(string dbname)
        {
            string source = mSourceStringMap[dbname];

            if (!mTableUnitManangers.ContainsKey(dbname))
            {
                lock (mTableUnitManangers)
                {
                    if (!mTableUnitManangers.ContainsKey(dbname))
                    {
                        TableUnitManager tm = new TableUnitManager();
                        tm.Init(source, dbname);
                        mTableUnitManangers.Add(dbname, tm);
                    }
                }
            }
            return(mTableUnitManangers[dbname]);
        }
Exemplo n.º 3
0
        public static TableUnitManager GetTableUnitManager(string clientkey)
        {
            NetClient client = NetClientManager.GetNetClient(clientkey);
            string    source = mSourceStringMap[client.Database];

            if (!mTableUnitManangers.ContainsKey(client.Database))
            {
                lock (mTableUnitManangers)
                {
                    if (!mTableUnitManangers.ContainsKey(client.Database))
                    {
                        TableUnitManager tm = new TableUnitManager();
                        tm.Init(source, client.Database);
                        mTableUnitManangers.Add(client.Database, tm);
                    }
                }
            }
            return(mTableUnitManangers[client.Database]);
        }
Exemplo n.º 4
0
 public static TableUnitManager GetTableUnitManangerByDbname(string dbname)
 {
     string source = mSourceStringMap[dbname];
     if (!mTableUnitManangers.ContainsKey(dbname))
     {
         lock (mTableUnitManangers)
         {
             if (!mTableUnitManangers.ContainsKey(dbname))
             {
                 TableUnitManager tm = new TableUnitManager();
                 tm.Init(source, dbname);
                 mTableUnitManangers.Add(dbname, tm);
             }
         }
     }
     return mTableUnitManangers[dbname];
 }