@@ -95,6 +95,7 @@ public override bool TryGetPipeline(TKey key, [NotNullWhen(true)] out Resilience
9595 /// <param name="key">The key used to identify the resilience pipeline.</param>
9696 /// <param name="configure">The callback that configures the pipeline builder.</param>
9797 /// <returns>An instance of pipeline.</returns>
98+ /// <exception cref="ObjectDisposedException">Thrown when the registry is already disposed.</exception>
9899 public ResiliencePipeline GetOrAddPipeline ( TKey key , Action < ResiliencePipelineBuilder > configure )
99100 {
100101 Guard . NotNull ( configure ) ;
@@ -110,6 +111,7 @@ public ResiliencePipeline GetOrAddPipeline(TKey key, Action<ResiliencePipelineBu
110111 /// <param name="key">The key used to identify the resilience pipeline.</param>
111112 /// <param name="configure">The callback that configures the pipeline builder.</param>
112113 /// <returns>An instance of pipeline.</returns>
114+ /// <exception cref="ObjectDisposedException">Thrown when the registry is already disposed.</exception>
113115 public ResiliencePipeline GetOrAddPipeline ( TKey key , Action < ResiliencePipelineBuilder , ConfigureBuilderContext < TKey > > configure )
114116 {
115117 Guard . NotNull ( configure ) ;
@@ -141,6 +143,7 @@ public ResiliencePipeline GetOrAddPipeline(TKey key, Action<ResiliencePipelineBu
141143 /// <param name="key">The key used to identify the resilience pipeline.</param>
142144 /// <param name="configure">The callback that configures the pipeline builder.</param>
143145 /// <returns>An instance of pipeline.</returns>
146+ /// <exception cref="ObjectDisposedException">Thrown when the registry is already disposed.</exception>
144147 public ResiliencePipeline < TResult > GetOrAddPipeline < TResult > ( TKey key , Action < ResiliencePipelineBuilder < TResult > > configure )
145148 {
146149 Guard . NotNull ( configure ) ;
@@ -157,6 +160,7 @@ public ResiliencePipeline<TResult> GetOrAddPipeline<TResult>(TKey key, Action<Re
157160 /// <param name="key">The key used to identify the resilience pipeline.</param>
158161 /// <param name="configure">The callback that configures the pipeline builder.</param>
159162 /// <returns>An instance of pipeline.</returns>
163+ /// <exception cref="ObjectDisposedException">Thrown when the registry is already disposed.</exception>
160164 public ResiliencePipeline < TResult > GetOrAddPipeline < TResult > ( TKey key , Action < ResiliencePipelineBuilder < TResult > , ConfigureBuilderContext < TKey > > configure )
161165 {
162166 Guard . NotNull ( configure ) ;
@@ -176,6 +180,7 @@ public ResiliencePipeline<TResult> GetOrAddPipeline<TResult>(TKey key, Action<Re
176180 /// Use this method when you want to create the pipeline on-demand when it's first accessed.
177181 /// </remarks>
178182 /// <exception cref="ArgumentNullException">Thrown when <paramref name="configure"/> is <see langword="null"/>.</exception>
183+ /// <exception cref="ObjectDisposedException">Thrown when the registry is already disposed.</exception>
179184 public bool TryAddBuilder ( TKey key , Action < ResiliencePipelineBuilder , ConfigureBuilderContext < TKey > > configure )
180185 {
181186 Guard . NotNull ( configure ) ;
@@ -196,6 +201,7 @@ public bool TryAddBuilder(TKey key, Action<ResiliencePipelineBuilder, ConfigureB
196201 /// Use this method when you want to create the pipeline on-demand when it's first accessed.
197202 /// </remarks>
198203 /// <exception cref="ArgumentNullException">Thrown when <paramref name="configure"/> is <see langword="null"/>.</exception>
204+ /// <exception cref="ObjectDisposedException">Thrown when the registry is already disposed.</exception>
199205 public bool TryAddBuilder < TResult > ( TKey key , Action < ResiliencePipelineBuilder < TResult > , ConfigureBuilderContext < TKey > > configure )
200206 {
201207 Guard . NotNull ( configure ) ;
@@ -205,7 +211,13 @@ public bool TryAddBuilder<TResult>(TKey key, Action<ResiliencePipelineBuilder<TR
205211 return GetGenericRegistry < TResult > ( ) . TryAddBuilder ( key , configure ) ;
206212 }
207213
208- /// <inheritdoc/>
214+ /// <summary>
215+ /// Disposes all resources that are held by the resilience pipelines created by this builder.
216+ /// </summary>
217+ /// <remarks>
218+ /// After the disposal, all resilience pipelines still used outside of the builder are disposed
219+ /// and cannot be used anymore.
220+ /// </remarks>
209221 public void Dispose ( )
210222 {
211223 _disposed = true ;
@@ -225,7 +237,14 @@ public void Dispose()
225237 _genericRegistry . Clear ( ) ;
226238 }
227239
228- /// <inheritdoc/>
240+ /// <summary>
241+ /// Disposes all resources that are held by the resilience pipelines created by this builder.
242+ /// </summary>
243+ /// <returns>Returns a task that represents the asynchronous dispose operation.</returns>
244+ /// <remarks>
245+ /// After the disposal, all resilience pipelines still used outside of the builder are disposed
246+ /// and cannot be used anymore.
247+ /// </remarks>
229248 public async ValueTask DisposeAsync ( )
230249 {
231250 _disposed = true ;
0 commit comments