From 2624e73172037e8e1576173a13b14f3bf3f5325d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Barr=C3=A9?= Date: Mon, 29 Apr 2019 11:56:54 -0400 Subject: [PATCH] Remove useless ToString (#9811) --- src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs | 2 +- src/Hosting/Hosting/src/Internal/HostingRequestStartingLog.cs | 4 ++-- src/Http/Http/src/Internal/BindingAddress.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs b/src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs index 63f3be4236..e30fe0df4d 100644 --- a/src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs +++ b/src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs @@ -73,7 +73,7 @@ namespace Microsoft.AspNetCore.Antiforgery if (_options.Cookie.Path != null) { - options.Path = _options.Cookie.Path.ToString(); + options.Path = _options.Cookie.Path; } else { diff --git a/src/Hosting/Hosting/src/Internal/HostingRequestStartingLog.cs b/src/Hosting/Hosting/src/Internal/HostingRequestStartingLog.cs index 7506028a3c..4d9901cdd6 100644 --- a/src/Hosting/Hosting/src/Internal/HostingRequestStartingLog.cs +++ b/src/Hosting/Hosting/src/Internal/HostingRequestStartingLog.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Hosting.Internal case 3: return new KeyValuePair("ContentLength", _request.ContentLength); case 4: - return new KeyValuePair("Scheme", _request.Scheme.ToString()); + return new KeyValuePair("Scheme", _request.Scheme); case 5: return new KeyValuePair("Host", _request.Host.ToString()); case 6: diff --git a/src/Http/Http/src/Internal/BindingAddress.cs b/src/Http/Http/src/Internal/BindingAddress.cs index 492fa23dbe..b5f008b091 100644 --- a/src/Http/Http/src/Internal/BindingAddress.cs +++ b/src/Http/Http/src/Internal/BindingAddress.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Http.Internal } else { - return Scheme.ToLowerInvariant() + "://" + Host.ToLowerInvariant() + ":" + Port.ToString(CultureInfo.InvariantCulture) + PathBase.ToString(CultureInfo.InvariantCulture); + return Scheme.ToLowerInvariant() + "://" + Host.ToLowerInvariant() + ":" + Port.ToString(CultureInfo.InvariantCulture) + PathBase; } }