コード例 #1
0
ファイル: ComplexTypeCache.cs プロジェクト: ZSYMAX/OpcNetApi
        // Token: 0x06000364 RID: 868 RVA: 0x00009518 File Offset: 0x00008518
        public static string GetTypeDictionary(ItemIdentifier itemID)
        {
            if (itemID == null)
            {
                return(null);
            }
            string result;

            lock (typeof(ComplexTypeCache))
            {
                string text = (string)ComplexTypeCache.m_dictionaries[itemID.Key];
                if (text != null)
                {
                    result = text;
                }
                else
                {
                    ComplexItem complexItem = ComplexTypeCache.GetComplexItem(itemID);
                    if (complexItem != null)
                    {
                        text = complexItem.GetTypeDictionary(ComplexTypeCache.m_server);
                    }
                    result = text;
                }
            }
            return(result);
        }
コード例 #2
0
        /// <summary>
        /// Fetches the type description for the item.
        /// </summary>
        public static string GetTypeDictionary(ItemIdentifier itemID)
        {
            if (itemID == null)
            {
                return(null);
            }

            lock (typeof(ComplexTypeCache))
            {
                string dictionary = (string)m_dictionaries[itemID.Key];

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

                ComplexItem item = GetComplexItem(itemID);

                if (item != null)
                {
                    dictionary = item.GetTypeDictionary(m_server);
                }

                return(dictionary);
            }
        }