Ejemplo n.º 1
0
        /// <summary>
        /// removes the specified setting type from the SettingsCollection
        /// </summary>
        /// <typeparam name="TSetting">the settings type that is to be removed</typeparam>
        public SettingsCollection Remove <TSetting>(TSetting setting)
            where TSetting : ISetting
        {
            var settingType = setting.GetType();

            SettingsList.RemoveAll(s => s.GetType().IsAssignableFrom(settingType));
            return(this);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// removes all the Setting matching the provided criteria
 /// </summary>
 /// <param name="pred">the predicate of required criteria</param>
 public SettingsCollection RemoveAll(Predicate <ISetting> pred)
 {
     SettingsList.RemoveAll(pred);
     return(this);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// removes the specified setting type from the SettingsCollection
 /// </summary>
 /// <typeparam name="TSetting">the settings type that is to be removed</typeparam>
 public SettingsCollection Remove <TSetting>()
     where TSetting : ISetting
 {
     SettingsList.RemoveAll(s => s is TSetting);
     return(this);
 }