@@ -104,20 +104,19 @@ public async Task<string> WaitForResourceAsync(string resourceName, IEnumerable<
104104 }
105105
106106 /// <summary>
107- /// Waits for a resource to reach one of the specified states. See <see cref="KnownResourceStates"/> for common states .
107+ /// Waits until a resource satisfies the specified predicate .
108108 /// </summary>
109109 /// <remarks>
110- /// This method returns a task that will complete when the resource reaches one of the specified target states. If the resource
111- /// is already in the target state, the method will return immediately.<br/>
112- /// If the resource doesn't reach one of the target states before <paramref name="cancellationToken"/> is signaled, this method
110+ /// This method returns a task that will complete when the specified predicate returns <see langword="true" />.<br/>
111+ /// If the predicate isn't satisfied before <paramref name="cancellationToken"/> is signaled, this method
113112 /// will throw <see cref="OperationCanceledException"/>.
114113 /// </remarks>
115114 /// <param name="resourceName">The name of the resource.</param>
116115 /// <param name="predicate">A predicate which is evaluated for each <see cref="ResourceEvent"/> for the selected resource.</param>
117116 /// <param name="cancellationToken">A cancellation token that cancels the wait operation when signaled.</param>
118117 /// <returns>A <see cref="Task{ResourceEvent}"/> representing the wait operation and which of the target states the resource reached.</returns>
119118 [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "ApiDesign" , "RS0026:Do not add multiple public overloads with optional parameters" ,
120- Justification = "targetState(s) parameters are mutually exclusive." ) ]
119+ Justification = "predicate and targetState(s) parameters are mutually exclusive." ) ]
121120 public async Task < ResourceEvent > WaitForResourceAsync ( string resourceName , Func < ResourceEvent , bool > predicate , CancellationToken cancellationToken = default )
122121 {
123122 using var watchCts = CancellationTokenSource . CreateLinkedTokenSource ( _applicationStopping , cancellationToken ) ;
0 commit comments