コード例 #1
0
        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();
        }
コード例 #2
0
 /// <summary>
 /// Creates a new <see cref="NntpGroups"/> object.
 /// </summary>
 public NntpGroups(string groups) : this(GroupsParser.Parse(groups), false)
 {
 }
コード例 #3
0
 /// <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);
 }
コード例 #4
0
 /// <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);
 }
コード例 #5
0
 /// <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);
 }
コード例 #6
0
 /// <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);
 }