Ejemplo n.º 1
0
        public KnownExtendedPropertyInfo[] GetAllKnownPropertyInfos()
        {
            // Initialize list on first use.
            if (this.PropertyDictionary.Count == 0)
            {
                InitializeList();
            }
            ;

            KnownExtendedPropertyInfo[] infos = new KnownExtendedPropertyInfo[this.PropertyDictionary.Count];
            this.PropertyDictionary.Values.CopyTo(infos, 0);

            return(infos);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Given KnownExtendedPropertyInfo look up the corresponding property definition
        /// </summary>
        /// <param name="info">Info to lookup</param>
        /// <returns>Property Definition</returns>
        public ExtendedPropertyDefinition GetExtendedPropertyDefinition(KnownExtendedPropertyInfo info)
        {
            // Initialize list on first use.
            if (this.PropertyDictionary.Count == 0)
            {
                InitializeList();
            }
            ;

            if (this.PropertyDictionary.ContainsValue(info))
            {
                foreach (KeyValuePair <ExtendedPropertyDefinition, KnownExtendedPropertyInfo> item in this.PropertyDictionary)
                {
                    if (item.Value.CanonicalNames == info.CanonicalNames)
                    {
                        return(item.Key);
                    }
                }
            }

            return(null);
        }