12 Commits

Author SHA1 Message Date
Valters Melnalksnis 43764cc3f3 feat: Add .NET Standard 2.0 target 2022-11-09 22:03:58 +02:00
Valters Melnalksnis 38aabb9386 feat: Remove configuration method that also adds NodaTime 2022-08-29 22:37:43 +03:00
Valters Melnalksnis d0f10d3379 fix: Move serialization related code to folder 2022-08-29 22:16:06 +03:00
Valters Melnalksnis 455bebb7b4 feat: Use JsonSerializationContext for all types, enable trimming (#14) 2022-08-29 22:12:30 +03:00
Valters Melnalksnis 66cbcbea2f fix: Cache JsonSerializerOptions for NordigenHttpClient
This reduces execution time and memory allocation for GetRequiredService<INordigenClient>() by an order of magnitude
2022-06-24 16:28:44 +03:00
Valters Melnalksnis 29949fa64f fix: Cache user agent header value
Currently the user agent header value was created for each TokenDelegatingHandler and NordigenHttpClient.
By creating the header value once, both the execution time and allocated memory for GetRequiredService<INordigenClient>() was reduced.

Original:
|     Mean |    Error |   StdDev |  Gen 0 |  Gen 1 | Allocated |
|--------- |---------:|---------:|-------:|-------:|----------:|
| 33.16 us | 0.102 us | 0.090 us | 5.3101 | 0.0916 |     44 KB |
After caching:
|     Mean |    Error |   StdDev |  Gen 0 |  Gen 1 | Allocated |
|--------- |---------:|---------:|-------:|-------:|----------:|
| 26.02 us | 0.091 us | 0.086 us | 4.8218 | 0.0000 |     39 KB |
2022-06-24 16:28:12 +03:00
Valters Melnalksnis d391cb7721 feat: Cache tokens between calls (#19) 2022-06-16 20:22:52 +03:00
Valters Melnalksnis da99d06272 fix: Replace TokenClient with TokenDelegatingHandler 2022-06-16 18:45:54 +03:00
Valters Melnalksnis 851d8ea2b9 fix: Use IOptionsMonitor<T> instead of IOptionsSnapshot<T> to avoid lifetime issues 2022-06-15 22:37:59 +03:00
Valters Melnalksnis 57c2dce062 fix: Suppress trim warning for ServiceCollectionExtensions 2022-06-15 22:05:47 +03:00
Valters Melnalksnis b2b47e31f6 feat: Add IAgreementClient (#5) 2022-06-15 20:00:31 +03:00
Valters Melnalksnis dc92dadab8 fix: Move DependencyInjection project to correct directory 2022-06-14 20:23:04 +03:00