Skip to content

Commit

Permalink
Updated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kwtc committed Jul 13, 2024
1 parent efdf17a commit b192984
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,18 @@ After registering the services you can inject the client and configuration.
```csharp
public class MyService
{
private readonly ITjekClient _tjekClient;
private readonly IHttpClientFactory _httpClientFactory;
private readonly TjekClientConfig _tjekClientConfig;

public MyService(ITjekClient tjekClient, IOptions<TjekClientConfig> tjekClientConfig)
public MyService(IHttpClientFactory httpClientFactory, IOptions<TjekClientConfig> tjekClientConfig)
{
_tjekClient = tjekClient;
_httpClientFactory = httpClientFactory;
_tjekClientConfig = tjekClientConfig.Value;
}

public Task MyMethod()
{
var client = _httpClientFactory.CreateClient(Constants.HttpClientName);
}
}
```

0 comments on commit b192984

Please sign in to comment.