From dc82ddf50bba79dd259ad3b4c12316c719fc778a Mon Sep 17 00:00:00 2001 From: Kirk Larkin <6025110+serpent5@users.noreply.github.com> Date: Sat, 8 Feb 2020 20:05:45 +0000 Subject: [PATCH] Replace ToUpper/ToLower with ToUpperInvariant/ToLowerInvariant. (#16895) --- .../samples/3.x/RequestResponseSample/Startup.cs | 6 +++--- .../Pages/Customers/CreateFATH.cshtml.cs | 2 +- .../Pages/Customers/CreateRoute.cshtml.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aspnetcore/fundamentals/middleware/request-response/samples/3.x/RequestResponseSample/Startup.cs b/aspnetcore/fundamentals/middleware/request-response/samples/3.x/RequestResponseSample/Startup.cs index 81d232b920..d90ab0e798 100644 --- a/aspnetcore/fundamentals/middleware/request-response/samples/3.x/RequestResponseSample/Startup.cs +++ b/aspnetcore/fundamentals/middleware/request-response/samples/3.x/RequestResponseSample/Startup.cs @@ -34,7 +34,7 @@ namespace RequestResponseSample foreach (var item in list) { - await context.Response.WriteAsync(item.ToUpper()); + await context.Response.WriteAsync(item.ToUpperInvariant()); await context.Response.WriteAsync(Environment.NewLine); } }); @@ -45,7 +45,7 @@ namespace RequestResponseSample foreach (var item in list) { - await context.Response.WriteAsync(item.ToUpper()); + await context.Response.WriteAsync(item.ToUpperInvariant()); await context.Response.WriteAsync(Environment.NewLine); } }); @@ -55,7 +55,7 @@ namespace RequestResponseSample var list = await GetListOfStringFromPipe(context.Request.BodyPipe); foreach (var item in list) { - await context.Response.WriteAsync(item.ToUpper()); + await context.Response.WriteAsync(item.ToUpperInvariant()); await context.Response.WriteAsync(Environment.NewLine); } }); diff --git a/aspnetcore/razor-pages/index/sample/RazorPagesContacts2/Pages/Customers/CreateFATH.cshtml.cs b/aspnetcore/razor-pages/index/sample/RazorPagesContacts2/Pages/Customers/CreateFATH.cshtml.cs index e6b7aae908..441e2fda95 100644 --- a/aspnetcore/razor-pages/index/sample/RazorPagesContacts2/Pages/Customers/CreateFATH.cshtml.cs +++ b/aspnetcore/razor-pages/index/sample/RazorPagesContacts2/Pages/Customers/CreateFATH.cshtml.cs @@ -35,7 +35,7 @@ namespace RazorPagesContacts.Pages.Customers { return Page(); } - Customer.Name = Customer.Name?.ToUpper(); + Customer.Name = Customer.Name?.ToUpperInvariant(); return await OnPostJoinListAsync(); } } diff --git a/aspnetcore/razor-pages/index/sample/RazorPagesContacts2/Pages/Customers/CreateRoute.cshtml.cs b/aspnetcore/razor-pages/index/sample/RazorPagesContacts2/Pages/Customers/CreateRoute.cshtml.cs index 1768a9b0b9..1103aa725a 100644 --- a/aspnetcore/razor-pages/index/sample/RazorPagesContacts2/Pages/Customers/CreateRoute.cshtml.cs +++ b/aspnetcore/razor-pages/index/sample/RazorPagesContacts2/Pages/Customers/CreateRoute.cshtml.cs @@ -35,7 +35,7 @@ namespace RazorPagesContacts.Pages.Customers { return Page(); } - Customer.Name = Customer.Name?.ToUpper(); + Customer.Name = Customer.Name?.ToUpperInvariant(); return await OnPostJoinListAsync(); } }