internal NntpGroups(IEnumerable <string> groups, bool doParse) { if (groups == null) { this.groups = ImmutableList <string> .Empty; return; } IEnumerable <string> parsedGroups = doParse ? GroupsParser.Parse(groups) : groups; this.groups = parsedGroups.OrderBy(g => g).ToImmutableList(); }
/// <summary> /// Creates a new <see cref="NntpGroups"/> object. /// </summary> public NntpGroups(string groups) : this(GroupsParser.Parse(groups), false) { }
/// <summary> /// Removes values from the <see cref="NntpGroups"/> object. /// </summary> /// <param name="values">One or more NNTP newsgroup names seperated by the ';' character.</param> /// <returns>The <see cref="NntpGroups"/> object so that additional calls can be chained.</returns> public NntpGroupsBuilder Remove(IEnumerable <string> values) { RemoveGroups(GroupsParser.Parse(values)); return(this); }
/// <summary> /// Removes a new value from the <see cref="NntpGroups"/> object. /// </summary> /// <param name="value">One or more NNTP newsgroup names seperated by the ';' character.</param> /// <returns>The <see cref="NntpGroups"/> object so that additional calls can be chained.</returns> public NntpGroupsBuilder Remove(string value) { RemoveGroups(GroupsParser.Parse(value)); return(this); }
/// <summary> /// Adds new values to the <see cref="NntpGroups"/> object. /// </summary> /// <param name="values">One or more NNTP newsgroup names seperated by the ';' character.</param> /// <returns>The <see cref="NntpGroups"/> object so that additional calls can be chained.</returns> public NntpGroupsBuilder Add(IEnumerable <string> values) { AddGroups(GroupsParser.Parse(values)); return(this); }
/// <summary> /// Adds a new value to the <see cref="NntpGroups"/> object. /// </summary> /// <param name="value">One or more NNTP newsgroup names seperated by the ';' character.</param> /// <returns>The <see cref="NntpGroups"/> object so that additional calls can be chained.</returns> public NntpGroupsBuilder Add(string value) { AddGroups(GroupsParser.Parse(value)); return(this); }