Update sample projects & samples in docs (#2823)

* update them all

* more docs

* moar docs
This commit is contained in:
Mihail Gribkov
2024-01-11 18:25:56 +03:00
committed by GitHub
parent 8227d70b86
commit e2e8c0fd6a
31 changed files with 732 additions and 806 deletions

View File

@@ -1,15 +1,7 @@
public class Program
{
private readonly IServiceProvider _serviceProvider;
public Program()
{
_serviceProvider = CreateProvider();
}
static void Main(string[] args)
=> new Program().RunAsync(args).GetAwaiter().GetResult();
private static IServiceProvider _serviceProvider;
static IServiceProvider CreateProvider()
{
var collection = new ServiceCollection();
@@ -17,8 +9,8 @@ public class Program
return collection.BuildServiceProvider();
}
async Task RunAsync(string[] args)
static async Task Main(string[] args)
{
//...
_serviceProvider = CreateProvider();
}
}