Skip to content

Commit 1a1b326

Browse files
committed
Updated Demos
1 parent ac67562 commit 1a1b326

File tree

382 files changed

+613
-2489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+613
-2489
lines changed

01-generic-host/Program.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

02-generic-host/Program.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Microsoft.Extensions.Hosting;
2+
3+
var builder = Host.CreateApplicationBuilder(args);
4+
var configuration = builder.Configuration;
5+
6+
using IHost host = builder.Build();
7+
8+
// Application code should start here.
9+
Console.WriteLine("Hello, World!");
10+
Console.WriteLine($"{configuration["greeting"]}, {configuration["environment"]}!");
11+
await host.RunAsync();
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
"KeyTwo": true,
44
"KeyThree": {
55
"Message": "Thanks for checking this out!"
6-
}
6+
},
7+
"greeting": "Hello",
8+
"environment": "dev"
79
}

09-configuration-sections/ConfigurationSections.csproj renamed to 08-configuration-sections/ConfigurationSections.csproj

File renamed without changes.

0 commit comments

Comments
 (0)