Esempio n. 1
0
        public static SmallBulkEntry[] GetEntries(string type, string name)
        {
            if (m_Cache == null)
            {
                m_Cache = new Hashtable();
            }

            Hashtable table = (Hashtable)m_Cache[type];

            if (table == null)
            {
                m_Cache[type] = table = new Hashtable();
            }

            SmallBulkEntry[] entries = (SmallBulkEntry[])table[name];

            if (entries == null)
            {
                table[name] = entries = SmallBulkEntry.LoadEntries(type, name);
            }

            return(entries);
        }
Esempio n. 2
0
        public static SmallBulkEntry[] GetEntries(string type, string name)
        {
            if (m_Cache == null)
            {
                m_Cache = new Dictionary <string, Dictionary <string, SmallBulkEntry[]> >();
            }

            Dictionary <string, SmallBulkEntry[]> table = null;

            if (!m_Cache.TryGetValue(type, out table))
            {
                m_Cache[type] = table = new Dictionary <string, SmallBulkEntry[]>();
            }

            SmallBulkEntry[] entries = null;

            if (!table.TryGetValue(name, out entries))
            {
                table[name] = entries = SmallBulkEntry.LoadEntries(type, name);
            }

            return(entries);
        }