Пример #1
0
        protected override void setAttribute(string attribute, string valueStr)
        {
            switch (attribute)
            {
            case ConstInterface.MG_ATTR_CACHED_TABLE:
                if (ClientManager.Instance.getTableCacheManager().TableExists(valueStr))
                {
                    _table = ClientManager.Instance.getTableCacheManager().GetTableById(valueStr);
                }
                else
                {
                    _table = new TableCache(valueStr);
                    ClientManager.Instance.getTableCacheManager().InsertTable(_table);
                }
                break;

            case ConstInterface.MG_ATTR_IDENT:
                _table.SetTableIdent(valueStr);
                break;


            default:
                base.setAttribute(attribute, valueStr);
                break;
            }
        }
Пример #2
0
        /// <summary>
        ///   inserts a table into the manager is not already exists
        ///   returns true is insert succeeded false otherwise
        /// </summary>
        protected internal bool InsertTable(TableCache table)
        {
            bool res = false;

            if (!TableExists(table.GetTableUniqueId()))
            {
                _tables[table.GetTableUniqueId()] = table;
                res = true;
            }

            return(res);
        }