Move IHostedService to new Microsoft.Extensions.Hosting.Abstractions package.
This commit is contained in:
parent
4b249ef722
commit
285d62b312
17
Hosting.sln
17
Hosting.sln
|
|
@ -1,6 +1,6 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26418.1
|
||||
VisualStudioVersion = 15.0.26424.2
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E0497F39-AFFB-4819-A116-E39E361915AB}"
|
||||
EndProject
|
||||
|
|
@ -32,6 +32,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Hostin
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestStartupAssembly1", "test\TestStartupAssembly1\TestStartupAssembly1.csproj", "{39D3B138-37DB-4D03-A5A0-3F2B02EFC671}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Hosting.Abstractions", "src\Microsoft.Extensions.Hosting.Abstractions\Microsoft.Extensions.Hosting.Abstractions.csproj", "{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -178,6 +180,18 @@ Global
|
|||
{39D3B138-37DB-4D03-A5A0-3F2B02EFC671}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{39D3B138-37DB-4D03-A5A0-3F2B02EFC671}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{39D3B138-37DB-4D03-A5A0-3F2B02EFC671}.Release|x86.Build.0 = Release|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -195,5 +209,6 @@ Global
|
|||
{FC578F4E-171C-4F82-B301-3ABF6318D082} = {FEB39027-9158-4DE2-997F-7ADAEF8188D0}
|
||||
{542D4600-B232-4B17-A08C-E31EBFA0D74E} = {FEB39027-9158-4DE2-997F-7ADAEF8188D0}
|
||||
{39D3B138-37DB-4D03-A5A0-3F2B02EFC671} = {FEB39027-9158-4DE2-997F-7ADAEF8188D0}
|
||||
{96BC7EEA-64D9-4DA5-8E87-1C18CBFE7D12} = {E0497F39-AFFB-4819-A116-E39E361915AB}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Hosting.Server.Abstractions\Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.Extensions.Hosting.Abstractions\Microsoft.Extensions.Hosting.Abstractions.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Microsoft.AspNetCore.Hosting.Internal
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// 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.
|
||||
|
||||
namespace Microsoft.AspNetCore.Hosting
|
||||
namespace Microsoft.Extensions.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines methods for objects that are managed by the host.
|
||||
|
|
@ -9,14 +9,12 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
public interface IHostedService
|
||||
{
|
||||
/// <summary>
|
||||
/// Triggered when the application host has fully started and the server is waiting
|
||||
/// for requests.
|
||||
/// Triggered when the application host is ready to start the service.
|
||||
/// </summary>
|
||||
void Start();
|
||||
|
||||
/// <summary>
|
||||
/// Triggered when the application host is performing a graceful shutdown.
|
||||
/// Requests may still be in flight. Shutdown will block until this event completes.
|
||||
/// </summary>
|
||||
void Stop();
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>.NET Core hosting and startup abstractions for applications.</Description>
|
||||
<TargetFramework>netstandard1.3</TargetFramework>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>hosting</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Http;
|
|||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
|
|
|
|||
Loading…
Reference in New Issue