Skip to content

Commit deba4ce

Browse files
committed
docs
1 parent a7de858 commit deba4ce

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Polly.Core/Registry/ResiliencePipelineProvider.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public abstract class ResiliencePipelineProvider<TKey>
1717
/// <param name="key">The key used to identify the resilience pipeline.</param>
1818
/// <returns>The resilience pipeline associated with the specified key.</returns>
1919
/// <exception cref="KeyNotFoundException">Thrown when no resilience pipeline is found for the specified key.</exception>
20+
/// <exception cref="ObjectDisposedException">Thrown when the provider is already disposed.</exception>
2021
public virtual ResiliencePipeline GetPipeline(TKey key)
2122
{
2223
if (TryGetPipeline(key, out var pipeline))
@@ -35,6 +36,7 @@ public virtual ResiliencePipeline GetPipeline(TKey key)
3536
/// <param name="key">The key used to identify the resilience pipeline.</param>
3637
/// <returns>The resilience pipeline associated with the specified key.</returns>
3738
/// <exception cref="KeyNotFoundException">Thrown when no resilience pipeline is found for the specified key.</exception>
39+
/// <exception cref="ObjectDisposedException">Thrown when the provider is already disposed.</exception>
3840
public virtual ResiliencePipeline<TResult> GetPipeline<TResult>(TKey key)
3941
{
4042
if (TryGetPipeline<TResult>(key, out var pipeline))
@@ -52,6 +54,7 @@ public virtual ResiliencePipeline<TResult> GetPipeline<TResult>(TKey key)
5254
/// <param name="key">The key used to identify the resilience pipeline.</param>
5355
/// <param name="pipeline">The output resilience pipeline if found, <see langword="null"/> otherwise.</param>
5456
/// <returns><see langword="true"/> if the pipeline was found, <see langword="false"/> otherwise.</returns>
57+
/// <exception cref="ObjectDisposedException">Thrown when the provider is already disposed.</exception>
5558
public abstract bool TryGetPipeline(TKey key, [NotNullWhen(true)] out ResiliencePipeline? pipeline);
5659

5760
/// <summary>
@@ -61,5 +64,6 @@ public virtual ResiliencePipeline<TResult> GetPipeline<TResult>(TKey key)
6164
/// <param name="key">The key used to identify the resilience pipeline.</param>
6265
/// <param name="pipeline">The output resilience pipeline if found, <see langword="null"/> otherwise.</param>
6366
/// <returns><see langword="true"/> if the pipeline was found, <see langword="false"/> otherwise.</returns>
67+
/// <exception cref="ObjectDisposedException">Thrown when the provider is already disposed.</exception>
6468
public abstract bool TryGetPipeline<TResult>(TKey key, [NotNullWhen(true)] out ResiliencePipeline<TResult>? pipeline);
6569
}

src/Polly.Core/Registry/ResiliencePipelineRegistry.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

0 commit comments

Comments
 (0)