Skip to content

Commit 6d790f1

Browse files
committed
Use attribute for suppression instead like before
1 parent ed40bda commit 6d790f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Hosting/TestHost/src/WebHostBuilderExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Diagnostics.CodeAnalysis;
45
using System.Linq;
56
using System.Net.Http;
67
using Microsoft.AspNetCore.Hosting;
@@ -169,9 +170,8 @@ public static IWebHostBuilder UseSolutionRelativeContentRoot(
169170
/// <param name="applicationBasePath">The root of the app's directory.</param>
170171
/// <param name="solutionNames">The names of the solution files to make the content root relative to. If empty, defaults to *.sln and *.slnx.</param>
171172
/// <returns>The <see cref="IWebHostBuilder"/>.</returns>
172-
#pragma warning disable RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads
173+
[SuppressMessage("ApiDesign", "RS0027:Public API with optional parameter(s) should have the most parameters amongst its public overloads", Justification = "Required to maintain compatibility")]
173174
public static IWebHostBuilder UseSolutionRelativeContentRoot(
174-
#pragma warning restore RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads
175175
this IWebHostBuilder builder,
176176
string solutionRelativePath,
177177
string applicationBasePath,

0 commit comments

Comments
 (0)