Пример #1
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);
        }
Пример #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);
        }
Пример #3
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);
        }