We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74841ed commit b56a8bbCopy full SHA for b56a8bb
TonLibDotNet.Demo/SamplesRunner.cs
@@ -6,15 +6,18 @@ namespace TonLibDotNet
6
public class SamplesRunner : IHostedService
7
{
8
private readonly IServiceProvider services;
9
+ private readonly ITonClient tonClient;
10
- public SamplesRunner(IServiceProvider services)
11
+ public SamplesRunner(IServiceProvider services, ITonClient tonClient)
12
13
this.services = services;
14
+ this.tonClient = tonClient;
15
}
16
17
public async Task StartAsync(CancellationToken cancellationToken)
18
- await services.GetRequiredService<ITonClient>().InitIfNeeded();
19
+ await tonClient.InitIfNeeded();
20
+ await tonClient.Sync();
21
22
var samples = services.GetServices(typeof(ISample)).Cast<ISample>().OrderBy(x => x.GetType().Name).ToList();
23
0 commit comments