@@ -60,50 +60,6 @@ public ResiliencePipelineRegistry(ResiliencePipelineRegistryOptions<TKey> option
6060 _pipelineComparer = options . PipelineComparer ;
6161 }
6262
63- /// <summary>
64- /// Tries to add an existing resilience pipeline to the registry.
65- /// </summary>
66- /// <param name="key">The key used to identify the resilience pipeline.</param>
67- /// <param name="pipeline">The resilience pipeline instance.</param>
68- /// <returns><see langword="true"/> if the pipeline was added successfully, <see langword="false"/> otherwise.</returns>
69- /// <exception cref="ArgumentNullException">Thrown when <paramref name="pipeline"/> is <see langword="null"/>.</exception>
70- public bool TryAddPipeline ( TKey key , ResiliencePipeline pipeline )
71- {
72- Guard . NotNull ( pipeline ) ;
73-
74- return _pipelines . TryAdd ( key , pipeline ) ;
75- }
76-
77- /// <summary>
78- /// Tries to add an existing generic resilience pipeline to the registry.
79- /// </summary>
80- /// <typeparam name="TResult">The type of result that the resilience pipeline handles.</typeparam>
81- /// <param name="key">The key used to identify the resilience pipeline.</param>
82- /// <param name="pipeline">The resilience pipeline instance.</param>
83- /// <returns><see langword="true"/> if the pipeline was added successfully, <see langword="false"/> otherwise.</returns>
84- /// <exception cref="ArgumentNullException">Thrown when <paramref name="pipeline"/> is <see langword="null"/>.</exception>
85- public bool TryAddPipeline < TResult > ( TKey key , ResiliencePipeline < TResult > pipeline )
86- {
87- Guard . NotNull ( pipeline ) ;
88-
89- return GetGenericRegistry < TResult > ( ) . TryAdd ( key , pipeline ) ;
90- }
91-
92- /// <summary>
93- /// Removes a resilience pipeline from the registry.
94- /// </summary>
95- /// <param name="key">The key used to identify the resilience pipeline.</param>
96- /// <returns><see langword="true"/> if the pipeline was removed successfully, <see langword="false"/> otherwise.</returns>
97- public bool RemovePipeline ( TKey key ) => _pipelines . TryRemove ( key , out _ ) ;
98-
99- /// <summary>
100- /// Removes a generic resilience pipeline from the registry.
101- /// </summary>
102- /// <typeparam name="TResult">The type of result that the resilience pipeline handles.</typeparam>
103- /// <param name="key">The key used to identify the resilience pipeline.</param>
104- /// <returns><see langword="true"/> if the pipeline was removed successfully, <see langword="false"/> otherwise.</returns>
105- public bool RemovePipeline < TResult > ( TKey key ) => GetGenericRegistry < TResult > ( ) . Remove ( key ) ;
106-
10763 /// <inheritdoc/>
10864 public override bool TryGetPipeline < TResult > ( TKey key , [ NotNullWhen ( true ) ] out ResiliencePipeline < TResult > ? pipeline )
10965 {
@@ -232,38 +188,6 @@ public bool TryAddBuilder<TResult>(TKey key, Action<ResiliencePipelineBuilder<TR
232188 return GetGenericRegistry < TResult > ( ) . TryAddBuilder ( key , configure ) ;
233189 }
234190
235- /// <summary>
236- /// Removes a resilience pipeline builder from the registry.
237- /// </summary>
238- /// <param name="key">The key used to identify the resilience pipeline builder.</param>
239- /// <returns><see langword="true"/> if the builder was removed successfully, <see langword="false"/> otherwise.</returns>
240- public bool RemoveBuilder ( TKey key ) => _builders . TryRemove ( key , out _ ) ;
241-
242- /// <summary>
243- /// Removes a generic resilience pipeline builder from the registry.
244- /// </summary>
245- /// <typeparam name="TResult">The type of result that the resilience pipeline handles.</typeparam>
246- /// <param name="key">The key used to identify the resilience pipeline builder.</param>
247- /// <returns><see langword="true"/> if the builder was removed successfully, <see langword="false"/> otherwise.</returns>
248- public bool RemoveBuilder < TResult > ( TKey key ) => GetGenericRegistry < TResult > ( ) . RemoveBuilder ( key ) ;
249-
250- /// <summary>
251- /// Clears all cached pipelines.
252- /// </summary>
253- /// <remarks>
254- /// This method only clears the cached pipelines, the registered builders are kept unchanged.
255- /// </remarks>
256- public void ClearPipelines ( ) => _pipelines . Clear ( ) ;
257-
258- /// <summary>
259- /// Clears all cached generic pipelines.
260- /// </summary>
261- /// <typeparam name="TResult">The type of result that the resilience pipeline handles.</typeparam>
262- /// <remarks>
263- /// This method only clears the cached pipelines, the registered builders are kept unchanged.
264- /// </remarks>
265- public void ClearPipelines < TResult > ( ) => GetGenericRegistry < TResult > ( ) . Clear ( ) ;
266-
267191 private static PipelineComponent CreatePipelineComponent < TBuilder > (
268192 Func < TBuilder > activator ,
269193 ConfigureBuilderContext < TKey > context ,
0 commit comments