Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
<Import Project="../Common.Projects.props" />

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Trakx.Common.Testing.Documentation" Version="2.0.3" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitHubActionsTestLogger" Version="3.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Trakx.Common.Testing.Documentation" Version="2.0.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
20 changes: 2 additions & 18 deletions src/Trakx.Circle.ApiClient/AuthorisedClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,9 @@

namespace Trakx.Circle.ApiClient;

internal abstract class AuthorisedClient
internal abstract class AuthorisedClient(ClientConfigurator configurator)
{
private readonly ICredentialsProvider _credentialProvider;
private readonly IHttpClientFactory _httpClientFactory;
private readonly string _httpClientName;

protected AuthorisedClient(ClientConfigurator configurator)
{
_credentialProvider = configurator.CredentialsProvider;
_httpClientFactory = configurator.HttpClientFactory;
_httpClientName = GetType().FullName!;
}

protected async Task<HttpClient> CreateHttpClientAsync(CancellationToken cancellationToken)
{
await Task.CompletedTask;
var httpClient = _httpClientFactory.CreateClient(_httpClientName);
return httpClient;
}
private readonly ICredentialsProvider _credentialProvider = configurator.CredentialsProvider;

protected async Task<HttpRequestMessage> CreateHttpRequestMessageAsync(CancellationToken cancellationToken)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Trakx.Circle.ApiClient/CircleApiClientInterfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5697,11 +5697,11 @@ public enum Destination2Type

}

#pragma warning restore 108
#pragma warning restore 114
#pragma warning restore 472
#pragma warning restore 612
#pragma warning restore 649
#pragma warning restore 108
#pragma warning restore 114
#pragma warning restore 472
#pragma warning restore 612
#pragma warning restore 649
#pragma warning restore 1573
#pragma warning restore 1591
#pragma warning restore 8073
Expand Down
Loading
Loading