File tree 2 files changed +16
-3
lines changed
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Fluently Http Changelog
2
2
3
- [ _ vNext_ ] ( https://github.com/sketch7/FluentlyHttpClient/compare/3.8.1...3.9.0 ) (2020-X-X)
3
+ [ _ vNext_ ] ( https://github.com/sketch7/FluentlyHttpClient/compare/4.0.1...4.1.0 ) (2024-X-X)
4
+
5
+ ## [ 4.0.1] ( https://github.com/sketch7/FluentlyHttpClient/compare/4.0.0...4.0.1 ) (2024-08-28)
6
+
7
+ ### Features
8
+
9
+ - ** http client factory:** expose ` Count ` to know how many clients are registered
4
10
5
11
## [ 4.0.0] ( https://github.com/sketch7/FluentlyHttpClient/compare/3.9.6...4.0.0 ) (2024-07-24)
6
12
Original file line number Diff line number Diff line change 1
- namespace FluentlyHttpClient ;
1
+ namespace FluentlyHttpClient ;
2
2
3
3
/// <summary>
4
4
/// HTTP client factory which contains registered HTTP clients and able to get existing or creating new ones.
@@ -54,6 +54,11 @@ public interface IFluentHttpClientFactory
54
54
/// <param name="identifier">Identifier to check.</param>
55
55
/// <returns>Returns true when already exists.</returns>
56
56
bool Has ( string identifier ) ;
57
+
58
+ /// <summary>
59
+ /// Get the amount of clients registered.
60
+ /// </summary>
61
+ int Count { get ; }
57
62
}
58
63
59
64
/// <summary>
@@ -62,9 +67,11 @@ public interface IFluentHttpClientFactory
62
67
public class FluentHttpClientFactory : IFluentHttpClientFactory
63
68
{
64
69
private readonly IServiceProvider _serviceProvider ;
65
- private readonly Dictionary < string , IFluentHttpClient > _clientsMap = new ( ) ;
70
+ private readonly Dictionary < string , IFluentHttpClient > _clientsMap = [ ] ;
66
71
private Action < FluentHttpClientBuilder > ? _configure ;
67
72
73
+ public int Count => _clientsMap . Count ;
74
+
68
75
/// <summary>
69
76
/// Initializes a new instance of <see cref="FluentHttpClientFactory"/>.
70
77
/// </summary>
You can’t perform that action at this time.
0 commit comments