Inheritance: System.Collections.CollectionBase
 public void AddRange(AttributeDefinitionCollection definitions)
 {
     foreach (AttributeDefinition definition in definitions)
     {
         Add(definition);
     }
 }
        private static AttributeDefinitionCollection FillCollection(IDataReader dr)
        {
            List<AttributeDefinition> definitions = CBO.FillCollection<AttributeDefinition>(dr);
            AttributeDefinitionCollection definitionsCollection = new AttributeDefinitionCollection();
            foreach (AttributeDefinition definition in definitions)
            {
                //Clear the Is Dirty Flag
                definition.ClearIsDirty();

                //Initialise the Visibility
                object setting = UserModuleBase.GetSetting(definition.PortalId, "LocationType_DefaultVisibility");
                if ((setting != null))
                {
                    definition.Visibility = (DotNetNuke.Entities.Users.UserVisibilityMode)setting;
                }

                //Add to collection
                definitionsCollection.Add(definition);
            }
            return definitionsCollection;
        }
 public AttributeDefinitionCollection(AttributeDefinitionCollection collection)
 {
     AddRange(collection);
 }
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets a collection of Property Defintions from the Data Store by portal
        /// </summary>
        /// <returns>A LocationTypeAttributeDefinitionCollection object</returns>
        /// -----------------------------------------------------------------------------
        public static AttributeDefinitionCollection GetAttributeDefinitionsById(int locationTypeId, bool clone)
        {
            string key = string.Format(CultureInfo.InvariantCulture, CacheKey, locationTypeId);

            // Try fetching the List from the Cache
            AttributeDefinitionCollection attributes = (AttributeDefinitionCollection)DataCache.GetCache(key);

            if (attributes == null)
            {
                attributes = new AttributeDefinitionCollection();
                int timeOut = CacheTimeOut * Convert.ToInt32(DotNetNuke.Common.Globals.PerformanceSetting, CultureInfo.InvariantCulture);

                foreach (AttributeDefinition definition in GetAttributeDefinitions(locationTypeId))
                {
                    if (clone)
                    {
                        attributes.Add(definition.Clone());
                    }
                    else
                    {
                        attributes.Add(definition);
                    }
                }

                if (timeOut > 0)
                {
                    DataCache.SetCache(key, attributes, TimeSpan.FromMinutes(timeOut));
                }
            }

            return attributes;
        }