Skip to content

Commit 919546d

Browse files
committed
clean up warning and mark to dotnet8
1 parent 28bcbbb commit 919546d

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

projects/httpclientfactory/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@
1515
* [HttpClientFactory - 4](httpclientfactory-4)
1616

1717
Use `IServiceCollection.AddHttpClient` to provide `HttpClient` for interface-implementing classes.
18+
19+
dotnet8

projects/ihosted-service/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
Implement background tasks using the new `IHostedService` interface and a timer. This example comes from the technique outlined in this [ASP.NET Core documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services).
1010

11-
dotnet6
11+
dotnet8

projects/json/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,4 @@ All about the new `System.Text.Json` namespace.
107107

108108
In this case we add one extra `timestamp` property to the serialization process.
109109

110+
dotnet8

projects/localization/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
This is a continuation of previous sample but with context, which allows the same translation key to return different strings.
2828

2929

30-
dotnet6
30+
dotnet8

projects/localization/localization-6/Program.cs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,28 @@
2626
app.UseRequestLocalization(option);
2727

2828
app.UseRouting();
29-
app.UseEndpoints(endpoints =>
30-
{
31-
endpoints.MapGet("greet-friend", async context =>
32-
{
33-
var fac = context.RequestServices.GetService<IStringLocalizerFactory>();
34-
var local = fac.Create("Greet Friend", string.Empty);
3529

36-
var requestCulture = context.Features.Get<IRequestCultureFeature>().RequestCulture;
30+
app.MapGet("greet-friend", async context =>
31+
{
32+
var fac = context.RequestServices.GetService<IStringLocalizerFactory>();
33+
var local = fac.Create("Greet Friend", string.Empty);
3734

38-
await context.Response.WriteAsync($"Request Culture `{requestCulture.UICulture}` = {local["Hello"]}");
39-
});
35+
var requestCulture = context.Features.Get<IRequestCultureFeature>().RequestCulture;
4036

41-
endpoints.MapGet("greet-lover", async context =>
42-
{
43-
var fac = context.RequestServices.GetService<IStringLocalizerFactory>();
44-
var local = fac.Create("Greet Lover", string.Empty);
37+
await context.Response.WriteAsync($"Request Culture `{requestCulture.UICulture}` = {local["Hello"]}");
38+
});
4539

46-
var requestCulture = context.Features.Get<IRequestCultureFeature>().RequestCulture;
40+
app.MapGet("greet-lover", async context =>
41+
{
42+
var fac = context.RequestServices.GetService<IStringLocalizerFactory>();
43+
var local = fac.Create("Greet Lover", string.Empty);
4744

48-
await context.Response.WriteAsync($"Request Culture `{requestCulture.UICulture}` = {local["Hello"]}");
49-
});
45+
var requestCulture = context.Features.Get<IRequestCultureFeature>().RequestCulture;
5046

47+
await context.Response.WriteAsync($"Request Culture `{requestCulture.UICulture}` = {local["Hello"]}");
5148
});
5249

50+
5351
app.Run(async context =>
5452
{
5553
var fac = context.RequestServices.GetService<IStringLocalizerFactory>();

0 commit comments

Comments
 (0)