/// <summary> /// will return an exact copy of the settings collection. /// </summary> public SettingsCollection Copy() { var newSettingsCollection = new SettingsCollection(Type); newSettingsCollection.MergeRange(this, FFmpegMergeOptionType.NewWins); return(newSettingsCollection); }
/// <summary> /// adds the given SettingsCollection range to the SettingsCollection /// </summary> /// <param name="settings">the SettingsCollection to be added to be added to the SettingsCollection</param> public SettingsCollection AddRange(SettingsCollection settings) { if (settings == null) { throw new ArgumentNullException("settings"); } settings.SettingsList.ForEach(s => Add(s)); return(this); }
/// <summary> /// merges the current SettingsCollection into the set based on the merge option type. /// </summary> public SettingsCollection MergeRange(SettingsCollection settings, FFmpegMergeOptionType option) { if (settings == null) { throw new ArgumentNullException("settings"); } if (settings.Type != Type) { throw new ArgumentException(string.Format("Settings parameter must be of the same type {0} as the SettingsCollection.", Type)); } settings.SettingsList.ForEach(s => Merge(s, option)); return(this); }