44namespace DependencyQueue ;
55
66/// <summary>
7- /// A builder to create <see cref="DependencyQueueEntry{T}"/> instances.
7+ /// A builder that can incrementally create and enqueue entries in a
8+ /// <see cref="DependencyQueue{T}"/>.
89/// </summary>
910/// <typeparam name="T">
1011/// The type of object contained in an entry.
1112/// </typeparam>
1213/// <remarks>
13- /// Members of this type are <strong>not</strong> thread-safe.
14+ /// Members of this type are <strong>not</strong> thread-safe. To build
15+ /// entries in parallel, use a separate builder for each thread.
1416/// </remarks>
1517public class DependencyQueueEntryBuilder < T >
1618{
@@ -55,7 +57,7 @@ internal DependencyQueueEntryBuilder(IDependencyQueue<T> queue)
5557 /// Begins building a new entry with the specified name and value.
5658 /// </summary>
5759 /// <param name="name">
58- /// The name of the entry.
60+ /// The name of the entry. Cannot be <see langword="null"/> or empty.
5961 /// </param>
6062 /// <param name="value">
6163 /// The value to store in the entry.
@@ -83,7 +85,8 @@ public DependencyQueueEntryBuilder<T> NewEntry(string name, T value)
8385 /// Declares that the current entry provides the specified topics.
8486 /// </summary>
8587 /// <param name="names">
86- /// The names of topics that the entry provides.
88+ /// The names of topics that the entry provides. A name cannot be
89+ /// <see langword="null"/> or empty.
8790 /// </param>
8891 /// <returns>
8992 /// The builder, to enable chaining of method invocations.
@@ -92,6 +95,13 @@ public DependencyQueueEntryBuilder<T> NewEntry(string name, T value)
9295 /// This method is valid only when building an entry.
9396 /// Use <see cref="NewEntry"/> to begin building an entry.
9497 /// </remarks>
98+ /// <exception cref="ArgumentNullException">
99+ /// <paramref name="names"/> is <see langword="null"/>.
100+ /// </exception>
101+ /// <exception cref="ArgumentException">
102+ /// <paramref name="names"/> contains a <see langword="null"/> or empty
103+ /// name.
104+ /// </exception>
95105 /// <exception cref="InvalidOperationException">
96106 /// The builder does not have a current entry.
97107 /// Use <see cref="NewEntry"/> to begin building an entry.
@@ -110,7 +120,8 @@ public DependencyQueueEntryBuilder<T> AddProvides(params string[] names)
110120 /// Declares that the current entry requires the specified topics.
111121 /// </summary>
112122 /// <param name="names">
113- /// The names of topics that the entry requires.
123+ /// The names of topics that the entry requires. A name cannot be
124+ /// <see langword="null"/> or empty.
114125 /// </param>
115126 /// <returns>
116127 /// The builder, to enable chaining of method invocations.
@@ -119,6 +130,13 @@ public DependencyQueueEntryBuilder<T> AddProvides(params string[] names)
119130 /// This method is valid only when building an entry.
120131 /// Use <see cref="NewEntry"/> to begin building an entry.
121132 /// </remarks>
133+ /// <exception cref="ArgumentNullException">
134+ /// <paramref name="names"/> is <see langword="null"/>.
135+ /// </exception>
136+ /// <exception cref="ArgumentException">
137+ /// <paramref name="names"/> contains a <see langword="null"/> or empty
138+ /// name.
139+ /// </exception>
122140 /// <exception cref="InvalidOperationException">
123141 /// The builder does not have a current entry.
124142 /// Use <see cref="NewEntry"/> to begin building an entry.
0 commit comments