Merge branch 'rel/2.0.0-preview1' into dev
This commit is contained in:
commit
c1949b340a
37
Hosting.sln
37
Hosting.sln
|
|
@ -1,34 +1,32 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio 15
|
||||||
VisualStudioVersion = 15.0.26424.2
|
VisualStudioVersion = 15.0.26228.9
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E0497F39-AFFB-4819-A116-E39E361915AB}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E0497F39-AFFB-4819-A116-E39E361915AB}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FEB39027-9158-4DE2-997F-7ADAEF8188D0}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FEB39027-9158-4DE2-997F-7ADAEF8188D0}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.TestHost.Tests", "test\Microsoft.AspNetCore.TestHost.Tests\Microsoft.AspNetCore.TestHost.Tests.csproj", "{0ACB2719-9484-49B5-B8E3-117091192511}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.TestHost.Tests", "test\Microsoft.AspNetCore.TestHost.Tests\Microsoft.AspNetCore.TestHost.Tests.csproj", "{0ACB2719-9484-49B5-B8E3-117091192511}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.TestHost", "src\Microsoft.AspNetCore.TestHost\Microsoft.AspNetCore.TestHost.csproj", "{1A415A3F-1081-45DB-809B-EE19CEA02DC0}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.TestHost", "src\Microsoft.AspNetCore.TestHost\Microsoft.AspNetCore.TestHost.csproj", "{1A415A3F-1081-45DB-809B-EE19CEA02DC0}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Hosting", "src\Microsoft.AspNetCore.Hosting\Microsoft.AspNetCore.Hosting.csproj", "{3944F036-7E75-47E8-AA52-C4B89A64EC3A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Hosting", "src\Microsoft.AspNetCore.Hosting\Microsoft.AspNetCore.Hosting.csproj", "{3944F036-7E75-47E8-AA52-C4B89A64EC3A}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Hosting.Tests", "test\Microsoft.AspNetCore.Hosting.Tests\Microsoft.AspNetCore.Hosting.Tests.csproj", "{D4F18D58-52B1-435D-A012-10F2CDF158C4}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Hosting.Tests", "test\Microsoft.AspNetCore.Hosting.Tests\Microsoft.AspNetCore.Hosting.Tests.csproj", "{D4F18D58-52B1-435D-A012-10F2CDF158C4}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Hosting.Abstractions", "src\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.csproj", "{BB780FBB-7842-4759-8DE7-96FA2E5571C1}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Hosting.Abstractions", "src\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.csproj", "{BB780FBB-7842-4759-8DE7-96FA2E5571C1}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Hosting.Server.Abstractions", "src\Microsoft.AspNetCore.Hosting.Server.Abstractions\Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj", "{FDBBA081-5248-4FC0-9E08-B46BEF3FA438}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Hosting.Server.Abstractions", "src\Microsoft.AspNetCore.Hosting.Server.Abstractions\Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj", "{FDBBA081-5248-4FC0-9E08-B46BEF3FA438}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Server.IntegrationTesting", "src\Microsoft.AspNetCore.Server.IntegrationTesting\Microsoft.AspNetCore.Server.IntegrationTesting.csproj", "{3DA89347-6731-4366-80C4-548F24E8607B}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server.IntegrationTesting", "src\Microsoft.AspNetCore.Server.IntegrationTesting\Microsoft.AspNetCore.Server.IntegrationTesting.csproj", "{3DA89347-6731-4366-80C4-548F24E8607B}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{9C7520A0-F2EB-411C-8BB2-80B39C937217}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{9C7520A0-F2EB-411C-8BB2-80B39C937217}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleStartups", "samples\SampleStartups\SampleStartups.csproj", "{485B6745-7648-400A-A969-F68FCF194E46}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleStartups", "samples\SampleStartups\SampleStartups.csproj", "{485B6745-7648-400A-A969-F68FCF194E46}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Hosting.WindowsServices", "src\Microsoft.AspNetCore.Hosting.WindowsServices\Microsoft.AspNetCore.Hosting.WindowsServices.csproj", "{03148731-EA95-40A2-BAE8-A12315EA1748}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Hosting.FunctionalTests", "test\Microsoft.AspNetCore.Hosting.FunctionalTests\Microsoft.AspNetCore.Hosting.FunctionalTests.csproj", "{FC578F4E-171C-4F82-B301-3ABF6318D082}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Hosting.FunctionalTests", "test\Microsoft.AspNetCore.Hosting.FunctionalTests\Microsoft.AspNetCore.Hosting.FunctionalTests.csproj", "{FC578F4E-171C-4F82-B301-3ABF6318D082}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Hosting.TestSites", "test\Microsoft.AspNetCore.Hosting.TestSites\Microsoft.AspNetCore.Hosting.TestSites.csproj", "{542D4600-B232-4B17-A08C-E31EBFA0D74E}"
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Hosting.TestSites", "test\Microsoft.AspNetCore.Hosting.TestSites\Microsoft.AspNetCore.Hosting.TestSites.csproj", "{542D4600-B232-4B17-A08C-E31EBFA0D74E}"
|
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestStartupAssembly1", "test\TestStartupAssembly1\TestStartupAssembly1.csproj", "{39D3B138-37DB-4D03-A5A0-3F2B02EFC671}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestStartupAssembly1", "test\TestStartupAssembly1\TestStartupAssembly1.csproj", "{39D3B138-37DB-4D03-A5A0-3F2B02EFC671}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|
@ -132,18 +130,6 @@ Global
|
||||||
{485B6745-7648-400A-A969-F68FCF194E46}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
{485B6745-7648-400A-A969-F68FCF194E46}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||||
{485B6745-7648-400A-A969-F68FCF194E46}.Release|x86.ActiveCfg = Release|Any CPU
|
{485B6745-7648-400A-A969-F68FCF194E46}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{485B6745-7648-400A-A969-F68FCF194E46}.Release|x86.Build.0 = Release|Any CPU
|
{485B6745-7648-400A-A969-F68FCF194E46}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{FC578F4E-171C-4F82-B301-3ABF6318D082}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{FC578F4E-171C-4F82-B301-3ABF6318D082}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{FC578F4E-171C-4F82-B301-3ABF6318D082}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{FC578F4E-171C-4F82-B301-3ABF6318D082}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{FC578F4E-171C-4F82-B301-3ABF6318D082}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
{FC578F4E-171C-4F82-B301-3ABF6318D082}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
|
|
@ -205,7 +191,6 @@ Global
|
||||||
{FDBBA081-5248-4FC0-9E08-B46BEF3FA438} = {E0497F39-AFFB-4819-A116-E39E361915AB}
|
{FDBBA081-5248-4FC0-9E08-B46BEF3FA438} = {E0497F39-AFFB-4819-A116-E39E361915AB}
|
||||||
{3DA89347-6731-4366-80C4-548F24E8607B} = {E0497F39-AFFB-4819-A116-E39E361915AB}
|
{3DA89347-6731-4366-80C4-548F24E8607B} = {E0497F39-AFFB-4819-A116-E39E361915AB}
|
||||||
{485B6745-7648-400A-A969-F68FCF194E46} = {9C7520A0-F2EB-411C-8BB2-80B39C937217}
|
{485B6745-7648-400A-A969-F68FCF194E46} = {9C7520A0-F2EB-411C-8BB2-80B39C937217}
|
||||||
{03148731-EA95-40A2-BAE8-A12315EA1748} = {E0497F39-AFFB-4819-A116-E39E361915AB}
|
|
||||||
{FC578F4E-171C-4F82-B301-3ABF6318D082} = {FEB39027-9158-4DE2-997F-7ADAEF8188D0}
|
{FC578F4E-171C-4F82-B301-3ABF6318D082} = {FEB39027-9158-4DE2-997F-7ADAEF8188D0}
|
||||||
{542D4600-B232-4B17-A08C-E31EBFA0D74E} = {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}
|
{39D3B138-37DB-4D03-A5A0-3F2B02EFC671} = {FEB39027-9158-4DE2-997F-7ADAEF8188D0}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="..\..\build\dependencies.props" />
|
<Import Project="..\..\build\dependencies.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<StartupObject>SampleStartups.StartupInjection</StartupObject>
|
<StartupObject>SampleStartups.StartupInjection</StartupObject>
|
||||||
<OutputType>exe</OutputType>
|
<OutputType>exe</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>ASP.NET Core hosting and startup abstractions for web applications.</Description>
|
<Description>ASP.NET Core hosting and startup abstractions for web applications.</Description>
|
||||||
<TargetFramework>netstandard1.3</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;hosting</PackageTags>
|
<PackageTags>aspnetcore;hosting</PackageTags>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>ASP.NET Core hosting server abstractions for web applications.</Description>
|
<Description>ASP.NET Core hosting server abstractions for web applications.</Description>
|
||||||
<TargetFramework>netstandard1.3</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;hosting</PackageTags>
|
<PackageTags>aspnetcore;hosting</PackageTags>
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<Import Project="..\..\build\common.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<Description>ASP.NET Core hosting infrastructure and startup logic for web applications running within a Windows service.</Description>
|
|
||||||
<TargetFramework>net46</TargetFramework>
|
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<PackageTags>aspnetcore;hosting</PackageTags>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Microsoft.AspNetCore.Hosting\Microsoft.AspNetCore.Hosting.csproj" />
|
|
||||||
<Reference Include="System.ServiceProcess" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
||||||
// 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.ServiceProcess;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Hosting.WindowsServices
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Provides an implementation of a Windows service that hosts ASP.NET Core.
|
|
||||||
/// </summary>
|
|
||||||
public class WebHostService : ServiceBase
|
|
||||||
{
|
|
||||||
private IWebHost _host;
|
|
||||||
private bool _stopRequestedByWindows;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates an instance of <c>WebHostService</c> which hosts the specified web application.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="host">The configured web host containing the web application to host in the Windows service.</param>
|
|
||||||
public WebHostService(IWebHost host)
|
|
||||||
{
|
|
||||||
_host = host;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected sealed override void OnStart(string[] args)
|
|
||||||
{
|
|
||||||
OnStarting(args);
|
|
||||||
|
|
||||||
_host
|
|
||||||
.Services
|
|
||||||
.GetRequiredService<IApplicationLifetime>()
|
|
||||||
.ApplicationStopped
|
|
||||||
.Register(() =>
|
|
||||||
{
|
|
||||||
if (!_stopRequestedByWindows)
|
|
||||||
{
|
|
||||||
Stop();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
_host.Start();
|
|
||||||
|
|
||||||
OnStarted();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected sealed override void OnStop()
|
|
||||||
{
|
|
||||||
_stopRequestedByWindows = true;
|
|
||||||
OnStopping();
|
|
||||||
_host?.Dispose();
|
|
||||||
OnStopped();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Executes before ASP.NET Core starts.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="args">The command line arguments passed to the service.</param>
|
|
||||||
protected virtual void OnStarting(string[] args) { }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Executes after ASP.NET Core starts.
|
|
||||||
/// </summary>
|
|
||||||
protected virtual void OnStarted() { }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Executes before ASP.NET Core shuts down.
|
|
||||||
/// </summary>
|
|
||||||
protected virtual void OnStopping() { }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Executes after ASP.NET Core shuts down.
|
|
||||||
/// </summary>
|
|
||||||
protected virtual void OnStopped() { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
// 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.ServiceProcess;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Hosting.WindowsServices
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Extensions to <see cref="IWebHost"/> for hosting inside a Windows service.
|
|
||||||
/// </summary>
|
|
||||||
public static class WebHostWindowsServiceExtensions
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Runs the specified web application inside a Windows service and blocks until the service is stopped.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="host">An instance of the <see cref="IWebHost"/> to host in the Windows service.</param>
|
|
||||||
/// <example>
|
|
||||||
/// This example shows how to use <see cref="RunAsService"/>.
|
|
||||||
/// <code>
|
|
||||||
/// public class Program
|
|
||||||
/// {
|
|
||||||
/// public static void Main(string[] args)
|
|
||||||
/// {
|
|
||||||
/// var config = WebHostConfiguration.GetDefault(args);
|
|
||||||
///
|
|
||||||
/// var host = new WebHostBuilder()
|
|
||||||
/// .UseConfiguration(config)
|
|
||||||
/// .Build();
|
|
||||||
///
|
|
||||||
/// // This call will block until the service is stopped.
|
|
||||||
/// host.RunAsService();
|
|
||||||
/// }
|
|
||||||
/// }
|
|
||||||
/// </code>
|
|
||||||
/// </example>
|
|
||||||
public static void RunAsService(this IWebHost host)
|
|
||||||
{
|
|
||||||
var webHostService = new WebHostService(host);
|
|
||||||
ServiceBase.Run(webHostService);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
||||||
{
|
|
||||||
"AssemblyIdentity": "Microsoft.AspNetCore.Hosting.WindowsServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60",
|
|
||||||
"Types": [
|
|
||||||
{
|
|
||||||
"Name": "Microsoft.AspNetCore.Hosting.WindowsServices.WebHostService",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"Kind": "Class",
|
|
||||||
"BaseType": "System.ServiceProcess.ServiceBase",
|
|
||||||
"ImplementedInterfaces": [],
|
|
||||||
"Members": [
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "OnStart",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "args",
|
|
||||||
"Type": "System.String[]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Sealed": true,
|
|
||||||
"Virtual": true,
|
|
||||||
"Override": true,
|
|
||||||
"Visibility": "Protected",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "OnStop",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Sealed": true,
|
|
||||||
"Virtual": true,
|
|
||||||
"Override": true,
|
|
||||||
"Visibility": "Protected",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "OnStarting",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "args",
|
|
||||||
"Type": "System.String[]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Virtual": true,
|
|
||||||
"Visibility": "Protected",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "OnStarted",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Virtual": true,
|
|
||||||
"Visibility": "Protected",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "OnStopping",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Virtual": true,
|
|
||||||
"Visibility": "Protected",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "OnStopped",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Virtual": true,
|
|
||||||
"Visibility": "Protected",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Constructor",
|
|
||||||
"Name": ".ctor",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "host",
|
|
||||||
"Type": "Microsoft.AspNetCore.Hosting.IWebHost"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"GenericParameters": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Microsoft.AspNetCore.Hosting.WindowsServices.WebHostWindowsServiceExtensions",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"Kind": "Class",
|
|
||||||
"Abstract": true,
|
|
||||||
"Static": true,
|
|
||||||
"Sealed": true,
|
|
||||||
"ImplementedInterfaces": [],
|
|
||||||
"Members": [
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "RunAsService",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "host",
|
|
||||||
"Type": "Microsoft.AspNetCore.Hosting.IWebHost"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Static": true,
|
|
||||||
"Extension": true,
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"GenericParameters": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -205,18 +205,13 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
var hostingEnv = _applicationServices.GetRequiredService<IHostingEnvironment>();
|
var hostingEnv = _applicationServices.GetRequiredService<IHostingEnvironment>();
|
||||||
var showDetailedErrors = hostingEnv.IsDevelopment() || _options.DetailedErrors;
|
var showDetailedErrors = hostingEnv.IsDevelopment() || _options.DetailedErrors;
|
||||||
|
|
||||||
var model = new ErrorPageModel();
|
var model = new ErrorPageModel
|
||||||
var runtimeType = Microsoft.Extensions.Internal.RuntimeEnvironment.RuntimeType;
|
{
|
||||||
model.RuntimeDisplayName = (runtimeType == "CoreCLR") ? ".NET Core" : runtimeType == "CLR" ? ".NET Framework" : "Mono";
|
RuntimeDisplayName = ".NET Core"
|
||||||
#if NETSTANDARD1_3 || NETSTANDARD1_5
|
};
|
||||||
var systemRuntimeAssembly = typeof(System.ComponentModel.DefaultValueAttribute).GetTypeInfo().Assembly;
|
var systemRuntimeAssembly = typeof(System.ComponentModel.DefaultValueAttribute).GetTypeInfo().Assembly;
|
||||||
var assemblyVersion = new AssemblyName(systemRuntimeAssembly.FullName).Version.ToString();
|
var assemblyVersion = new AssemblyName(systemRuntimeAssembly.FullName).Version.ToString();
|
||||||
var clrVersion = assemblyVersion;
|
var clrVersion = assemblyVersion;
|
||||||
#elif NET46
|
|
||||||
var clrVersion = Environment.Version.ToString();
|
|
||||||
#else
|
|
||||||
#error Target frameworks need to be updated.
|
|
||||||
#endif
|
|
||||||
model.RuntimeArchitecture = RuntimeInformation.ProcessArchitecture.ToString();
|
model.RuntimeArchitecture = RuntimeInformation.ProcessArchitecture.ToString();
|
||||||
var currentAssembly = typeof(ErrorPage).GetTypeInfo().Assembly;
|
var currentAssembly = typeof(ErrorPage).GetTypeInfo().Assembly;
|
||||||
model.CurrentAssemblyVesion = currentAssembly
|
model.CurrentAssemblyVesion = currentAssembly
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>ASP.NET Core hosting infrastructure and startup logic for web applications.</Description>
|
<Description>ASP.NET Core hosting infrastructure and startup logic for web applications.</Description>
|
||||||
<TargetFrameworks>netstandard1.3;netstandard1.5</TargetFrameworks>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;hosting</PackageTags>
|
<PackageTags>aspnetcore;hosting</PackageTags>
|
||||||
|
|
@ -35,10 +35,6 @@
|
||||||
<PackageReference Include="System.Diagnostics.StackTrace" Version="$(CoreFxVersion)" />
|
<PackageReference Include="System.Diagnostics.StackTrace" Version="$(CoreFxVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
|
|
||||||
<PackageReference Include="System.Runtime.Loader" Version="$(CoreFxVersion)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DotNetCliToolReference Include="RazorPageGenerator" Version="$(AspNetCoreVersion)" />
|
<DotNetCliToolReference Include="RazorPageGenerator" Version="$(AspNetCoreVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,8 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
#if NETSTANDARD1_5
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.Loader;
|
using System.Runtime.Loader;
|
||||||
#endif
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Hosting.Server.Features;
|
using Microsoft.AspNetCore.Hosting.Server.Features;
|
||||||
|
|
@ -92,13 +90,8 @@ namespace Microsoft.AspNetCore.Hosting
|
||||||
done.Wait();
|
done.Wait();
|
||||||
};
|
};
|
||||||
|
|
||||||
#if NETSTANDARD1_5
|
|
||||||
var assemblyLoadContext = AssemblyLoadContext.GetLoadContext(typeof(WebHostExtensions).GetTypeInfo().Assembly);
|
var assemblyLoadContext = AssemblyLoadContext.GetLoadContext(typeof(WebHostExtensions).GetTypeInfo().Assembly);
|
||||||
assemblyLoadContext.Unloading += context => shutdown();
|
assemblyLoadContext.Unloading += context => shutdown();
|
||||||
#elif NETSTANDARD1_3
|
|
||||||
#else
|
|
||||||
#error Target frameworks need to be updated.
|
|
||||||
#endif
|
|
||||||
Console.CancelKeyPress += (sender, eventArgs) =>
|
Console.CancelKeyPress += (sender, eventArgs) =>
|
||||||
{
|
{
|
||||||
shutdown();
|
shutdown();
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -56,14 +56,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (exception is HttpRequestException
|
if (exception is HttpRequestException)
|
||||||
#if NET46
|
|
||||||
|| exception is System.Net.WebException
|
|
||||||
#elif NETSTANDARD1_5
|
|
||||||
#else
|
|
||||||
#error Target frameworks need to be updated.
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
logger.LogWarning("Failed to complete the request : {0}.", exception.Message);
|
logger.LogWarning("Failed to complete the request : {0}.", exception.Message);
|
||||||
await Task.Delay(1 * 1000); //Wait for a while before retry.
|
await Task.Delay(1 * 1000); //Wait for a while before retry.
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>ASP.NET Core helpers to deploy applications to IIS Express, IIS, WebListener and Kestrel for testing.</Description>
|
<Description>ASP.NET Core helpers to deploy applications to IIS Express, IIS, WebListener and Kestrel for testing.</Description>
|
||||||
<VersionPrefix>0.4.0</VersionPrefix>
|
<VersionPrefix>0.4.0</VersionPrefix>
|
||||||
<TargetFrameworks>net46;netstandard1.5</TargetFrameworks>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;testing</PackageTags>
|
<PackageTags>aspnetcore;testing</PackageTags>
|
||||||
|
|
@ -30,15 +30,4 @@
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="$(SerilogFileSinkVersion)" />
|
<PackageReference Include="Serilog.Sinks.File" Version="$(SerilogFileSinkVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
|
|
||||||
<PackageReference Include="Microsoft.Web.Administration" Version="$(WebAdministrationVersion)" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
|
|
||||||
<PackageReference Include="System.Diagnostics.Process" Version="$(CoreFxVersion)" />
|
|
||||||
<PackageReference Include="System.Threading.Thread" Version="$(CoreFxVersion)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>ASP.NET Core web server for writing and running tests.</Description>
|
<Description>ASP.NET Core web server for writing and running tests.</Description>
|
||||||
<TargetFrameworks>netstandard1.3;net46</TargetFrameworks>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;hosting;testing</PackageTags>
|
<PackageTags>aspnetcore;hosting;testing</PackageTags>
|
||||||
|
|
@ -14,8 +14,4 @@
|
||||||
<ProjectReference Include="..\Microsoft.AspNetCore.Hosting\Microsoft.AspNetCore.Hosting.csproj" />
|
<ProjectReference Include="..\Microsoft.AspNetCore.Hosting\Microsoft.AspNetCore.Hosting.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
|
|
||||||
<PackageReference Include="System.Diagnostics.Contracts" Version="$(CoreFxVersion)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,6 @@ namespace Microsoft.AspNetCore.TestHost
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET46
|
|
||||||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||||
{
|
{
|
||||||
Write(buffer, offset, count);
|
Write(buffer, offset, count);
|
||||||
|
|
@ -271,10 +270,6 @@ namespace Microsoft.AspNetCore.TestHost
|
||||||
public override void EndWrite(IAsyncResult asyncResult)
|
public override void EndWrite(IAsyncResult asyncResult)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#elif NETSTANDARD1_3
|
|
||||||
#else
|
|
||||||
#error Target frameworks need to be updated.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,289 +0,0 @@
|
||||||
{
|
|
||||||
"AssemblyIdentity": "Microsoft.AspNetCore.TestHost, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60",
|
|
||||||
"Types": [
|
|
||||||
{
|
|
||||||
"Name": "Microsoft.AspNetCore.TestHost.ClientHandler",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"Kind": "Class",
|
|
||||||
"BaseType": "System.Net.Http.HttpMessageHandler",
|
|
||||||
"ImplementedInterfaces": [],
|
|
||||||
"Members": [
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "SendAsync",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "request",
|
|
||||||
"Type": "System.Net.Http.HttpRequestMessage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "cancellationToken",
|
|
||||||
"Type": "System.Threading.CancellationToken"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>",
|
|
||||||
"Virtual": true,
|
|
||||||
"Override": true,
|
|
||||||
"Visibility": "Protected",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Constructor",
|
|
||||||
"Name": ".ctor",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "pathBase",
|
|
||||||
"Type": "Microsoft.AspNetCore.Http.PathString"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "application",
|
|
||||||
"Type": "Microsoft.AspNetCore.Hosting.Server.IHttpApplication<Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context>"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"GenericParameters": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Microsoft.AspNetCore.TestHost.RequestBuilder",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"Kind": "Class",
|
|
||||||
"ImplementedInterfaces": [],
|
|
||||||
"Members": [
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "And",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "configure",
|
|
||||||
"Type": "System.Action<System.Net.Http.HttpRequestMessage>"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "Microsoft.AspNetCore.TestHost.RequestBuilder",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "AddHeader",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "name",
|
|
||||||
"Type": "System.String"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "value",
|
|
||||||
"Type": "System.String"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "Microsoft.AspNetCore.TestHost.RequestBuilder",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "SendAsync",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "method",
|
|
||||||
"Type": "System.String"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "GetAsync",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "PostAsync",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Constructor",
|
|
||||||
"Name": ".ctor",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "server",
|
|
||||||
"Type": "Microsoft.AspNetCore.TestHost.TestServer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "path",
|
|
||||||
"Type": "System.String"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"GenericParameters": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Microsoft.AspNetCore.TestHost.TestServer",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"Kind": "Class",
|
|
||||||
"ImplementedInterfaces": [
|
|
||||||
"Microsoft.AspNetCore.Hosting.Server.IServer"
|
|
||||||
],
|
|
||||||
"Members": [
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "get_BaseAddress",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Uri",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "set_BaseAddress",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "value",
|
|
||||||
"Type": "System.Uri"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "get_Host",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "Microsoft.AspNetCore.Hosting.IWebHost",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "CreateHandler",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Net.Http.HttpMessageHandler",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "CreateClient",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Net.Http.HttpClient",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "CreateWebSocketClient",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "Microsoft.AspNetCore.TestHost.WebSocketClient",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "CreateRequest",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "path",
|
|
||||||
"Type": "System.String"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "Microsoft.AspNetCore.TestHost.RequestBuilder",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "Dispose",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Sealed": true,
|
|
||||||
"Virtual": true,
|
|
||||||
"ImplementedInterface": "System.IDisposable",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Constructor",
|
|
||||||
"Name": ".ctor",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "builder",
|
|
||||||
"Type": "Microsoft.AspNetCore.Hosting.IWebHostBuilder"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"GenericParameters": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Microsoft.AspNetCore.TestHost.WebSocketClient",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"Kind": "Class",
|
|
||||||
"ImplementedInterfaces": [],
|
|
||||||
"Members": [
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "get_SubProtocols",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Collections.Generic.IList<System.String>",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "get_ConfigureRequest",
|
|
||||||
"Parameters": [],
|
|
||||||
"ReturnType": "System.Action<Microsoft.AspNetCore.Http.HttpRequest>",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "set_ConfigureRequest",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "value",
|
|
||||||
"Type": "System.Action<Microsoft.AspNetCore.Http.HttpRequest>"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "System.Void",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Kind": "Method",
|
|
||||||
"Name": "ConnectAsync",
|
|
||||||
"Parameters": [
|
|
||||||
{
|
|
||||||
"Name": "uri",
|
|
||||||
"Type": "System.Uri"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "cancellationToken",
|
|
||||||
"Type": "System.Threading.CancellationToken"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ReturnType": "System.Threading.Tasks.Task<System.Net.WebSockets.WebSocket>",
|
|
||||||
"Visibility": "Public",
|
|
||||||
"GenericParameter": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"GenericParameters": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>.NET Core hosting and startup abstractions for applications.</Description>
|
<Description>.NET Core hosting and startup abstractions for applications.</Description>
|
||||||
<TargetFramework>netstandard1.3</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>hosting</PackageTags>
|
<PackageTags>hosting</PackageTags>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,7 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.NotNull(eventData);
|
Assert.NotNull(eventData);
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP2_0
|
|
||||||
Assert.Equal("HostStart", eventData.EventName);
|
Assert.Equal("HostStart", eventData.EventName);
|
||||||
#elif NET46
|
|
||||||
#else
|
|
||||||
#error Target framework needs to be updated
|
|
||||||
#endif
|
|
||||||
Assert.Equal(EventLevel.Informational, eventData.Level);
|
Assert.Equal(EventLevel.Informational, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
Assert.Null(eventData.Message);
|
Assert.Null(eventData.Message);
|
||||||
|
|
@ -71,12 +66,7 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.NotNull(eventData);
|
Assert.NotNull(eventData);
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP2_0
|
|
||||||
Assert.Equal("HostStop", eventData.EventName);
|
Assert.Equal("HostStop", eventData.EventName);
|
||||||
#elif NET46
|
|
||||||
#else
|
|
||||||
#error Target framework needs to be updated
|
|
||||||
#endif
|
|
||||||
Assert.Equal(EventLevel.Informational, eventData.Level);
|
Assert.Equal(EventLevel.Informational, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
Assert.Null(eventData.Message);
|
Assert.Null(eventData.Message);
|
||||||
|
|
@ -132,12 +122,7 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.NotNull(eventData);
|
Assert.NotNull(eventData);
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP2_0
|
|
||||||
Assert.Equal("RequestStart", eventData.EventName);
|
Assert.Equal("RequestStart", eventData.EventName);
|
||||||
#elif NET46
|
|
||||||
#else
|
|
||||||
#error Target framework needs to be updated
|
|
||||||
#endif
|
|
||||||
Assert.Equal(EventLevel.Informational, eventData.Level);
|
Assert.Equal(EventLevel.Informational, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
Assert.Null(eventData.Message);
|
Assert.Null(eventData.Message);
|
||||||
|
|
@ -165,12 +150,7 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
// Assert
|
// Assert
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP2_0
|
|
||||||
Assert.Equal("RequestStop", eventData.EventName);
|
Assert.Equal("RequestStop", eventData.EventName);
|
||||||
#elif NET46
|
|
||||||
#else
|
|
||||||
#error Target framework needs to be updated
|
|
||||||
#endif
|
|
||||||
Assert.Equal(EventLevel.Informational, eventData.Level);
|
Assert.Equal(EventLevel.Informational, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
Assert.Null(eventData.Message);
|
Assert.Null(eventData.Message);
|
||||||
|
|
@ -192,12 +172,7 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
// Assert
|
// Assert
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP2_0
|
|
||||||
Assert.Equal("UnhandledException", eventData.EventName);
|
Assert.Equal("UnhandledException", eventData.EventName);
|
||||||
#elif NET46
|
|
||||||
#else
|
|
||||||
#error Target framework needs to be updated
|
|
||||||
#endif
|
|
||||||
Assert.Equal(EventLevel.Error, eventData.Level);
|
Assert.Equal(EventLevel.Error, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
Assert.Null(eventData.Message);
|
Assert.Null(eventData.Message);
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue