Skip to content

Commit 410ec79

Browse files
Mark IWebHost interface as obsolete and clean up test assets
Co-authored-by: BrennanConroy <[email protected]>
1 parent ac4fcb6 commit 410ec79

File tree

22 files changed

+39
-6
lines changed

22 files changed

+39
-6
lines changed

src/DefaultBuilder/src/ConfigureWebHostBuilder.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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+
#pragma warning disable CS0618 // Type or member is obsolete
5+
46
using System.Diagnostics.CodeAnalysis;
57
using Microsoft.AspNetCore.Hosting;
68
using Microsoft.AspNetCore.Hosting.Infrastructure;

src/DefaultBuilder/testassets/CreateDefaultBuilderApp/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
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-
#pragma warning disable CS0618 // Type or member is obsolete
5-
64
using System;
75
using Microsoft.AspNetCore.Builder;
86
using Microsoft.AspNetCore.Hosting;

src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
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-
#pragma warning disable CS0618 // Type or member is obsolete
5-
64
using System;
75
using Microsoft.AspNetCore.Builder;
86
using Microsoft.AspNetCore.HostFiltering;

src/DefaultBuilder/testassets/DependencyInjectionApp/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
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-
#pragma warning disable CS0618 // Type or member is obsolete
5-
64
using System;
75
using Microsoft.AspNetCore.Builder;
86
using Microsoft.AspNetCore.Hosting;

src/Hosting/Abstractions/src/HostingAbstractionsWebHostBuilderExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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+
#pragma warning disable CS0618 // Type or member is obsolete
5+
46
using System.Diagnostics.CodeAnalysis;
57
using System.Globalization;
68
using System.Linq;

src/Hosting/Abstractions/src/IWebHost.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace Microsoft.AspNetCore.Hosting;
88
/// <summary>
99
/// Represents a configured web host.
1010
/// </summary>
11+
[Obsolete("IWebHost is obsolete. Use IHost instead.")]
1112
public interface IWebHost : IDisposable
1213
{
1314
/// <summary>

src/Hosting/Abstractions/src/IWebHostBuilder.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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+
#pragma warning disable CS0618 // Type or member is obsolete
5+
46
using Microsoft.Extensions.Configuration;
57
using Microsoft.Extensions.DependencyInjection;
68
using Microsoft.Extensions.Logging;

src/Hosting/Hosting/src/GenericHost/HostingStartupWebHostBuilder.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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+
#pragma warning disable CS0618 // Type or member is obsolete
5+
46
using System.Diagnostics.CodeAnalysis;
57
using Microsoft.AspNetCore.Builder;
68
using Microsoft.AspNetCore.Hosting.Infrastructure;

src/Hosting/Hosting/src/GenericHost/WebHostBuilderBase.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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+
#pragma warning disable CS0618 // Type or member is obsolete
5+
46
using Microsoft.Extensions.Configuration;
57
using Microsoft.Extensions.DependencyInjection;
68
using Microsoft.Extensions.Hosting;

src/Hosting/Hosting/src/Internal/WebHost.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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+
#pragma warning disable CS0618 // Type or member is obsolete
5+
46
using System.Diagnostics;
57
using System.Diagnostics.CodeAnalysis;
68
using System.Linq;

0 commit comments

Comments
 (0)