Skip to content

Commit d63a4a8

Browse files
Apply suggestions from code review
1 parent ac08998 commit d63a4a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests/HostingTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public async Task WebhostLoadsKeyRingBeforeServerStarts()
2525
.Returns(Mock.Of<IKeyRing>())
2626
.Callback(() => tcs.TrySetResult());
2727

28-
#pragma warning disable CS0618 // Type or member is obsolete
28+
#pragma warning disable ASPDEPR004 // Type or member is obsolete
2929
var builder = new WebHostBuilder()
3030
.UseStartup<TestStartup>()
3131
.ConfigureServices(s =>
@@ -34,7 +34,7 @@ public async Task WebhostLoadsKeyRingBeforeServerStarts()
3434
.Replace(ServiceDescriptor.Singleton(mockKeyRing.Object))
3535
.AddSingleton<IServer>(
3636
new FakeServer(onStart: () => tcs.TrySetException(new InvalidOperationException("Server was started before key ring was initialized")))));
37-
#pragma warning restore CS0618 // Type or member is obsolete
37+
#pragma warning restore ASPDEPR004 // Type or member is obsolete
3838

3939
using (var host = builder.Build())
4040
{

src/Hosting/Hosting/src/WebHostBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Hosting;
2020
/// <summary>
2121
/// A builder for <see cref="IWebHost"/>
2222
/// </summary>
23-
[Obsolete("WebHostBuilder is deprecated in favor or HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.", DiagnosticId = "ASPDEPR004")]
23+
[Obsolete("WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.", DiagnosticId = "ASPDEPR004")]
2424
public class WebHostBuilder : IWebHostBuilder
2525
{
2626
private readonly HostingEnvironment _hostingEnvironment;

0 commit comments

Comments
 (0)