Exemplo n.º 1
0
 /// <summary>
 /// Determines whether the collection for the child settings is initialized. If not, initializes it.
 /// </summary>
 internal void EnsureChildSettings()
 {
     if (m_ChildSettings == null)
     {
         m_ChildSettings = new SettingCollection();
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Retrieves the all settings with the specified levels.
        /// </summary>
        /// <param name="visible">The visible value.</param>
        /// <returns>The collection of the settings.</returns>
        public SettingCollection FindAllByVisible(bool visible)
        {
            SettingCollection coll = new SettingCollection();

            coll.AddRange(this.FindAll(
                              delegate(Setting setting)
            {
                return(setting.Visible == visible);
            }));

            return(coll);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Retrieves the all settings with the specified levels.
        /// </summary>
        /// <param name="level">The levels of the settings.</param>
        /// <returns>The collection of the settings.</returns>
        public SettingCollection FindAllByLevel(SettingLevels level)
        {
            SettingCollection coll = new SettingCollection();

            coll.AddRange(this.FindAll(
                              delegate(Setting setting)
            {
                return(((setting.Level & level) == level) || ((setting.Level & level) == setting.Level));
            }));

            return(coll);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Retrieves the child settings of the specified setting.
        /// </summary>
        /// <param name="settingId">The identifier of the setting to get child of.</param>
        /// <returns>The collection of child settings of the specified setting.</returns>
        public SettingCollection FindChildSettings(Guid?settingId)
        {
            SettingCollection coll = new SettingCollection();

            coll.AddRange(this.FindAll(
                              delegate(Setting setting)
            {
                return(setting.ParentSettingId == settingId);
            }));

            return(coll);
        }