Пример #1
0
        /// <summary>
        /// Collection of all keys in the PropertyBlock.
        /// </summary>
        public IEnumerable <PropertyName> Keys(bool inbIncludePrototype = true)
        {
            Initialize();

            if (m_Prototype == null || !inbIncludePrototype)
            {
                return(m_FieldMap.Keys);
            }

            HashSet <PropertyName> collection = new HashSet <PropertyName>();

            PropertyBlockExtensions.GatherKeys(this, collection);
            return(collection);
        }
Пример #2
0
        /// <summary>
        /// The number of keys in the PropertyBlock.
        /// </summary>
        public int Count(bool inbIncludePrototype = true)
        {
            if (m_Prototype == null || !inbIncludePrototype)
            {
                if (m_Fields != null)
                {
                    return(m_Fields.Count);
                }
                return(0);
            }

            HashSet <PropertyName> collection = new HashSet <PropertyName>();

            PropertyBlockExtensions.GatherKeys(this, collection);
            int count = collection.Count;

            collection.Clear();
            return(count);
        }