Exemple #1
0
        // Token: 0x06000365 RID: 869 RVA: 0x0000958C File Offset: 0x0000858C
        public static string GetTypeDescription(ItemIdentifier itemID)
        {
            if (itemID == null)
            {
                return(null);
            }
            string result;

            lock (typeof(ComplexTypeCache))
            {
                string      text        = null;
                ComplexItem complexItem = ComplexTypeCache.GetComplexItem(itemID);
                if (complexItem != null)
                {
                    text = (string)ComplexTypeCache.m_descriptions[complexItem.TypeItemID.Key];
                    if (text != null)
                    {
                        return(text);
                    }
                    text = ((string)(m_descriptions[complexItem.TypeItemID.Key] = complexItem.GetTypeDescription(m_server)));
                }
                result = text;
            }
            return(result);
        }
Exemple #2
0
        /// <summary>
        /// Fetches the type description for the item.
        /// </summary>
        public static string GetTypeDescription(ItemIdentifier itemID)
        {
            if (itemID == null)
            {
                return(null);
            }

            lock (typeof(ComplexTypeCache))
            {
                string description = null;

                ComplexItem item = GetComplexItem(itemID);

                if (item != null)
                {
                    description = (string)m_descriptions[item.TypeItemID.Key];

                    if (description != null)
                    {
                        return(description);
                    }

                    m_descriptions[item.TypeItemID.Key] = description = item.GetTypeDescription(m_server);
                }

                return(description);
            }
        }