Merge branch 'master' into merge/release/3.1-to-master

This commit is contained in:
Brennan Conroy 2019-10-23 14:06:23 -07:00
Родитель a3349381d3 97db4938f7
Коммит 859c1e085e
70 изменённых файлов: 1510 добавлений и 1391 удалений

3
.github/labeler.yml поставляемый
Просмотреть файл

@ -51,3 +51,6 @@ area-signalr:
- src/SignalR/**/*
#area-websockets:
api-suggestion:
- src/**/ref/**/*

1
.github/workflows/labeler.yml поставляемый
Просмотреть файл

@ -7,5 +7,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2
if: github.repository == 'aspnet/AspNetCore'
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

Просмотреть файл

@ -2,6 +2,9 @@
<configuration>
<packageSources>
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<add key="darc-pub-dotnet-corefx-4ac4c03" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-corefx-4ac4c036/nuget/v3/index.json" />
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="aspnet-blazor" value="https://dotnetfeed.blob.core.windows.net/aspnet-blazor/index.json" />

Просмотреть файл

@ -189,3 +189,31 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
License notice for corefx
------------------------------------------------
The MIT License (MIT)
Copyright (c) .NET Foundation and Contributors
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Просмотреть файл

@ -9,408 +9,408 @@
-->
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="5.0.0-alpha1.19514.2">
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="5.0.0-alpha1.19516.2">
<Uri>https://github.com/aspnet/Blazor</Uri>
<Sha>adc2dc6547bc542aa687c712e0e3c0e5de3500fe</Sha>
<Sha>af9bec917415a00716551608d734ddb1b729eb2b</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="5.0.0-alpha1.19513.1">
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="5.0.0-alpha1.19517.12">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>debe2d2e911020ffee5d6e95eb4dc6d0754bd8ef</Sha>
<Sha>5d3c4074fe2df12afefab2292e4644b4f2686b29</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="5.0.0-alpha1.19513.1">
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="5.0.0-alpha1.19517.12">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>debe2d2e911020ffee5d6e95eb4dc6d0754bd8ef</Sha>
<Sha>5d3c4074fe2df12afefab2292e4644b4f2686b29</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="5.0.0-alpha1.19513.1">
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="5.0.0-alpha1.19517.12">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>debe2d2e911020ffee5d6e95eb4dc6d0754bd8ef</Sha>
<Sha>5d3c4074fe2df12afefab2292e4644b4f2686b29</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk.Razor" Version="5.0.0-alpha1.19513.1">
<Dependency Name="Microsoft.NET.Sdk.Razor" Version="5.0.0-alpha1.19517.12">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>debe2d2e911020ffee5d6e95eb4dc6d0754bd8ef</Sha>
<Sha>5d3c4074fe2df12afefab2292e4644b4f2686b29</Sha>
</Dependency>
<Dependency Name="dotnet-ef" Version="5.0.0-alpha1.19515.8">
<Dependency Name="dotnet-ef" Version="5.0.0-alpha1.19518.8">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>2da52082db1fb33f785822c560f2373e691bab0c</Sha>
<Sha>717c0693868642f1dae589f765d775dbc881cf7d</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0-alpha1.19515.8">
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0-alpha1.19518.8">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>2da52082db1fb33f785822c560f2373e691bab0c</Sha>
<Sha>717c0693868642f1dae589f765d775dbc881cf7d</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0-alpha1.19515.8">
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0-alpha1.19518.8">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>2da52082db1fb33f785822c560f2373e691bab0c</Sha>
<Sha>717c0693868642f1dae589f765d775dbc881cf7d</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-alpha1.19515.8">
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-alpha1.19518.8">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>2da52082db1fb33f785822c560f2373e691bab0c</Sha>
<Sha>717c0693868642f1dae589f765d775dbc881cf7d</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-alpha1.19515.8">
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-alpha1.19518.8">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>2da52082db1fb33f785822c560f2373e691bab0c</Sha>
<Sha>717c0693868642f1dae589f765d775dbc881cf7d</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-alpha1.19515.8">
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-alpha1.19518.8">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>2da52082db1fb33f785822c560f2373e691bab0c</Sha>
<Sha>717c0693868642f1dae589f765d775dbc881cf7d</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore" Version="5.0.0-alpha1.19515.8">
<Dependency Name="Microsoft.EntityFrameworkCore" Version="5.0.0-alpha1.19518.8">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>2da52082db1fb33f785822c560f2373e691bab0c</Sha>
<Sha>717c0693868642f1dae589f765d775dbc881cf7d</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Analyzer.Testing" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.AspNetCore.Analyzer.Testing" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ActivatorUtilities.Sources" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ActivatorUtilities.Sources" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.SqlServer" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.SqlServer" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.CommandLineUtils.Sources" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.CommandLineUtils.Sources" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.AzureKeyVault" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.AzureKeyVault" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.KeyPerFile" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.KeyPerFile" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DiagnosticAdapter" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.DiagnosticAdapter" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HashCodeCombiner.Sources" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.HashCodeCombiner.Sources" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Hosting" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Hosting" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Http" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Http" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Localization.Abstractions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Localization.Abstractions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Localization" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Localization" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Testing" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Testing" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ObjectPool" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ObjectPool" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Options" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Primitives" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Primitives" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.TypeNameHelper.Sources" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.TypeNameHelper.Sources" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ValueStopwatch.Sources" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ValueStopwatch.Sources" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.WebEncoders" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.WebEncoders" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Internal.Extensions.Refs" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Internal.Extensions.Refs" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.JSInterop" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.JSInterop" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Mono.WebAssembly.Interop" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Mono.WebAssembly.Interop" Version="5.0.0-preview2.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Bcl.AsyncInterfaces" Version="1.2.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>4ac4c0367003fe3973a3648eb0715ddb0e3bbcea</Sha>
</Dependency>
<Dependency Name="Microsoft.CSharp" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.CSharp" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="Microsoft.Win32.SystemEvents" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.Win32.SystemEvents" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.ComponentModel.Annotations" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.ComponentModel.Annotations" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Diagnostics.EventLog" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Diagnostics.EventLog" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Drawing.Common" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Drawing.Common" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.IO.Pipelines" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.IO.Pipelines" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Net.Http.WinHttpHandler" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Net.Http.WinHttpHandler" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Reflection.Metadata" Version="1.9.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Reflection.Metadata" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Cng" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Cryptography.Cng" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Pkcs" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Cryptography.Pkcs" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Security.Permissions" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Permissions" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Security.Principal.Windows" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Principal.Windows" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.ServiceProcess.ServiceController" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.ServiceProcess.ServiceController" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Text.Encodings.Web" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Text.Encodings.Web" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Text.Json" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Threading.Channels" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Threading.Channels" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="System.Windows.Extensions" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Windows.Extensions" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="5.0.0-alpha1.19514.1" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="5.0.0-alpha1.19517.2" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>4ace84dbf94128b4825c76cdd09b46dba7473478</Sha>
<Sha>a484aa78e137262669266591696fe188ca2b5d63</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="5.0.0-alpha1.19514.1" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="5.0.0-alpha1.19517.2" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>4ace84dbf94128b4825c76cdd09b46dba7473478</Sha>
<Sha>a484aa78e137262669266591696fe188ca2b5d63</Sha>
</Dependency>
<!--
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
All Runtime.$rid packages should have the same version.
-->
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="5.0.0-alpha1.19514.1" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="5.0.0-alpha1.19517.2" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>4ace84dbf94128b4825c76cdd09b46dba7473478</Sha>
<Sha>a484aa78e137262669266591696fe188ca2b5d63</Sha>
</Dependency>
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0-alpha1.19514.1" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0-alpha1.19517.2" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>4ace84dbf94128b4825c76cdd09b46dba7473478</Sha>
<Sha>a484aa78e137262669266591696fe188ca2b5d63</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-alpha1.19504.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-alpha1.19516.16" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a434a52ae3f1175bc1cad8b1a02b0921ef3b1f55</Sha>
<Sha>b9186cfa3566ee24e5f16e45c542a3078e128dc6</Sha>
</Dependency>
<Dependency Name="Internal.AspNetCore.Analyzers" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Internal.AspNetCore.Analyzers" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19510.3">
<Uri>https://github.com/dotnet/arcade</Uri>
@ -424,9 +424,9 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>f70d1fca3d5d4045be75694006f1bee0e0aec572</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Testing" Version="5.0.0-alpha1.19514.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.AspNetCore.Testing" Version="5.0.0-alpha1.19517.7" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>5fb4eb52033b15dea5a4165fb7ce15f6bee83cf0</Sha>
<Sha>f15f3278c73c72a6546d7cb2c1bd54a541ffc83e</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.4.0-beta1-19456-03" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/roslyn</Uri>

Просмотреть файл

@ -66,112 +66,112 @@
<!-- Packages from dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>3.4.0-beta1-19456-03</MicrosoftNetCompilersToolsetPackageVersion>
<!-- Packages from dotnet/core-setup -->
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-alpha1.19514.1</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-alpha1.19514.1</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-alpha1.19514.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<NETStandardLibraryRefPackageVersion>2.1.0-alpha1.19514.1</NETStandardLibraryRefPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-alpha1.19517.2</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-alpha1.19517.2</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-alpha1.19517.2</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<NETStandardLibraryRefPackageVersion>2.1.0-alpha1.19517.2</NETStandardLibraryRefPackageVersion>
<!-- Packages from dotnet/corefx -->
<MicrosoftBclAsyncInterfacesPackageVersion>1.2.0-alpha1.19504.7</MicrosoftBclAsyncInterfacesPackageVersion>
<MicrosoftCSharpPackageVersion>5.0.0-alpha1.19504.7</MicrosoftCSharpPackageVersion>
<MicrosoftWin32RegistryPackageVersion>5.0.0-alpha1.19504.7</MicrosoftWin32RegistryPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-alpha1.19504.7</MicrosoftWin32SystemEventsPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>5.0.0-alpha1.19504.7</SystemComponentModelAnnotationsPackageVersion>
<SystemDiagnosticsEventLogPackageVersion>5.0.0-alpha1.19504.7</SystemDiagnosticsEventLogPackageVersion>
<SystemDrawingCommonPackageVersion>5.0.0-alpha1.19504.7</SystemDrawingCommonPackageVersion>
<SystemIOPipelinesPackageVersion>5.0.0-alpha1.19504.7</SystemIOPipelinesPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>5.0.0-alpha1.19504.7</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0-alpha1.19504.7</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemReflectionMetadataPackageVersion>1.9.0-alpha1.19504.7</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0-alpha1.19504.7</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityCryptographyCngPackageVersion>5.0.0-alpha1.19504.7</SystemSecurityCryptographyCngPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>5.0.0-alpha1.19504.7</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-alpha1.19504.7</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>5.0.0-alpha1.19504.7</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-alpha1.19504.7</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>5.0.0-alpha1.19504.7</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>5.0.0-alpha1.19504.7</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>5.0.0-alpha1.19504.7</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>5.0.0-alpha1.19504.7</SystemThreadingChannelsPackageVersion>
<SystemWindowsExtensionsPackageVersion>5.0.0-alpha1.19504.7</SystemWindowsExtensionsPackageVersion>
<MicrosoftBclAsyncInterfacesPackageVersion>1.0.0</MicrosoftBclAsyncInterfacesPackageVersion>
<MicrosoftCSharpPackageVersion>5.0.0-alpha1.19516.16</MicrosoftCSharpPackageVersion>
<MicrosoftWin32RegistryPackageVersion>5.0.0-alpha1.19516.16</MicrosoftWin32RegistryPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-alpha1.19516.16</MicrosoftWin32SystemEventsPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>5.0.0-alpha1.19516.16</SystemComponentModelAnnotationsPackageVersion>
<SystemDiagnosticsEventLogPackageVersion>5.0.0-alpha1.19516.16</SystemDiagnosticsEventLogPackageVersion>
<SystemDrawingCommonPackageVersion>5.0.0-alpha1.19516.16</SystemDrawingCommonPackageVersion>
<SystemIOPipelinesPackageVersion>5.0.0-alpha1.19516.16</SystemIOPipelinesPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>5.0.0-alpha1.19516.16</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0-alpha1.19516.16</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemReflectionMetadataPackageVersion>5.0.0-alpha1.19516.16</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0-alpha1.19516.16</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityCryptographyCngPackageVersion>5.0.0-alpha1.19516.16</SystemSecurityCryptographyCngPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>5.0.0-alpha1.19516.16</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-alpha1.19516.16</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>5.0.0-alpha1.19516.16</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-alpha1.19516.16</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>5.0.0-alpha1.19516.16</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>5.0.0-alpha1.19516.16</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>5.0.0-alpha1.19516.16</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>5.0.0-alpha1.19516.16</SystemThreadingChannelsPackageVersion>
<SystemWindowsExtensionsPackageVersion>5.0.0-alpha1.19516.16</SystemWindowsExtensionsPackageVersion>
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-alpha1.19504.7</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-alpha1.19516.16</MicrosoftNETCorePlatformsPackageVersion>
<!-- Packages from aspnet/Blazor -->
<MicrosoftAspNetCoreBlazorMonoPackageVersion>5.0.0-alpha1.19514.2</MicrosoftAspNetCoreBlazorMonoPackageVersion>
<MicrosoftAspNetCoreBlazorMonoPackageVersion>5.0.0-alpha1.19516.2</MicrosoftAspNetCoreBlazorMonoPackageVersion>
<!-- Packages from aspnet/Extensions -->
<InternalAspNetCoreAnalyzersPackageVersion>5.0.0-alpha1.19514.8</InternalAspNetCoreAnalyzersPackageVersion>
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>5.0.0-alpha1.19514.8</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>5.0.0-alpha1.19514.8</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsCachingAbstractionsPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsCachingSqlServerPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsCachingSqlServerPackageVersion>
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationIniPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationIniPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsConfigurationXmlPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
<MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsFileProvidersCompositePackageVersion>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsHostingPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsHttpPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsHttpPackageVersion>
<MicrosoftExtensionsLocalizationAbstractionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLocalizationAbstractionsPackageVersion>
<MicrosoftExtensionsLocalizationPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLocalizationPackageVersion>
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
<MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingEventSourcePackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingEventSourcePackageVersion>
<MicrosoftExtensionsLoggingEventLogPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingEventLogPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
<MicrosoftExtensionsObjectPoolPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsObjectPoolPackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>
<MicrosoftExtensionsPrimitivesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsPrimitivesPackageVersion>
<MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
<MicrosoftExtensionsWebEncodersPackageVersion>5.0.0-alpha1.19514.8</MicrosoftExtensionsWebEncodersPackageVersion>
<MicrosoftInternalExtensionsRefsPackageVersion>5.0.0-alpha1.19514.8</MicrosoftInternalExtensionsRefsPackageVersion>
<MicrosoftJSInteropPackageVersion>5.0.0-alpha1.19514.8</MicrosoftJSInteropPackageVersion>
<MonoWebAssemblyInteropPackageVersion>5.0.0-alpha1.19514.8</MonoWebAssemblyInteropPackageVersion>
<InternalAspNetCoreAnalyzersPackageVersion>5.0.0-alpha1.19517.7</InternalAspNetCoreAnalyzersPackageVersion>
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>5.0.0-alpha1.19517.7</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>5.0.0-alpha1.19517.7</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsCachingAbstractionsPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsCachingSqlServerPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsCachingSqlServerPackageVersion>
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationIniPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationIniPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsConfigurationXmlPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
<MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsFileProvidersCompositePackageVersion>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsHostingPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsHttpPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsHttpPackageVersion>
<MicrosoftExtensionsLocalizationAbstractionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLocalizationAbstractionsPackageVersion>
<MicrosoftExtensionsLocalizationPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLocalizationPackageVersion>
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
<MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingEventSourcePackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingEventSourcePackageVersion>
<MicrosoftExtensionsLoggingEventLogPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingEventLogPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
<MicrosoftExtensionsObjectPoolPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsObjectPoolPackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>
<MicrosoftExtensionsPrimitivesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsPrimitivesPackageVersion>
<MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
<MicrosoftExtensionsWebEncodersPackageVersion>5.0.0-alpha1.19517.7</MicrosoftExtensionsWebEncodersPackageVersion>
<MicrosoftInternalExtensionsRefsPackageVersion>5.0.0-alpha1.19517.7</MicrosoftInternalExtensionsRefsPackageVersion>
<MicrosoftJSInteropPackageVersion>5.0.0-alpha1.19517.7</MicrosoftJSInteropPackageVersion>
<MonoWebAssemblyInteropPackageVersion>5.0.0-preview2.19517.7</MonoWebAssemblyInteropPackageVersion>
<!-- Packages from aspnet/EntityFrameworkCore -->
<dotnetefPackageVersion>5.0.0-alpha1.19515.8</dotnetefPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-alpha1.19515.8</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>5.0.0-alpha1.19515.8</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>5.0.0-alpha1.19515.8</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>5.0.0-alpha1.19515.8</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>5.0.0-alpha1.19515.8</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>5.0.0-alpha1.19515.8</MicrosoftEntityFrameworkCorePackageVersion>
<dotnetefPackageVersion>5.0.0-alpha1.19518.8</dotnetefPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-alpha1.19518.8</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>5.0.0-alpha1.19518.8</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>5.0.0-alpha1.19518.8</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>5.0.0-alpha1.19518.8</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>5.0.0-alpha1.19518.8</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>5.0.0-alpha1.19518.8</MicrosoftEntityFrameworkCorePackageVersion>
<!-- Packages from aspnet/AspNetCore-Tooling -->
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>5.0.0-alpha1.19513.1</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
<MicrosoftAspNetCoreRazorLanguagePackageVersion>5.0.0-alpha1.19513.1</MicrosoftAspNetCoreRazorLanguagePackageVersion>
<MicrosoftCodeAnalysisRazorPackageVersion>5.0.0-alpha1.19513.1</MicrosoftCodeAnalysisRazorPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>5.0.0-alpha1.19513.1</MicrosoftNETSdkRazorPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>5.0.0-alpha1.19517.12</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
<MicrosoftAspNetCoreRazorLanguagePackageVersion>5.0.0-alpha1.19517.12</MicrosoftAspNetCoreRazorLanguagePackageVersion>
<MicrosoftCodeAnalysisRazorPackageVersion>5.0.0-alpha1.19517.12</MicrosoftCodeAnalysisRazorPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>5.0.0-alpha1.19517.12</MicrosoftNETSdkRazorPackageVersion>
</PropertyGroup>
<!--

Просмотреть файл

@ -26,6 +26,8 @@ namespace Microsoft.AspNetCore.Http
_serviceScopeFactory = serviceProvider.GetRequiredService<IServiceScopeFactory>();
}
internal IHttpContextAccessor HttpContextAccessor => _httpContextAccessor;
public HttpContext Create(IFeatureCollection featureCollection)
{
if (featureCollection is null)

Просмотреть файл

@ -96,6 +96,14 @@ namespace Microsoft.AspNetCore.Hosting
if (_defaultHttpContextFactory != null)
{
_defaultHttpContextFactory.Dispose((DefaultHttpContext)httpContext);
if (_defaultHttpContextFactory.HttpContextAccessor != null)
{
// Clear the HttpContext if the accessor was used. It's likely that the lifetime extends
// past the end of the http request and we want to avoid changing the reference from under
// consumers.
context.HttpContext = null;
}
}
else
{

Просмотреть файл

@ -0,0 +1,532 @@
// 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;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Logging;
using Moq;
using Xunit;
namespace Microsoft.AspNetCore.Hosting.Tests
{
public class HostingApplicationDiagnosticsTests
{
[Fact]
public void DisposeContextDoesNotThrowWhenContextScopeIsNull()
{
// Arrange
var hostingApplication = CreateApplication(out var features);
var context = hostingApplication.CreateContext(features);
// Act/Assert
hostingApplication.DisposeContext(context, null);
}
[Fact]
public void CreateContextWithDisabledLoggerDoesNotCreateActivity()
{
// Arrange
var hostingApplication = CreateApplication(out var features);
// Act
hostingApplication.CreateContext(features);
Assert.Null(Activity.Current);
}
[Fact]
public void CreateContextWithEnabledLoggerCreatesActivityAndSetsActivityInScope()
{
// Arrange
var logger = new LoggerWithScopes(isEnabled: true);
var hostingApplication = CreateApplication(out var features, logger: logger);
// Act
var context = hostingApplication.CreateContext(features);
Assert.Single(logger.Scopes);
var pairs = ((IReadOnlyList<KeyValuePair<string, object>>)logger.Scopes[0]).ToDictionary(p => p.Key, p => p.Value);
Assert.Equal(Activity.Current.Id, pairs["SpanId"].ToString());
Assert.Equal(Activity.Current.RootId, pairs["TraceId"].ToString());
Assert.Equal(string.Empty, pairs["ParentId"]?.ToString());
}
[Fact]
public void CreateContextWithEnabledLoggerAndRequestIdCreatesActivityAndSetsActivityInScope()
{
// Arrange
// Generate an id we can use for the request id header (in the correct format)
var activity = new Activity("IncomingRequest");
activity.Start();
var id = activity.Id;
activity.Stop();
var logger = new LoggerWithScopes(isEnabled: true);
var hostingApplication = CreateApplication(out var features, logger: logger, configure: context =>
{
context.Request.Headers["Request-Id"] = id;
});
// Act
var context = hostingApplication.CreateContext(features);
Assert.Single(logger.Scopes);
var pairs = ((IReadOnlyList<KeyValuePair<string, object>>)logger.Scopes[0]).ToDictionary(p => p.Key, p => p.Value);
Assert.Equal(Activity.Current.Id, pairs["SpanId"].ToString());
Assert.Equal(Activity.Current.RootId, pairs["TraceId"].ToString());
Assert.Equal(id, pairs["ParentId"].ToString());
}
[Fact]
public void ActivityStopDoesNotFireIfNoListenerAttachedForStart()
{
// Arrange
var diagnosticListener = new DiagnosticListener("DummySource");
var logger = new LoggerWithScopes(isEnabled: true);
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener, logger: logger);
var startFired = false;
var stopFired = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
// This should not fire
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Start")
{
startFired = true;
}
// This should not fire
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Stop")
{
stopFired = true;
}
}),
(s, o, arg3) =>
{
// The events are off
return false;
});
// Act
var context = hostingApplication.CreateContext(features);
hostingApplication.DisposeContext(context, exception: null);
Assert.False(startFired);
Assert.False(stopFired);
Assert.Null(Activity.Current);
}
[Fact]
public void ActivityIsNotCreatedWhenIsEnabledForActivityIsFalse()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool eventsFired = false;
bool isEnabledActivityFired = false;
bool isEnabledStartFired = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
eventsFired |= pair.Key.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn");
}), (s, o, arg3) =>
{
if (s == "Microsoft.AspNetCore.Hosting.HttpRequestIn")
{
Assert.IsAssignableFrom<HttpContext>(o);
isEnabledActivityFired = true;
}
if (s == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Start")
{
isEnabledStartFired = true;
}
return false;
});
hostingApplication.CreateContext(features);
Assert.Null(Activity.Current);
Assert.True(isEnabledActivityFired);
Assert.False(isEnabledStartFired);
Assert.False(eventsFired);
}
[Fact]
public void ActivityIsCreatedButNotLoggedWhenIsEnabledForActivityStartIsFalse()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool eventsFired = false;
bool isEnabledStartFired = false;
bool isEnabledActivityFired = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
eventsFired |= pair.Key.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn");
}), (s, o, arg3) =>
{
if (s == "Microsoft.AspNetCore.Hosting.HttpRequestIn")
{
Assert.IsAssignableFrom<HttpContext>(o);
isEnabledActivityFired = true;
return true;
}
if (s == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Start")
{
isEnabledStartFired = true;
return false;
}
return true;
});
hostingApplication.CreateContext(features);
Assert.NotNull(Activity.Current);
Assert.True(isEnabledActivityFired);
Assert.True(isEnabledStartFired);
Assert.False(eventsFired);
}
[Fact]
public void ActivityIsCreatedAndLogged()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool startCalled = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Start")
{
startCalled = true;
Assert.NotNull(pair.Value);
Assert.NotNull(Activity.Current);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
AssertProperty<HttpContext>(pair.Value, "HttpContext");
}
}));
hostingApplication.CreateContext(features);
Assert.NotNull(Activity.Current);
Assert.True(startCalled);
}
[Fact]
public void ActivityIsStoppedDuringStopCall()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool endCalled = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Stop")
{
endCalled = true;
Assert.NotNull(Activity.Current);
Assert.True(Activity.Current.Duration > TimeSpan.Zero);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
AssertProperty<HttpContext>(pair.Value, "HttpContext");
}
}));
var context = hostingApplication.CreateContext(features);
hostingApplication.DisposeContext(context, null);
Assert.True(endCalled);
}
[Fact]
public void ActivityIsStoppedDuringUnhandledExceptionCall()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool endCalled = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Stop")
{
endCalled = true;
Assert.NotNull(Activity.Current);
Assert.True(Activity.Current.Duration > TimeSpan.Zero);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
AssertProperty<HttpContext>(pair.Value, "HttpContext");
}
}));
var context = hostingApplication.CreateContext(features);
hostingApplication.DisposeContext(context, new Exception());
Assert.True(endCalled);
}
[Fact]
public void ActivityIsAvailableDuringUnhandledExceptionCall()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool endCalled = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
if (pair.Key == "Microsoft.AspNetCore.Hosting.UnhandledException")
{
endCalled = true;
Assert.NotNull(Activity.Current);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
}
}));
var context = hostingApplication.CreateContext(features);
hostingApplication.DisposeContext(context, new Exception());
Assert.True(endCalled);
}
[Fact]
public void ActivityIsAvailibleDuringRequest()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair => { }),
s =>
{
if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn"))
{
return true;
}
return false;
});
hostingApplication.CreateContext(features);
Assert.NotNull(Activity.Current);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
}
[Fact]
public void ActivityParentIdAndBaggeReadFromHeaders()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair => { }),
s =>
{
if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn"))
{
return true;
}
return false;
});
features.Set<IHttpRequestFeature>(new HttpRequestFeature()
{
Headers = new HeaderDictionary()
{
{"Request-Id", "ParentId1"},
{"Correlation-Context", "Key1=value1, Key2=value2"}
}
});
hostingApplication.CreateContext(features);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
Assert.Equal("ParentId1", Activity.Current.ParentId);
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1");
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2");
}
[Fact]
public void ActivityTraceParentAndTraceStateFromHeaders()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair => { }),
s =>
{
if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn"))
{
return true;
}
return false;
});
features.Set<IHttpRequestFeature>(new HttpRequestFeature()
{
Headers = new HeaderDictionary()
{
{"traceparent", "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01"},
{"tracestate", "TraceState1"},
{"Correlation-Context", "Key1=value1, Key2=value2"}
}
});
hostingApplication.CreateContext(features);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
Assert.Equal(ActivityIdFormat.W3C, Activity.Current.IdFormat);
Assert.Equal("0123456789abcdef0123456789abcdef", Activity.Current.TraceId.ToHexString());
Assert.Equal("0123456789abcdef", Activity.Current.ParentSpanId.ToHexString());
Assert.Equal("TraceState1", Activity.Current.TraceStateString);
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1");
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2");
}
[Fact]
public void ActivityOnExportHookIsCalled()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool onActivityImportCalled = false;
diagnosticListener.Subscribe(
observer: new CallbackDiagnosticListener(pair => { }),
isEnabled: (s, o, _) => true,
onActivityImport: (activity, context) =>
{
onActivityImportCalled = true;
Assert.Null(Activity.Current);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", activity.OperationName);
Assert.NotNull(context);
Assert.IsAssignableFrom<HttpContext>(context);
activity.ActivityTraceFlags = ActivityTraceFlags.Recorded;
});
hostingApplication.CreateContext(features);
Assert.True(onActivityImportCalled);
Assert.NotNull(Activity.Current);
Assert.True(Activity.Current.Recorded);
}
private static void AssertProperty<T>(object o, string name)
{
Assert.NotNull(o);
var property = o.GetType().GetTypeInfo().GetProperty(name, BindingFlags.Instance | BindingFlags.Public);
Assert.NotNull(property);
var value = property.GetValue(o);
Assert.NotNull(value);
Assert.IsAssignableFrom<T>(value);
}
private static HostingApplication CreateApplication(out FeatureCollection features,
DiagnosticListener diagnosticListener = null, ILogger logger = null, Action<DefaultHttpContext> configure = null)
{
var httpContextFactory = new Mock<IHttpContextFactory>();
features = new FeatureCollection();
features.Set<IHttpRequestFeature>(new HttpRequestFeature());
var context = new DefaultHttpContext(features);
configure?.Invoke(context);
httpContextFactory.Setup(s => s.Create(It.IsAny<IFeatureCollection>())).Returns(context);
httpContextFactory.Setup(s => s.Dispose(It.IsAny<HttpContext>()));
var hostingApplication = new HostingApplication(
ctx => Task.CompletedTask,
logger ?? new NullScopeLogger(),
diagnosticListener ?? new NoopDiagnosticListener(),
httpContextFactory.Object);
return hostingApplication;
}
private class NullScopeLogger : ILogger
{
private readonly bool _isEnabled;
public NullScopeLogger(bool isEnabled = false)
{
_isEnabled = isEnabled;
}
public IDisposable BeginScope<TState>(TState state) => null;
public bool IsEnabled(LogLevel logLevel) => _isEnabled;
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
{
}
}
private class LoggerWithScopes : ILogger
{
private readonly bool _isEnabled;
public LoggerWithScopes(bool isEnabled = false)
{
_isEnabled = isEnabled;
}
public IDisposable BeginScope<TState>(TState state)
{
Scopes.Add(state);
return new Scope();
}
public List<object> Scopes { get; set; } = new List<object>();
public bool IsEnabled(LogLevel logLevel) => _isEnabled;
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
{
}
private class Scope : IDisposable
{
public void Dispose()
{
}
}
}
private class NoopDiagnosticListener : DiagnosticListener
{
private readonly bool _isEnabled;
public NoopDiagnosticListener(bool isEnabled = false) : base("DummyListener")
{
_isEnabled = isEnabled;
}
public override bool IsEnabled(string name) => _isEnabled;
public override void Write(string name, object value)
{
}
}
private class CallbackDiagnosticListener : IObserver<KeyValuePair<string, object>>
{
private readonly Action<KeyValuePair<string, object>> _callback;
public CallbackDiagnosticListener(Action<KeyValuePair<string, object>> callback)
{
_callback = callback;
}
public void OnNext(KeyValuePair<string, object> value)
{
_callback(value);
}
public void OnError(Exception error)
{
}
public void OnCompleted()
{
}
}
}
}

Просмотреть файл

@ -1,532 +1,136 @@
// 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;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting.Server.Abstractions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using Moq;
using Xunit;
using static Microsoft.AspNetCore.Hosting.HostingApplication;
namespace Microsoft.AspNetCore.Hosting.Tests
{
public class HostingApplicationTests
{
[Fact]
public void DisposeContextDoesNotThrowWhenContextScopeIsNull()
public void DisposeContextDoesNotClearHttpContextIfDefaultHttpContextFactoryUsed()
{
// Arrange
var hostingApplication = CreateApplication(out var features);
var hostingApplication = CreateApplication();
var httpContext = new DefaultHttpContext();
var context = hostingApplication.CreateContext(httpContext.Features);
Assert.NotNull(context.HttpContext);
// Act/Assert
hostingApplication.DisposeContext(context, null);
Assert.NotNull(context.HttpContext);
}
[Fact]
public void DisposeContextClearsHttpContextIfIHttpContextAccessorIsActive()
{
// Arrange
var hostingApplication = CreateApplication(useHttpContextAccessor: true);
var httpContext = new DefaultHttpContext();
var context = hostingApplication.CreateContext(httpContext.Features);
Assert.NotNull(context.HttpContext);
// Act/Assert
hostingApplication.DisposeContext(context, null);
Assert.Null(context.HttpContext);
}
[Fact]
public void CreateContextReinitializesPreviouslyStoredDefaultHttpContext()
{
// Arrange
var hostingApplication = CreateApplication();
var features = new FeaturesWithContext<Context>(new DefaultHttpContext().Features);
var previousContext = new DefaultHttpContext();
// Pretend like we had previous HttpContext
features.HostContext = new Context();
features.HostContext.HttpContext = previousContext;
var context = hostingApplication.CreateContext(features);
Assert.Same(previousContext, context.HttpContext);
// Act/Assert
hostingApplication.DisposeContext(context, null);
Assert.Same(previousContext, context.HttpContext);
}
[Fact]
public void CreateContextCreatesNewContextIfNotUsingDefaultHttpContextFactory()
{
// Arrange
var factory = new Mock<IHttpContextFactory>();
factory.Setup(m => m.Create(It.IsAny<IFeatureCollection>())).Returns<IFeatureCollection>(f => new DefaultHttpContext(f));
factory.Setup(m => m.Dispose(It.IsAny<HttpContext>())).Callback(() => { });
var hostingApplication = CreateApplication(factory.Object);
var features = new FeaturesWithContext<Context>(new DefaultHttpContext().Features);
var previousContext = new DefaultHttpContext();
// Pretend like we had previous HttpContext
features.HostContext = new Context();
features.HostContext.HttpContext = previousContext;
var context = hostingApplication.CreateContext(features);
Assert.NotSame(previousContext, context.HttpContext);
// Act/Assert
hostingApplication.DisposeContext(context, null);
}
[Fact]
public void CreateContextWithDisabledLoggerDoesNotCreateActivity()
private static HostingApplication CreateApplication(IHttpContextFactory httpContextFactory = null, bool useHttpContextAccessor = false)
{
// Arrange
var hostingApplication = CreateApplication(out var features);
// Act
hostingApplication.CreateContext(features);
Assert.Null(Activity.Current);
}
[Fact]
public void CreateContextWithEnabledLoggerCreatesActivityAndSetsActivityInScope()
{
// Arrange
var logger = new LoggerWithScopes(isEnabled: true);
var hostingApplication = CreateApplication(out var features, logger: logger);
// Act
var context = hostingApplication.CreateContext(features);
Assert.Single(logger.Scopes);
var pairs = ((IReadOnlyList<KeyValuePair<string, object>>)logger.Scopes[0]).ToDictionary(p => p.Key, p => p.Value);
Assert.Equal(Activity.Current.Id, pairs["SpanId"].ToString());
Assert.Equal(Activity.Current.RootId, pairs["TraceId"].ToString());
Assert.Equal(string.Empty, pairs["ParentId"]?.ToString());
}
[Fact]
public void CreateContextWithEnabledLoggerAndRequestIdCreatesActivityAndSetsActivityInScope()
{
// Arrange
// Generate an id we can use for the request id header (in the correct format)
var activity = new Activity("IncomingRequest");
activity.Start();
var id = activity.Id;
activity.Stop();
var logger = new LoggerWithScopes(isEnabled: true);
var hostingApplication = CreateApplication(out var features, logger: logger, configure: context =>
var services = new ServiceCollection();
services.AddOptions();
if (useHttpContextAccessor)
{
context.Request.Headers["Request-Id"] = id;
});
services.AddHttpContextAccessor();
}
// Act
var context = hostingApplication.CreateContext(features);
Assert.Single(logger.Scopes);
var pairs = ((IReadOnlyList<KeyValuePair<string, object>>)logger.Scopes[0]).ToDictionary(p => p.Key, p => p.Value);
Assert.Equal(Activity.Current.Id, pairs["SpanId"].ToString());
Assert.Equal(Activity.Current.RootId, pairs["TraceId"].ToString());
Assert.Equal(id, pairs["ParentId"].ToString());
}
[Fact]
public void ActivityStopDoesNotFireIfNoListenerAttachedForStart()
{
// Arrange
var diagnosticListener = new DiagnosticListener("DummySource");
var logger = new LoggerWithScopes(isEnabled: true);
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener, logger: logger);
var startFired = false;
var stopFired = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
// This should not fire
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Start")
{
startFired = true;
}
// This should not fire
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Stop")
{
stopFired = true;
}
}),
(s, o, arg3) =>
{
// The events are off
return false;
});
// Act
var context = hostingApplication.CreateContext(features);
hostingApplication.DisposeContext(context, exception: null);
Assert.False(startFired);
Assert.False(stopFired);
Assert.Null(Activity.Current);
}
[Fact]
public void ActivityIsNotCreatedWhenIsEnabledForActivityIsFalse()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool eventsFired = false;
bool isEnabledActivityFired = false;
bool isEnabledStartFired = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
eventsFired |= pair.Key.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn");
}), (s, o, arg3) =>
{
if (s == "Microsoft.AspNetCore.Hosting.HttpRequestIn")
{
Assert.IsAssignableFrom<HttpContext>(o);
isEnabledActivityFired = true;
}
if (s == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Start")
{
isEnabledStartFired = true;
}
return false;
});
hostingApplication.CreateContext(features);
Assert.Null(Activity.Current);
Assert.True(isEnabledActivityFired);
Assert.False(isEnabledStartFired);
Assert.False(eventsFired);
}
[Fact]
public void ActivityIsCreatedButNotLoggedWhenIsEnabledForActivityStartIsFalse()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool eventsFired = false;
bool isEnabledStartFired = false;
bool isEnabledActivityFired = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
eventsFired |= pair.Key.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn");
}), (s, o, arg3) =>
{
if (s == "Microsoft.AspNetCore.Hosting.HttpRequestIn")
{
Assert.IsAssignableFrom<HttpContext>(o);
isEnabledActivityFired = true;
return true;
}
if (s == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Start")
{
isEnabledStartFired = true;
return false;
}
return true;
});
hostingApplication.CreateContext(features);
Assert.NotNull(Activity.Current);
Assert.True(isEnabledActivityFired);
Assert.True(isEnabledStartFired);
Assert.False(eventsFired);
}
[Fact]
public void ActivityIsCreatedAndLogged()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool startCalled = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Start")
{
startCalled = true;
Assert.NotNull(pair.Value);
Assert.NotNull(Activity.Current);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
AssertProperty<HttpContext>(pair.Value, "HttpContext");
}
}));
hostingApplication.CreateContext(features);
Assert.NotNull(Activity.Current);
Assert.True(startCalled);
}
[Fact]
public void ActivityIsStoppedDuringStopCall()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool endCalled = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Stop")
{
endCalled = true;
Assert.NotNull(Activity.Current);
Assert.True(Activity.Current.Duration > TimeSpan.Zero);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
AssertProperty<HttpContext>(pair.Value, "HttpContext");
}
}));
var context = hostingApplication.CreateContext(features);
hostingApplication.DisposeContext(context, null);
Assert.True(endCalled);
}
[Fact]
public void ActivityIsStoppedDuringUnhandledExceptionCall()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool endCalled = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
if (pair.Key == "Microsoft.AspNetCore.Hosting.HttpRequestIn.Stop")
{
endCalled = true;
Assert.NotNull(Activity.Current);
Assert.True(Activity.Current.Duration > TimeSpan.Zero);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
AssertProperty<HttpContext>(pair.Value, "HttpContext");
}
}));
var context = hostingApplication.CreateContext(features);
hostingApplication.DisposeContext(context, new Exception());
Assert.True(endCalled);
}
[Fact]
public void ActivityIsAvailableDuringUnhandledExceptionCall()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool endCalled = false;
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair =>
{
if (pair.Key == "Microsoft.AspNetCore.Hosting.UnhandledException")
{
endCalled = true;
Assert.NotNull(Activity.Current);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
}
}));
var context = hostingApplication.CreateContext(features);
hostingApplication.DisposeContext(context, new Exception());
Assert.True(endCalled);
}
[Fact]
public void ActivityIsAvailibleDuringRequest()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair => { }),
s =>
{
if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn"))
{
return true;
}
return false;
});
hostingApplication.CreateContext(features);
Assert.NotNull(Activity.Current);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
}
[Fact]
public void ActivityParentIdAndBaggeReadFromHeaders()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair => { }),
s =>
{
if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn"))
{
return true;
}
return false;
});
features.Set<IHttpRequestFeature>(new HttpRequestFeature()
{
Headers = new HeaderDictionary()
{
{"Request-Id", "ParentId1"},
{"Correlation-Context", "Key1=value1, Key2=value2"}
}
});
hostingApplication.CreateContext(features);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
Assert.Equal("ParentId1", Activity.Current.ParentId);
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1");
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2");
}
[Fact]
public void ActivityTraceParentAndTraceStateFromHeaders()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair => { }),
s =>
{
if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn"))
{
return true;
}
return false;
});
features.Set<IHttpRequestFeature>(new HttpRequestFeature()
{
Headers = new HeaderDictionary()
{
{"traceparent", "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01"},
{"tracestate", "TraceState1"},
{"Correlation-Context", "Key1=value1, Key2=value2"}
}
});
hostingApplication.CreateContext(features);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
Assert.Equal(ActivityIdFormat.W3C, Activity.Current.IdFormat);
Assert.Equal("0123456789abcdef0123456789abcdef", Activity.Current.TraceId.ToHexString());
Assert.Equal("0123456789abcdef", Activity.Current.ParentSpanId.ToHexString());
Assert.Equal("TraceState1", Activity.Current.TraceStateString);
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1");
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2");
}
[Fact]
public void ActivityOnExportHookIsCalled()
{
var diagnosticListener = new DiagnosticListener("DummySource");
var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener);
bool onActivityImportCalled = false;
diagnosticListener.Subscribe(
observer: new CallbackDiagnosticListener(pair => { }),
isEnabled: (s, o, _) => true,
onActivityImport: (activity, context) =>
{
onActivityImportCalled = true;
Assert.Null(Activity.Current);
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", activity.OperationName);
Assert.NotNull(context);
Assert.IsAssignableFrom<HttpContext>(context);
activity.ActivityTraceFlags = ActivityTraceFlags.Recorded;
});
hostingApplication.CreateContext(features);
Assert.True(onActivityImportCalled);
Assert.NotNull(Activity.Current);
Assert.True(Activity.Current.Recorded);
}
private static void AssertProperty<T>(object o, string name)
{
Assert.NotNull(o);
var property = o.GetType().GetTypeInfo().GetProperty(name, BindingFlags.Instance | BindingFlags.Public);
Assert.NotNull(property);
var value = property.GetValue(o);
Assert.NotNull(value);
Assert.IsAssignableFrom<T>(value);
}
private static HostingApplication CreateApplication(out FeatureCollection features,
DiagnosticListener diagnosticListener = null, ILogger logger = null, Action<DefaultHttpContext> configure = null)
{
var httpContextFactory = new Mock<IHttpContextFactory>();
features = new FeatureCollection();
features.Set<IHttpRequestFeature>(new HttpRequestFeature());
var context = new DefaultHttpContext(features);
configure?.Invoke(context);
httpContextFactory.Setup(s => s.Create(It.IsAny<IFeatureCollection>())).Returns(context);
httpContextFactory.Setup(s => s.Dispose(It.IsAny<HttpContext>()));
httpContextFactory ??= new DefaultHttpContextFactory(services.BuildServiceProvider());
var hostingApplication = new HostingApplication(
ctx => Task.CompletedTask,
logger ?? new NullScopeLogger(),
diagnosticListener ?? new NoopDiagnosticListener(),
httpContextFactory.Object);
NullLogger.Instance,
new DiagnosticListener("Microsoft.AspNetCore"),
httpContextFactory);
return hostingApplication;
}
private class NullScopeLogger : ILogger
private class FeaturesWithContext<T> : IHostContextContainer<T>, IFeatureCollection
{
private readonly bool _isEnabled;
public NullScopeLogger(bool isEnabled = false)
public FeaturesWithContext(IFeatureCollection features)
{
_isEnabled = isEnabled;
Features = features;
}
public IDisposable BeginScope<TState>(TState state) => null;
public IFeatureCollection Features { get; }
public bool IsEnabled(LogLevel logLevel) => _isEnabled;
public object this[Type key] { get => Features[key]; set => Features[key] = value; }
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
{
}
}
public T HostContext { get; set; }
private class LoggerWithScopes : ILogger
{
private readonly bool _isEnabled;
public LoggerWithScopes(bool isEnabled = false)
{
_isEnabled = isEnabled;
}
public bool IsReadOnly => Features.IsReadOnly;
public IDisposable BeginScope<TState>(TState state)
{
Scopes.Add(state);
return new Scope();
}
public int Revision => Features.Revision;
public List<object> Scopes { get; set; } = new List<object>();
public TFeature Get<TFeature>() => Features.Get<TFeature>();
public bool IsEnabled(LogLevel logLevel) => _isEnabled;
public IEnumerator<KeyValuePair<Type, object>> GetEnumerator() => Features.GetEnumerator();
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
{
public void Set<TFeature>(TFeature instance) => Features.Set(instance);
}
private class Scope : IDisposable
{
public void Dispose()
{
}
}
}
private class NoopDiagnosticListener : DiagnosticListener
{
private readonly bool _isEnabled;
public NoopDiagnosticListener(bool isEnabled = false) : base("DummyListener")
{
_isEnabled = isEnabled;
}
public override bool IsEnabled(string name) => _isEnabled;
public override void Write(string name, object value)
{
}
}
private class CallbackDiagnosticListener : IObserver<KeyValuePair<string, object>>
{
private readonly Action<KeyValuePair<string, object>> _callback;
public CallbackDiagnosticListener(Action<KeyValuePair<string, object>> callback)
{
_callback = callback;
}
public void OnNext(KeyValuePair<string, object> value)
{
_callback(value);
}
public void OnError(Exception error)
{
}
public void OnCompleted()
{
}
IEnumerator IEnumerable.GetEnumerator() => Features.GetEnumerator();
}
}
}

Просмотреть файл

@ -149,6 +149,7 @@ namespace Microsoft.AspNetCore.Authentication
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authentication.AuthenticationScheme>> GetRequestHandlerSchemesAsync();
System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticationScheme> GetSchemeAsync(string name);
void RemoveScheme(string name);
bool TryAddScheme(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme) { throw null; }
}
public partial interface IAuthenticationService
{

Просмотреть файл

@ -71,6 +71,23 @@ namespace Microsoft.AspNetCore.Authentication
/// <param name="scheme">The scheme.</param>
void AddScheme(AuthenticationScheme scheme);
/// <summary>
/// Registers a scheme for use by <see cref="IAuthenticationService"/>.
/// </summary>
/// <param name="scheme">The scheme.</param>
/// <returns>true if the scheme was added successfully.</returns>
bool TryAddScheme(AuthenticationScheme scheme)
{
try
{
AddScheme(scheme);
return true;
}
catch {
return false;
}
}
/// <summary>
/// Removes a scheme, preventing it from being used by <see cref="IAuthenticationService"/>.
/// </summary>

Просмотреть файл

@ -30,6 +30,7 @@ namespace Microsoft.AspNetCore.Authentication
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authentication.AuthenticationScheme>> GetRequestHandlerSchemesAsync() { throw null; }
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticationScheme> GetSchemeAsync(string name) { throw null; }
public virtual void RemoveScheme(string name) { }
public virtual bool TryAddScheme(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme) { throw null; }
}
public partial class AuthenticationService : Microsoft.AspNetCore.Authentication.IAuthenticationService
{

Просмотреть файл

@ -133,17 +133,18 @@ namespace Microsoft.AspNetCore.Authentication
/// Registers a scheme for use by <see cref="IAuthenticationService"/>.
/// </summary>
/// <param name="scheme">The scheme.</param>
public virtual void AddScheme(AuthenticationScheme scheme)
/// <returns>true if the scheme was added successfully.</returns>
public virtual bool TryAddScheme(AuthenticationScheme scheme)
{
if (_schemes.ContainsKey(scheme.Name))
{
throw new InvalidOperationException("Scheme already exists: " + scheme.Name);
return false;
}
lock (_lock)
{
if (_schemes.ContainsKey(scheme.Name))
{
throw new InvalidOperationException("Scheme already exists: " + scheme.Name);
return false;
}
if (typeof(IAuthenticationRequestHandler).IsAssignableFrom(scheme.HandlerType))
{
@ -152,6 +153,26 @@ namespace Microsoft.AspNetCore.Authentication
}
_schemes[scheme.Name] = scheme;
_schemesCopy = _schemes.Values.ToArray();
return true;
}
}
/// <summary>
/// Registers a scheme for use by <see cref="IAuthenticationService"/>.
/// </summary>
/// <param name="scheme">The scheme.</param>
public virtual void AddScheme(AuthenticationScheme scheme)
{
if (_schemes.ContainsKey(scheme.Name))
{
throw new InvalidOperationException("Scheme already exists: " + scheme.Name);
}
lock (_lock)
{
if (!TryAddScheme(scheme))
{
throw new InvalidOperationException("Scheme already exists: " + scheme.Name);
}
}
}

Просмотреть файл

@ -133,6 +133,23 @@ namespace Microsoft.AspNetCore.Authentication
Assert.Contains("Scheme already exists: signin", error.Message);
}
[Fact]
public void CanSafelyTryAddSchemes()
{
var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o =>
{
}).BuildServiceProvider();
var o = services.GetRequiredService<IAuthenticationSchemeProvider>();
Assert.True(o.TryAddScheme(new AuthenticationScheme("signin", "whatever", typeof(Handler))));
Assert.True(o.TryAddScheme(new AuthenticationScheme("signin2", "whatever", typeof(Handler))));
Assert.False(o.TryAddScheme(new AuthenticationScheme("signin", "whatever", typeof(Handler))));
Assert.True(o.TryAddScheme(new AuthenticationScheme("signin3", "whatever", typeof(Handler))));
Assert.False(o.TryAddScheme(new AuthenticationScheme("signin2", "whatever", typeof(Handler))));
o.RemoveScheme("signin2");
Assert.True(o.TryAddScheme(new AuthenticationScheme("signin2", "whatever", typeof(Handler))));
}
[Fact]
public async Task LookupUsesProvidedStringComparer()
{

Просмотреть файл

@ -24,10 +24,6 @@ namespace Microsoft.Net.Http.Headers
private static readonly string SameSiteLaxToken = SameSiteMode.Lax.ToString().ToLower();
private static readonly string SameSiteStrictToken = SameSiteMode.Strict.ToString().ToLower();
// True (old): https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-3.1
// False (new): https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.1
internal static bool SuppressSameSiteNone;
private const string HttpOnlyToken = "httponly";
private const string SeparatorToken = "; ";
private const string EqualsToken = "=";
@ -42,14 +38,6 @@ namespace Microsoft.Net.Http.Headers
private StringSegment _name;
private StringSegment _value;
static SetCookieHeaderValue()
{
if (AppContext.TryGetSwitch("Microsoft.AspNetCore.SuppressSameSiteNone", out var enabled))
{
SuppressSameSiteNone = enabled;
}
}
private SetCookieHeaderValue()
{
// Used by the parser to create a new instance of this type.
@ -106,7 +94,7 @@ namespace Microsoft.Net.Http.Headers
public bool Secure { get; set; }
public SameSiteMode SameSite { get; set; } = SuppressSameSiteNone ? SameSiteMode.None : SameSiteMode.Unspecified;
public SameSiteMode SameSite { get; set; } = SameSiteMode.Unspecified;
public bool HttpOnly { get; set; }
@ -145,7 +133,7 @@ namespace Microsoft.Net.Http.Headers
}
// Allow for Unspecified (-1) to skip SameSite
if (SameSite == SameSiteMode.None && !SuppressSameSiteNone)
if (SameSite == SameSiteMode.None)
{
sameSite = SameSiteNoneToken;
length += SeparatorToken.Length + SameSiteToken.Length + EqualsToken.Length + sameSite.Length;
@ -275,7 +263,7 @@ namespace Microsoft.Net.Http.Headers
}
// Allow for Unspecified (-1) to skip SameSite
if (SameSite == SameSiteMode.None && !SuppressSameSiteNone)
if (SameSite == SameSiteMode.None)
{
AppendSegment(builder, SameSiteToken, SameSiteNoneToken);
}
@ -478,7 +466,7 @@ namespace Microsoft.Net.Http.Headers
{
if (!ReadEqualsSign(input, ref offset))
{
result.SameSite = SuppressSameSiteNone ? SameSiteMode.Strict : SameSiteMode.Unspecified;
result.SameSite = SameSiteMode.Unspecified;
}
else
{
@ -492,14 +480,13 @@ namespace Microsoft.Net.Http.Headers
{
result.SameSite = SameSiteMode.Lax;
}
else if (!SuppressSameSiteNone
&& StringSegment.Equals(enforcementMode, SameSiteNoneToken, StringComparison.OrdinalIgnoreCase))
else if (StringSegment.Equals(enforcementMode, SameSiteNoneToken, StringComparison.OrdinalIgnoreCase))
{
result.SameSite = SameSiteMode.None;
}
else
{
result.SameSite = SuppressSameSiteNone ? SameSiteMode.Strict : SameSiteMode.Unspecified;
result.SameSite = SameSiteMode.Unspecified;
}
}
}

Просмотреть файл

@ -313,28 +313,6 @@ namespace Microsoft.Net.Http.Headers
Assert.Equal(expectedValue, input.ToString());
}
[Fact]
public void SetCookieHeaderValue_ToString_SameSiteNoneCompat()
{
SetCookieHeaderValue.SuppressSameSiteNone = true;
var input = new SetCookieHeaderValue("name", "value")
{
SameSite = SameSiteMode.None,
};
Assert.Equal("name=value", input.ToString());
SetCookieHeaderValue.SuppressSameSiteNone = false;
var input2 = new SetCookieHeaderValue("name", "value")
{
SameSite = SameSiteMode.None,
};
Assert.Equal("name=value; samesite=none", input2.ToString());
}
[Theory]
[MemberData(nameof(SetCookieHeaderDataSet))]
public void SetCookieHeaderValue_AppendToStringBuilder(SetCookieHeaderValue input, string expectedValue)
@ -346,32 +324,6 @@ namespace Microsoft.Net.Http.Headers
Assert.Equal(expectedValue, builder.ToString());
}
[Fact]
public void SetCookieHeaderValue_AppendToStringBuilder_SameSiteNoneCompat()
{
SetCookieHeaderValue.SuppressSameSiteNone = true;
var builder = new StringBuilder();
var input = new SetCookieHeaderValue("name", "value")
{
SameSite = SameSiteMode.None,
};
input.AppendToStringBuilder(builder);
Assert.Equal("name=value", builder.ToString());
SetCookieHeaderValue.SuppressSameSiteNone = false;
var builder2 = new StringBuilder();
var input2 = new SetCookieHeaderValue("name", "value")
{
SameSite = SameSiteMode.None,
};
input2.AppendToStringBuilder(builder2);
Assert.Equal("name=value; samesite=none", builder2.ToString());
}
[Theory]
[MemberData(nameof(SetCookieHeaderDataSet))]
public void SetCookieHeaderValue_Parse_AcceptsValidValues(SetCookieHeaderValue cookie, string expectedValue)
@ -382,31 +334,6 @@ namespace Microsoft.Net.Http.Headers
Assert.Equal(expectedValue, header.ToString());
}
[Fact]
public void SetCookieHeaderValue_Parse_AcceptsValidValues_SameSiteNoneCompat()
{
SetCookieHeaderValue.SuppressSameSiteNone = true;
var header = SetCookieHeaderValue.Parse("name=value; samesite=none");
var cookie = new SetCookieHeaderValue("name", "value")
{
SameSite = SameSiteMode.Strict,
};
Assert.Equal(cookie, header);
Assert.Equal("name=value; samesite=strict", header.ToString());
SetCookieHeaderValue.SuppressSameSiteNone = false;
var header2 = SetCookieHeaderValue.Parse("name=value; samesite=none");
var cookie2 = new SetCookieHeaderValue("name", "value")
{
SameSite = SameSiteMode.None,
};
Assert.Equal(cookie2, header2);
Assert.Equal("name=value; samesite=none", header2.ToString());
}
[Theory]
[MemberData(nameof(SetCookieHeaderDataSet))]
public void SetCookieHeaderValue_TryParse_AcceptsValidValues(SetCookieHeaderValue cookie, string expectedValue)
@ -417,31 +344,6 @@ namespace Microsoft.Net.Http.Headers
Assert.Equal(expectedValue, header.ToString());
}
[Fact]
public void SetCookieHeaderValue_TryParse_AcceptsValidValues_SameSiteNoneCompat()
{
SetCookieHeaderValue.SuppressSameSiteNone = true;
Assert.True(SetCookieHeaderValue.TryParse("name=value; samesite=none", out var header));
var cookie = new SetCookieHeaderValue("name", "value")
{
SameSite = SameSiteMode.Strict,
};
Assert.Equal(cookie, header);
Assert.Equal("name=value; samesite=strict", header.ToString());
SetCookieHeaderValue.SuppressSameSiteNone = false;
Assert.True(SetCookieHeaderValue.TryParse("name=value; samesite=none", out var header2));
var cookie2 = new SetCookieHeaderValue("name", "value")
{
SameSite = SameSiteMode.None,
};
Assert.Equal(cookie2, header2);
Assert.Equal("name=value; samesite=none", header2.ToString());
}
[Theory]
[MemberData(nameof(InvalidSetCookieHeaderDataSet))]
public void SetCookieHeaderValue_Parse_RejectsInvalidValues(string value)

Просмотреть файл

@ -11,20 +11,8 @@ namespace Microsoft.AspNetCore.Http
/// </summary>
public class CookieBuilder
{
// True (old): https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-3.1
// False (new): https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.1
internal static bool SuppressSameSiteNone;
private string _name;
static CookieBuilder()
{
if (AppContext.TryGetSwitch("Microsoft.AspNetCore.SuppressSameSiteNone", out var enabled))
{
SuppressSameSiteNone = enabled;
}
}
/// <summary>
/// The name of the cookie.
/// </summary>
@ -66,7 +54,7 @@ namespace Microsoft.AspNetCore.Http
/// <remarks>
/// Determines the value that will set on <seealso cref="CookieOptions.SameSite"/>.
/// </remarks>
public virtual SameSiteMode SameSite { get; set; } = SuppressSameSiteNone ? SameSiteMode.None : SameSiteMode.Unspecified;
public virtual SameSiteMode SameSite { get; set; } = SameSiteMode.Unspecified;
/// <summary>
/// The policy that will be used to determine <seealso cref="CookieOptions.Secure"/>.

Просмотреть файл

@ -10,18 +10,6 @@ namespace Microsoft.AspNetCore.Http
/// </summary>
public class CookieOptions
{
// True (old): https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-3.1
// False (new): https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.1
internal static bool SuppressSameSiteNone;
static CookieOptions()
{
if (AppContext.TryGetSwitch("Microsoft.AspNetCore.SuppressSameSiteNone", out var enabled))
{
SuppressSameSiteNone = enabled;
}
}
/// <summary>
/// Creates a default cookie with a path of '/'.
/// </summary>
@ -58,7 +46,7 @@ namespace Microsoft.AspNetCore.Http
/// Gets or sets the value for the SameSite attribute of the cookie. The default value is <see cref="SameSiteMode.Unspecified"/>
/// </summary>
/// <returns>The <see cref="SameSiteMode"/> representing the enforcement mode of the cookie.</returns>
public SameSiteMode SameSite { get; set; } = SuppressSameSiteNone ? SameSiteMode.None : SameSiteMode.Unspecified;
public SameSiteMode SameSite { get; set; } = SameSiteMode.Unspecified;
/// <summary>
/// Gets or sets a value that indicates whether a cookie is accessible by client-side script.

Просмотреть файл

@ -98,9 +98,9 @@ namespace Microsoft.AspNetCore.Http
public override HttpResponse Response => _response;
public override ConnectionInfo Connection => _connection ?? (_connection = new DefaultConnectionInfo(_features.Collection));
public override ConnectionInfo Connection => _connection ?? (_connection = new DefaultConnectionInfo(Features));
public override WebSocketManager WebSockets => _websockets ?? (_websockets = new DefaultWebSocketManager(_features.Collection));
public override WebSocketManager WebSockets => _websockets ?? (_websockets = new DefaultWebSocketManager(Features));
public override ClaimsPrincipal User
{

Просмотреть файл

@ -161,10 +161,10 @@ namespace Microsoft.AspNetCore.Identity
}
/// <summary>
/// Regenerates the user's application cookie, whilst preserving the existing
/// AuthenticationProperties like rememberMe, as an asynchronous operation.
/// Signs in the specified <paramref name="user"/>, whilst preserving the existing
/// AuthenticationProperties of the current signed-in user like rememberMe, as an asynchronous operation.
/// </summary>
/// <param name="user">The user whose sign-in cookie should be refreshed.</param>
/// <param name="user">The user to sign-in.</param>
/// <returns>The task object representing the asynchronous operation.</returns>
public virtual async Task RefreshSignInAsync(TUser user)
{

Просмотреть файл

@ -5,7 +5,6 @@
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
<Compile Include="Microsoft.AspNetCore.Identity.UI.netcoreapp.cs" />
<Reference Include="Newtonsoft.Json" />
<Reference Include="Microsoft.AspNetCore.Identity" />
<Reference Include="Microsoft.AspNetCore.Mvc" />
<Reference Include="Microsoft.AspNetCore.StaticFiles" />

Просмотреть файл

@ -5,11 +5,11 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
namespace Microsoft.AspNetCore.Identity.UI.V3.Pages.Account.Manage.Internal
{
@ -79,7 +79,7 @@ namespace Microsoft.AspNetCore.Identity.UI.V3.Pages.Account.Manage.Internal
personalData.Add($"Authenticator Key", await _userManager.GetAuthenticatorKeyAsync(user));
Response.Headers.Add("Content-Disposition", "attachment; filename=PersonalData.json");
return new FileContentResult(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(personalData)), "text/json");
return new FileContentResult(JsonSerializer.SerializeToUtf8Bytes(personalData), "application/json");
}
}
}

Просмотреть файл

@ -5,11 +5,11 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
namespace Microsoft.AspNetCore.Identity.UI.V4.Pages.Account.Manage.Internal
{
@ -79,7 +79,7 @@ namespace Microsoft.AspNetCore.Identity.UI.V4.Pages.Account.Manage.Internal
personalData.Add($"Authenticator Key", await _userManager.GetAuthenticatorKeyAsync(user));
Response.Headers.Add("Content-Disposition", "attachment; filename=PersonalData.json");
return new FileContentResult(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(personalData)), "text/json");
return new FileContentResult(JsonSerializer.SerializeToUtf8Bytes(personalData), "application/json");
}
}
}

Просмотреть файл

@ -36,7 +36,6 @@
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json" />
<Reference Include="Microsoft.AspNetCore.Identity" />
<Reference Include="Microsoft.AspNetCore.Mvc" />
<Reference Include="Microsoft.AspNetCore.StaticFiles" />

Просмотреть файл

@ -57,7 +57,7 @@ namespace Microsoft.AspNetCore.SpaServices.AngularCli
var timeout = spaBuilder.Options.StartupTimeout;
return targetUriTask.WithTimeout(timeout,
$"The Angular CLI process did not start listening for requests " +
$"within the timeout period of {timeout.Seconds} seconds. " +
$"within the timeout period of {timeout.TotalSeconds} seconds. " +
$"Check the log output for error information.");
});
}

Просмотреть файл

@ -0,0 +1,25 @@
{
"solution": {
"path": "..\\Middleware.sln",
"projects": [
"..\\Hosting\\Abstractions\\src\\Microsoft.AspNetCore.Hosting.Abstractions.csproj",
"..\\Hosting\\Hosting\\src\\Microsoft.AspNetCore.Hosting.csproj",
"..\\Hosting\\Server.Abstractions\\src\\Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj",
"..\\Hosting\\Server.IntegrationTesting\\src\\Microsoft.AspNetCore.Server.IntegrationTesting.csproj",
"..\\Http\\Http.Abstractions\\src\\Microsoft.AspNetCore.Http.Abstractions.csproj",
"..\\Http\\Http.Extensions\\src\\Microsoft.AspNetCore.Http.Extensions.csproj",
"..\\Http\\Http.Features\\src\\Microsoft.AspNetCore.Http.Features.csproj",
"..\\Servers\\Kestrel\\Core\\src\\Microsoft.AspNetCore.Server.Kestrel.Core.csproj",
"..\\Servers\\Kestrel\\Kestrel\\src\\Microsoft.AspNetCore.Server.Kestrel.csproj",
"..\\Servers\\Kestrel\\Transport.Sockets\\src\\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj",
"..\\Http\\Headers\\src\\Microsoft.Net.Http.Headers.csproj",
"..\\Http\\Http\\src\\Microsoft.AspNetCore.Http.csproj",
"WebSockets\\samples\\EchoApp\\EchoApp.csproj",
"WebSockets\\samples\\TestServer\\WebSockets.TestServer.csproj",
"WebSockets\\src\\Microsoft.AspNetCore.WebSockets.csproj",
"WebSockets\\test\\ConformanceTests\\AutobahnTestApp\\AutobahnTestApp.csproj",
"WebSockets\\test\\ConformanceTests\\Microsoft.AspNetCore.WebSockets.ConformanceTests.csproj",
"WebSockets\\test\\UnitTests\\Microsoft.AspNetCore.WebSockets.Tests.csproj"
]
}
}

Просмотреть файл

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

Просмотреть файл

@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TestServer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TestServer")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ffe69337-e3b4-4625-8244-36bd609742ba")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Просмотреть файл

@ -1,58 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4E5F5FCC-172C-44D9-BEA0-39098A79CD0B}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TestServer</RootNamespace>
<AssemblyName>TestServer</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -50,6 +50,6 @@
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
@RenderSection("Scripts", required: false)
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>

Просмотреть файл

@ -48,6 +48,6 @@
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
@RenderSection("Scripts", required: false)
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>

Просмотреть файл

@ -47,6 +47,6 @@
<script src="~/js/site.js" asp-append-version="true"></script>
@RenderSection("Scripts", required: false)
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>

Просмотреть файл

@ -12,22 +12,10 @@ namespace Microsoft.AspNetCore.Builder
/// </summary>
public class CookiePolicyOptions
{
// True (old): https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-3.1
// False (new): https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.1
internal static bool SuppressSameSiteNone;
static CookiePolicyOptions()
{
if (AppContext.TryGetSwitch("Microsoft.AspNetCore.SuppressSameSiteNone", out var enabled))
{
SuppressSameSiteNone = enabled;
}
}
/// <summary>
/// Affects the cookie's same site attribute.
/// </summary>
public SameSiteMode MinimumSameSitePolicy { get; set; } = SuppressSameSiteNone ? SameSiteMode.None : SameSiteMode.Unspecified;
public SameSiteMode MinimumSameSitePolicy { get; set; } = SameSiteMode.Unspecified;
/// <summary>
/// Affects whether cookies must be HttpOnly.

Просмотреть файл

@ -115,8 +115,7 @@ namespace Microsoft.AspNetCore.CookiePolicy
private bool CheckPolicyRequired()
{
return !CanTrack
|| (CookiePolicyOptions.SuppressSameSiteNone && Options.MinimumSameSitePolicy != SameSiteMode.None)
|| (!CookiePolicyOptions.SuppressSameSiteNone && Options.MinimumSameSitePolicy != SameSiteMode.Unspecified)
|| Options.MinimumSameSitePolicy != SameSiteMode.Unspecified
|| Options.HttpOnly != HttpOnlyPolicy.None
|| Options.Secure != CookieSecurePolicy.None;
}

Просмотреть файл

@ -15,6 +15,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
{
internal AuthenticationManager() { }
public bool AllowAnonymous { get { throw null; } set { } }
public bool AutomaticAuthentication { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public Microsoft.AspNetCore.Server.HttpSys.AuthenticationSchemes Schemes { get { throw null; } set { } }
}
[System.FlagsAttribute]

Просмотреть файл

@ -45,12 +45,22 @@ namespace Microsoft.AspNetCore.Server.HttpSys
}
}
/// <summary>
/// Indicates if anonymous requests will be surfaced to the application or challenged by the server.
/// The default value is true.
/// </summary>
public bool AllowAnonymous
{
get { return _allowAnonymous; }
set { _allowAnonymous = value; }
}
/// <summary>
/// If true the server should set HttpContext.User. If false the server will only provide an
/// identity when explicitly requested by the AuthenticationScheme. The default is true.
/// </summary>
public bool AutomaticAuthentication { get; set; } = true;
internal void SetUrlGroupSecurity(UrlGroup urlGroup)
{
Debug.Assert(_urlGroup == null, "SetUrlGroupSecurity called more than once.");

Просмотреть файл

@ -85,7 +85,11 @@ namespace Microsoft.AspNetCore.Server.HttpSys
_query = Request.QueryString;
_rawTarget = Request.RawUrl;
_scheme = Request.Scheme;
_user = _requestContext.User;
if (requestContext.Server.Options.Authentication.AutomaticAuthentication)
{
_user = _requestContext.User;
}
_responseStream = new ResponseStream(requestContext.Response.Body, OnResponseStart);
_responseHeaders = Response.Headers;

Просмотреть файл

@ -368,6 +368,38 @@ namespace Microsoft.AspNetCore.Server.HttpSys
}
}
[ConditionalTheory]
[InlineData(AuthenticationSchemes.Negotiate)]
[InlineData(AuthenticationSchemes.NTLM)]
// [InlineData(AuthenticationSchemes.Digest)] // TODO: Not implemented
// [InlineData(AuthenticationSchemes.Basic)] // Doesn't work with default creds
[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /* AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)]
public async Task AuthTypes_DisableAutomaticAuthentication(AuthenticationSchemes authType)
{
using (var server = Utilities.CreateDynamicHost(out var address, options =>
{
options.Authentication.AutomaticAuthentication = false;
options.Authentication.Schemes = authType;
options.Authentication.AllowAnonymous = DenyAnoymous;
},
async httpContext =>
{
Assert.NotNull(httpContext.User);
Assert.NotNull(httpContext.User.Identity);
Assert.False(httpContext.User.Identity.IsAuthenticated);
var authenticateResult = await httpContext.AuthenticateAsync(HttpSysDefaults.AuthenticationScheme);
Assert.NotNull(authenticateResult.Principal);
Assert.NotNull(authenticateResult.Principal.Identity);
Assert.True(authenticateResult.Principal.Identity.IsAuthenticated);
}))
{
var response = await SendRequestAsync(address, useDefaultCredentials: true);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
}
}
private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool useDefaultCredentials = false)
{
HttpClientHandler handler = new HttpClientHandler();

Просмотреть файл

@ -345,10 +345,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys
Assert.Equal(HttpStatusCode.ServiceUnavailable, response.StatusCode);
}
}
// A connection has been closed, try again.
string responseText = await SendRequestAsync(address);
Assert.Equal(string.Empty, responseText);
}
}
}
@ -366,31 +362,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys
}
}
[ConditionalFact]
public async Task Server_SetConnectionLimit_Success()
{
using (Utilities.CreateDynamicHost(out var address, options =>
{
Assert.Null(options.MaxConnections);
options.MaxConnections = 3;
}, httpContext => Task.FromResult(0)))
{
using (var client1 = await SendHungRequestAsync("GET", address))
using (var client2 = await SendHungRequestAsync("GET", address))
{
using (var client3 = await SendHungRequestAsync("GET", address))
{
// Maxed out, refuses connection and throws
await Assert.ThrowsAsync<HttpRequestException>(() => SendRequestAsync(address));
}
// A connection has been closed, try again.
string responseText = await SendRequestAsync(address);
Assert.Equal(string.Empty, responseText);
}
}
}
[ConditionalFact]
public async Task Server_SetConnectionLimitChangeAfterStarted_Success()
{

Просмотреть файл

@ -60,9 +60,29 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
return _requestBody.ReadAsync(buffer, offset, count, cancellationToken);
}
public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)
{
return _requestBody.ReadAsync(buffer, cancellationToken);
}
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
return _responseBody.WriteAsync(buffer, offset, count, cancellationToken);
}
public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
{
return _responseBody.WriteAsync(buffer, cancellationToken);
}
public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
{
return _requestBody.CopyToAsync(destination, bufferSize, cancellationToken);
}
public override Task FlushAsync(CancellationToken cancellationToken)
{
return _responseBody.FlushAsync(cancellationToken);
}
}
}

Просмотреть файл

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
@ -35,40 +36,12 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
var task = ReadAsync(buffer, offset, count, default(CancellationToken), state);
if (callback != null)
{
task.ContinueWith(t => callback.Invoke(t));
}
return task;
return TaskToApm.Begin(ReadAsync(buffer, offset, count), callback, state);
}
public override int EndRead(IAsyncResult asyncResult)
{
return ((Task<int>)asyncResult).GetAwaiter().GetResult();
}
private Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state)
{
var tcs = new TaskCompletionSource<int>(state);
var task = ReadAsync(buffer, offset, count, cancellationToken);
task.ContinueWith((task2, state2) =>
{
var tcs2 = (TaskCompletionSource<int>)state2;
if (task2.IsCanceled)
{
tcs2.SetCanceled();
}
else if (task2.IsFaulted)
{
tcs2.SetException(task2.Exception);
}
else
{
tcs2.SetResult(task2.Result);
}
}, tcs, cancellationToken);
return tcs.Task;
return TaskToApm.End<int>(asyncResult);
}
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
@ -97,6 +70,18 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
}
}
public override async Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
{
try
{
await _body.CopyToAsync(destination, cancellationToken);
}
catch (ConnectionAbortedException ex)
{
throw new TaskCanceledException("The request was aborted", ex);
}
}
public void StartAcceptingReads(IISHttpContext body)
{
// Only start if not aborted

Просмотреть файл

@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
public override void Flush()
{
FlushAsync(default(CancellationToken)).GetAwaiter().GetResult();
FlushAsync(default).GetAwaiter().GetResult();
}
public override Task FlushAsync(CancellationToken cancellationToken)
@ -41,45 +41,17 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
throw new InvalidOperationException(CoreStrings.SynchronousWritesDisallowed);
}
WriteAsync(buffer, offset, count, default(CancellationToken)).GetAwaiter().GetResult();
WriteAsync(buffer, offset, count, default).GetAwaiter().GetResult();
}
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
var task = WriteAsync(buffer, offset, count, default(CancellationToken), state);
if (callback != null)
{
task.ContinueWith(t => callback.Invoke(t));
}
return task;
return TaskToApm.Begin(WriteAsync(buffer, offset, count), callback, state);
}
public override void EndWrite(IAsyncResult asyncResult)
{
((Task<object>)asyncResult).GetAwaiter().GetResult();
}
private Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state)
{
var tcs = new TaskCompletionSource<object>(state);
var task = WriteAsync(buffer, offset, count, cancellationToken);
task.ContinueWith((task2, state2) =>
{
var tcs2 = (TaskCompletionSource<object>)state2;
if (task2.IsCanceled)
{
tcs2.SetCanceled();
}
else if (task2.IsFaulted)
{
tcs2.SetException(task2.Exception);
}
else
{
tcs2.SetResult(null);
}
}, tcs, cancellationToken);
return tcs.Task;
TaskToApm.End(asyncResult);
}
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)

Просмотреть файл

@ -3,11 +3,10 @@
using System;
using System.Buffers;
using System.Net.Http;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
namespace Microsoft.AspNetCore.Server.IIS.Core
@ -54,6 +53,16 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
}
}
internal Task CopyToAsync(Stream destination, CancellationToken cancellationToken)
{
if (!HasStartedConsumingRequestBody)
{
InitializeRequestIO();
}
return _bodyInputPipe.Reader.CopyToAsync(destination, cancellationToken);
}
/// <summary>
/// Writes data to the output pipe.
/// </summary>

Просмотреть файл

@ -19,6 +19,7 @@
<Compile Include="$(SharedSourceRoot)StackTrace\**\*.cs" LinkBase="Shared\" />
<Compile Include="$(SharedSourceRoot)RazorViews\*.cs" LinkBase="Shared\" />
<Compile Include="$(SharedSourceRoot)ErrorPage\*.cs" LinkBase="Shared\" />
<Compile Include="$(RepoRoot)src\Shared\TaskToApm.cs" Link="Shared\TaskToApm.cs" />
</ItemGroup>
<Target Name="ValidateNativeComponentsBuilt" AfterTargets="Build" >

Просмотреть файл

@ -27,6 +27,10 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
get { return _contentLength; }
set
{
if (_isReadOnly)
{
ThrowHeadersReadOnlyException();
}
if (value.HasValue && value.Value < 0)
{
ThrowInvalidContentLengthException(value.Value);

Просмотреть файл

@ -90,41 +90,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
var task = ReadAsync(buffer, offset, count, default, state);
if (callback != null)
{
task.ContinueWith(t => callback.Invoke(t));
}
return task;
return TaskToApm.Begin(ReadAsync(buffer, offset, count), callback, state);
}
/// <inheritdoc />
public override int EndRead(IAsyncResult asyncResult)
{
return ((Task<int>)asyncResult).GetAwaiter().GetResult();
}
private Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state)
{
var tcs = new TaskCompletionSource<int>(state);
var task = ReadAsync(buffer, offset, count, cancellationToken);
task.ContinueWith((task2, state2) =>
{
var tcs2 = (TaskCompletionSource<int>)state2;
if (task2.IsCanceled)
{
tcs2.SetCanceled();
}
else if (task2.IsFaulted)
{
tcs2.SetException(task2.Exception);
}
else
{
tcs2.SetResult(task2.Result);
}
}, tcs, cancellationToken);
return tcs.Task;
return TaskToApm.End<int>(asyncResult);
}
private ValueTask<int> ReadAsyncWrapper(Memory<byte> destination, CancellationToken cancellationToken)
@ -139,7 +111,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
}
}
private async ValueTask<int> ReadAsyncInternal(Memory<byte> buffer, CancellationToken cancellationToken)
private async ValueTask<int> ReadAsyncInternal(Memory<byte> destination, CancellationToken cancellationToken)
{
while (true)
{
@ -150,19 +122,19 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
throw new OperationCanceledException("The read was canceled");
}
var readableBuffer = result.Buffer;
var readableBufferLength = readableBuffer.Length;
var buffer = result.Buffer;
var length = buffer.Length;
var consumed = readableBuffer.End;
var consumed = buffer.End;
try
{
if (readableBufferLength != 0)
if (length != 0)
{
var actual = (int)Math.Min(readableBufferLength, buffer.Length);
var actual = (int)Math.Min(length, destination.Length);
var slice = actual == readableBufferLength ? readableBuffer : readableBuffer.Slice(0, actual);
var slice = actual == length ? buffer : buffer.Slice(0, actual);
consumed = slice.End;
slice.CopyTo(buffer.Span);
slice.CopyTo(destination.Span);
return actual;
}
@ -193,37 +165,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
throw new ArgumentOutOfRangeException(nameof(bufferSize));
}
return CopyToAsyncInternal(destination, cancellationToken);
}
private async Task CopyToAsyncInternal(Stream destination, CancellationToken cancellationToken)
{
while (true)
{
var result = await _pipeReader.ReadAsync(cancellationToken);
var readableBuffer = result.Buffer;
var readableBufferLength = readableBuffer.Length;
try
{
if (readableBufferLength != 0)
{
foreach (var memory in readableBuffer)
{
await destination.WriteAsync(memory, cancellationToken);
}
}
if (result.IsCompleted)
{
return;
}
}
finally
{
_pipeReader.AdvanceTo(readableBuffer.End);
}
}
return _pipeReader.CopyToAsync(destination, cancellationToken);
}
}
}

Просмотреть файл

@ -3,7 +3,6 @@
using System;
using System.IO;
using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http.Features;
@ -87,40 +86,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
var task = WriteAsync(buffer, offset, count, default, state);
if (callback != null)
{
task.ContinueWith(t => callback.Invoke(t));
}
return task;
return TaskToApm.Begin(WriteAsync(buffer, offset, count), callback, state);
}
public override void EndWrite(IAsyncResult asyncResult)
{
((Task<object>)asyncResult).GetAwaiter().GetResult();
}
private Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state)
{
var tcs = new TaskCompletionSource<object>(state);
var task = WriteAsync(buffer, offset, count, cancellationToken);
task.ContinueWith((task2, state2) =>
{
var tcs2 = (TaskCompletionSource<object>)state2;
if (task2.IsCanceled)
{
tcs2.SetCanceled();
}
else if (task2.IsFaulted)
{
tcs2.SetException(task2.Exception);
}
else
{
tcs2.SetResult(null);
}
}, tcs, cancellationToken);
return tcs.Task;
TaskToApm.End(asyncResult);
}
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)

Просмотреть файл

@ -15,6 +15,7 @@
<Compile Include="$(SharedSourceRoot)CertificateGeneration\**\*.cs" />
<Compile Include="$(SharedSourceRoot)ValueTaskExtensions\**\*.cs" />
<Compile Include="$(SharedSourceRoot)UrlDecoder\**\*.cs" />
<Compile Include="$(RepoRoot)src\Shared\TaskToApm.cs" Link="Internal\TaskToApm.cs" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -152,78 +152,22 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
var task = ReadAsync(buffer, offset, count, default, state);
if (callback != null)
{
task.ContinueWith(t => callback.Invoke(t));
}
return task;
return TaskToApm.Begin(ReadAsync(buffer, offset, count), callback, state);
}
public override int EndRead(IAsyncResult asyncResult)
{
return ((Task<int>)asyncResult).GetAwaiter().GetResult();
}
private Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state)
{
var tcs = new TaskCompletionSource<int>(state);
var task = ReadAsync(buffer, offset, count, cancellationToken);
task.ContinueWith((task2, state2) =>
{
var tcs2 = (TaskCompletionSource<int>)state2;
if (task2.IsCanceled)
{
tcs2.SetCanceled();
}
else if (task2.IsFaulted)
{
tcs2.SetException(task2.Exception);
}
else
{
tcs2.SetResult(task2.Result);
}
}, tcs, cancellationToken);
return tcs.Task;
return TaskToApm.End<int>(asyncResult);
}
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
var task = WriteAsync(buffer, offset, count, default, state);
if (callback != null)
{
task.ContinueWith(t => callback.Invoke(t));
}
return task;
return TaskToApm.Begin(WriteAsync(buffer, offset, count), callback, state);
}
public override void EndWrite(IAsyncResult asyncResult)
{
((Task<object>)asyncResult).GetAwaiter().GetResult();
}
private Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state)
{
var tcs = new TaskCompletionSource<object>(state);
var task = WriteAsync(buffer, offset, count, cancellationToken);
task.ContinueWith((task2, state2) =>
{
var tcs2 = (TaskCompletionSource<object>)state2;
if (task2.IsCanceled)
{
tcs2.SetCanceled();
}
else if (task2.IsFaulted)
{
tcs2.SetException(task2.Exception);
}
else
{
tcs2.SetResult(null);
}
}, tcs, cancellationToken);
return tcs.Task;
TaskToApm.End(asyncResult);
}
}
}

Просмотреть файл

@ -176,78 +176,22 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal
// The below APM methods call the underlying Read/WriteAsync methods which will still be logged.
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
var task = ReadAsync(buffer, offset, count, default(CancellationToken), state);
if (callback != null)
{
task.ContinueWith(t => callback.Invoke(t));
}
return task;
return TaskToApm.Begin(ReadAsync(buffer, offset, count), callback, state);
}
public override int EndRead(IAsyncResult asyncResult)
{
return ((Task<int>)asyncResult).GetAwaiter().GetResult();
}
private Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state)
{
var tcs = new TaskCompletionSource<int>(state);
var task = ReadAsync(buffer, offset, count, cancellationToken);
task.ContinueWith((task2, state2) =>
{
var tcs2 = (TaskCompletionSource<int>)state2;
if (task2.IsCanceled)
{
tcs2.SetCanceled();
}
else if (task2.IsFaulted)
{
tcs2.SetException(task2.Exception);
}
else
{
tcs2.SetResult(task2.Result);
}
}, tcs, cancellationToken);
return tcs.Task;
return TaskToApm.End<int>(asyncResult);
}
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
var task = WriteAsync(buffer, offset, count, default(CancellationToken), state);
if (callback != null)
{
task.ContinueWith(t => callback.Invoke(t));
}
return task;
return TaskToApm.Begin(WriteAsync(buffer, offset, count), callback, state);
}
public override void EndWrite(IAsyncResult asyncResult)
{
((Task<object>)asyncResult).GetAwaiter().GetResult();
}
private Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state)
{
var tcs = new TaskCompletionSource<object>(state);
var task = WriteAsync(buffer, offset, count, cancellationToken);
task.ContinueWith((task2, state2) =>
{
var tcs2 = (TaskCompletionSource<object>)state2;
if (task2.IsCanceled)
{
tcs2.SetCanceled();
}
else if (task2.IsFaulted)
{
tcs2.SetException(task2.Exception);
}
else
{
tcs2.SetResult(null);
}
}, tcs, cancellationToken);
return tcs.Task;
TaskToApm.End(asyncResult);
}
}
}

Просмотреть файл

@ -138,6 +138,15 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
Assert.Throws<InvalidOperationException>(() => ((IDictionary<string, StringValues>)headers).Add("my-header", new[] { "value" }));
}
[Fact]
public void ThrowsWhenSettingContentLengthPropertyAfterReadOnlyIsSet()
{
var headers = new HttpResponseHeaders();
headers.SetReadOnly();
Assert.Throws<InvalidOperationException>(() => headers.ContentLength = null);
}
[Fact]
public void ThrowsWhenChangingHeaderAfterReadOnlyIsSet()
{

Просмотреть файл

@ -14,6 +14,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv
public partial class LibuvTransportOptions
{
public LibuvTransportOptions() { }
public int Backlog { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public long? MaxReadBufferSize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public long? MaxWriteBufferSize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public bool NoDelay { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }

Просмотреть файл

@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// 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.Runtime.CompilerServices;
@ -8,8 +8,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
{
internal static class LibuvConstants
{
public const int ListenBacklog = 128;
public const int EOF = -4095;
public static readonly int? ECONNRESET = GetECONNRESET();
public static readonly int? EADDRINUSE = GetEADDRINUSE();

Просмотреть файл

@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
return Thread.PostAsync(listener =>
{
listener.ListenSocket = listener.CreateListenSocket();
listener.ListenSocket.Listen(LibuvConstants.ListenBacklog, ConnectionCallback, listener);
listener.ListenSocket.Listen(TransportContext.Options.Backlog, ConnectionCallback, listener);
}, this);
}

Просмотреть файл

@ -69,7 +69,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
ListenPipe = new UvPipeHandle(Log);
ListenPipe.Init(Thread.Loop, Thread.QueueCloseHandle, false);
ListenPipe.Bind(_pipeName);
ListenPipe.Listen(LibuvConstants.ListenBacklog,
ListenPipe.Listen(TransportContext.Options.Backlog,
(pipe, status, error, state) => ((ListenerPrimary)state).OnListenPipe(pipe, status, error), this);
}

Просмотреть файл

@ -27,6 +27,14 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv
/// </remarks>
public bool NoDelay { get; set; } = true;
/// <summary>
/// The maximum length of the pending connection queue.
/// </summary>
/// <remarks>
/// Defaults to 128.
/// </remarks>
public int Backlog { get; set; } = 128;
public long? MaxReadBufferSize { get; set; } = 1024 * 1024;
public long? MaxWriteBufferSize { get; set; } = 64 * 1024;

Просмотреть файл

@ -19,6 +19,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
public partial class SocketTransportOptions
{
public SocketTransportOptions() { }
public int Backlog { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public int IOQueueCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public long? MaxReadBufferSize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public long? MaxWriteBufferSize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }

Просмотреть файл

@ -93,7 +93,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
EndPoint = listenSocket.LocalEndPoint;
listenSocket.Listen(512);
listenSocket.Listen(_options.Backlog);
_listenSocket = listenSocket;
}

Просмотреть файл

@ -24,6 +24,14 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
/// </remarks>
public bool NoDelay { get; set; } = true;
/// <summary>
/// The maximum length of the pending connection queue.
/// </summary>
/// <remarks>
/// Defaults to 512.
/// </remarks>
public int Backlog { get; set; } = 512;
public long? MaxReadBufferSize { get; set; } = 1024 * 1024;
public long? MaxWriteBufferSize { get; set; } = 64 * 1024;

121
src/Shared/TaskToApm.cs Normal file
Просмотреть файл

@ -0,0 +1,121 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// Helper methods for using Tasks to implement the APM pattern.
//
// Example usage, wrapping a Task<int>-returning FooAsync method with Begin/EndFoo methods:
//
// public IAsyncResult BeginFoo(..., AsyncCallback callback, object state) =>
// TaskToApm.Begin(FooAsync(...), callback, state);
//
// public int EndFoo(IAsyncResult asyncResult) =>
// TaskToApm.End<int>(asyncResult);
#nullable enable
using System.Diagnostics;
namespace System.Threading.Tasks
{
/// <summary>
/// Provides support for efficiently using Tasks to implement the APM (Begin/End) pattern.
/// </summary>
internal static class TaskToApm
{
/// <summary>
/// Marshals the Task as an IAsyncResult, using the supplied callback and state
/// to implement the APM pattern.
/// </summary>
/// <param name="task">The Task to be marshaled.</param>
/// <param name="callback">The callback to be invoked upon completion.</param>
/// <param name="state">The state to be stored in the IAsyncResult.</param>
/// <returns>An IAsyncResult to represent the task's asynchronous operation.</returns>
public static IAsyncResult Begin(Task task, AsyncCallback? callback, object? state) =>
new TaskAsyncResult(task, state, callback);
/// <summary>Processes an IAsyncResult returned by Begin.</summary>
/// <param name="asyncResult">The IAsyncResult to unwrap.</param>
public static void End(IAsyncResult asyncResult)
{
if (asyncResult is TaskAsyncResult twar)
{
twar._task.GetAwaiter().GetResult();
return;
}
throw new ArgumentNullException();
}
/// <summary>Processes an IAsyncResult returned by Begin.</summary>
/// <param name="asyncResult">The IAsyncResult to unwrap.</param>
public static TResult End<TResult>(IAsyncResult asyncResult)
{
if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
{
return task.GetAwaiter().GetResult();
}
throw new ArgumentNullException();
}
/// <summary>Provides a simple IAsyncResult that wraps a Task.</summary>
/// <remarks>
/// We could use the Task as the IAsyncResult if the Task's AsyncState is the same as the object state,
/// but that's very rare, in particular in a situation where someone cares about allocation, and always
/// using TaskAsyncResult simplifies things and enables additional optimizations.
/// </remarks>
internal sealed class TaskAsyncResult : IAsyncResult
{
/// <summary>The wrapped Task.</summary>
internal readonly Task _task;
/// <summary>Callback to invoke when the wrapped task completes.</summary>
private readonly AsyncCallback? _callback;
/// <summary>Initializes the IAsyncResult with the Task to wrap and the associated object state.</summary>
/// <param name="task">The Task to wrap.</param>
/// <param name="state">The new AsyncState value.</param>
/// <param name="callback">Callback to invoke when the wrapped task completes.</param>
internal TaskAsyncResult(Task task, object? state, AsyncCallback? callback)
{
Debug.Assert(task != null);
_task = task;
AsyncState = state;
if (task.IsCompleted)
{
// Synchronous completion. Invoke the callback. No need to store it.
CompletedSynchronously = true;
callback?.Invoke(this);
}
else if (callback != null)
{
// Asynchronous completion, and we have a callback; schedule it. We use OnCompleted rather than ContinueWith in
// order to avoid running synchronously if the task has already completed by the time we get here but still run
// synchronously as part of the task's completion if the task completes after (the more common case).
_callback = callback;
_task.ConfigureAwait(continueOnCapturedContext: false)
.GetAwaiter()
.OnCompleted(InvokeCallback); // allocates a delegate, but avoids a closure
}
}
/// <summary>Invokes the callback.</summary>
private void InvokeCallback()
{
Debug.Assert(!CompletedSynchronously);
Debug.Assert(_callback != null);
_callback.Invoke(this);
}
/// <summary>Gets a user-defined object that qualifies or contains information about an asynchronous operation.</summary>
public object? AsyncState { get; }
/// <summary>Gets a value that indicates whether the asynchronous operation completed synchronously.</summary>
/// <remarks>This is set lazily based on whether the <see cref="_task"/> has completed by the time this object is created.</remarks>
public bool CompletedSynchronously { get; }
/// <summary>Gets a value that indicates whether the asynchronous operation has completed.</summary>
public bool IsCompleted => _task.IsCompleted;
/// <summary>Gets a <see cref="WaitHandle"/> that is used to wait for an asynchronous operation to complete.</summary>
public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle;
}
}
}

Просмотреть файл

@ -322,7 +322,7 @@ export class HttpConnection implements IConnection {
});
if (response.statusCode !== 200) {
return Promise.reject(new Error(`Unexpected status code returned from negotiate ${response.statusCode}`));
return Promise.reject(new Error(`Unexpected status code returned from negotiate '${response.statusCode}'`));
}
const negotiateResponse = JSON.parse(response.content as string) as INegotiateResponse;
@ -475,8 +475,8 @@ export class HttpConnection implements IConnection {
}
if (this.connectionState === ConnectionState.Connecting) {
this.logger.log(LogLevel.Warning, `Call to HttpConnection.stopConnection(${error}) was ignored because the connection hasn't yet left the in the connecting state.`);
return;
this.logger.log(LogLevel.Warning, `Call to HttpConnection.stopConnection(${error}) was ignored because the connection is still in the connecting state.`);
throw new Error(`HttpConnection.stopConnection(${error}) was called while the connection is still in the connecting state.`);
}
if (this.connectionState === ConnectionState.Disconnecting) {
@ -626,7 +626,7 @@ export class TransportSendQueue {
offset += item.byteLength;
}
return result;
return result.buffer;
}
}

Просмотреть файл

@ -98,7 +98,12 @@ export class WebSocketTransport implements ITransport {
webSocket.onmessage = (message: MessageEvent) => {
this.logger.log(LogLevel.Trace, `(WebSockets transport) data received. ${getDataDetail(message.data, this.logMessageContent)}.`);
if (this.onreceive) {
this.onreceive(message.data);
try {
this.onreceive(message.data);
} catch (error) {
this.close(error);
return;
}
}
};
@ -149,15 +154,21 @@ export class WebSocketTransport implements ITransport {
return Promise.resolve();
}
private close(event?: CloseEvent): void {
private close(event?: CloseEvent | Error): void {
// webSocket will be null if the transport did not start successfully
this.logger.log(LogLevel.Trace, "(WebSockets transport) socket closed.");
if (this.onclose) {
if (event && (event.wasClean === false || event.code !== 1000)) {
if (this.isCloseEvent(event) && (event.wasClean === false || event.code !== 1000)) {
this.onclose(new Error(`WebSocket closed with status code: ${event.code} (${event.reason}).`));
} else if (event instanceof Error) {
this.onclose(event);
} else {
this.onclose();
}
}
}
private isCloseEvent(event?: any): event is CloseEvent {
return event && typeof event.wasClean === "boolean" && typeof event.code === "number";
}
}

Просмотреть файл

@ -8,6 +8,7 @@ import { HttpTransportType, ITransport, TransferFormat } from "../src/ITransport
import { getUserAgentHeader } from "../src/Utils";
import { HttpError } from "../src/Errors";
import { ILogger, LogLevel } from "../src/ILogger";
import { NullLogger } from "../src/Loggers";
import { EventSourceConstructor, WebSocketConstructor } from "../src/Polyfills";
@ -192,9 +193,9 @@ describe("HttpConnection", () => {
const connection = new HttpConnection("http://tempuri.org", options);
await expect(connection.start(TransferFormat.Text))
.rejects
.toThrow("Unexpected status code returned from negotiate 999");
.toThrow("Unexpected status code returned from negotiate '999'");
},
"Failed to start the connection: Error: Unexpected status code returned from negotiate 999");
"Failed to start the connection: Error: Unexpected status code returned from negotiate '999'");
});
it("all transport failure errors get aggregated", async () => {
@ -1151,6 +1152,53 @@ describe("HttpConnection", () => {
}, "Failed to start the connection: Error: nope");
});
it("logMessageContent displays correctly with binary data", async () => {
await VerifyLogger.run(async (logger) => {
const availableTransport = { transport: "LongPolling", transferFormats: ["Text", "Binary"] };
let sentMessage = "";
const captureLogger: ILogger = {
log: (logLevel: LogLevel, message: string) => {
if (logLevel === LogLevel.Trace && message.search("data of length") > 0) {
sentMessage = message;
}
logger.log(logLevel, message);
},
};
let httpClientGetCount = 0;
const options: IHttpConnectionOptions = {
...commonOptions,
httpClient: new TestHttpClient()
.on("POST", () => ({ connectionId: "42", availableTransports: [availableTransport] }))
.on("GET", () => {
httpClientGetCount++;
if (httpClientGetCount === 1) {
// First long polling request must succeed so start completes
return "";
}
return Promise.resolve();
})
.on("DELETE", () => new HttpResponse(202)),
logMessageContent: true,
logger: captureLogger,
transport: HttpTransportType.LongPolling,
} as IHttpConnectionOptions;
const connection = new HttpConnection("http://tempuri.org", options);
connection.onreceive = () => null;
try {
await connection.start(TransferFormat.Binary);
await connection.send(new Uint8Array([0x68, 0x69, 0x20, 0x3a, 0x29]));
} finally {
await connection.stop();
}
expect(sentMessage).toBe("(LongPolling transport) sending data. Binary data of length 5. Content: '0x68 0x69 0x20 0x3a 0x29'.");
});
});
describe(".constructor", () => {
it("throws if no Url is provided", async () => {
// Force TypeScript to let us call the constructor incorrectly :)
@ -1413,7 +1461,7 @@ describe("TransportSendQueue", () => {
const queue = new TransportSendQueue(transport);
const first = queue.send(new Uint8Array([4, 5, 6]));
const first = queue.send(new Uint8Array([4, 5, 6]).buffer);
// This should allow first to enter transport.send
promiseSource1.resolve();
// Wait until we're inside transport.send
@ -1428,8 +1476,8 @@ describe("TransportSendQueue", () => {
await Promise.all([first, second, third]);
expect(sendMock.mock.calls.length).toBe(2);
expect(sendMock.mock.calls[0][0]).toEqual(new Uint8Array([4, 5, 6]));
expect(sendMock.mock.calls[1][0]).toEqual(new Uint8Array([7, 8, 10, 12, 14]));
expect(sendMock.mock.calls[0][0]).toEqual(new Uint8Array([4, 5, 6]).buffer);
expect(sendMock.mock.calls[1][0]).toEqual(new Uint8Array([7, 8, 10, 12, 14]).buffer);
await queue.stop();
});

Просмотреть файл

@ -256,6 +256,66 @@ describe("WebSocketTransport", () => {
.toBe("WebSocket is not in the OPEN state");
});
});
it("is closed from 'onreceive' callback throwing", async () => {
await VerifyLogger.run(async (logger) => {
(global as any).ErrorEvent = TestEvent;
const webSocket = await createAndStartWebSocket(logger);
let closeCalled: boolean = false;
let error: Error;
webSocket.onclose = (e) => {
closeCalled = true;
error = e!;
};
const receiveError = new Error("callback error");
webSocket.onreceive = (data) => {
throw receiveError;
};
const message = new TestMessageEvent();
message.data = "receive data";
TestWebSocket.webSocket.onmessage(message);
expect(closeCalled).toBe(true);
expect(error!).toBe(receiveError);
await expect(webSocket.send(""))
.rejects
.toBe("WebSocket is not in the OPEN state");
});
});
it("does not run onclose callback if Transport does not fully connect and exits", async () => {
await VerifyLogger.run(async (logger) => {
(global as any).ErrorEvent = TestErrorEvent;
const webSocket = new WebSocketTransport(new TestHttpClient(), undefined, logger, true, TestWebSocket);
const connectPromise = webSocket.connect("http://example.com", TransferFormat.Text);
await TestWebSocket.webSocket.closeSet;
let closeCalled: boolean = false;
let error: Error;
webSocket.onclose = (e) => {
closeCalled = true;
error = e!;
};
const message = new TestCloseEvent();
message.wasClean = false;
message.code = 1;
message.reason = "just cause";
TestWebSocket.webSocket.onclose(message);
expect(closeCalled).toBe(false);
expect(error!).toBeUndefined();
TestWebSocket.webSocket.onerror(new TestEvent());
await expect(connectPromise).rejects.toThrow("There was an error with the transport.");
});
});
});
async function createAndStartWebSocket(logger: ILogger, url?: string, accessTokenFactory?: (() => string | Promise<string>), format?: TransferFormat): Promise<WebSocketTransport> {

Просмотреть файл

@ -176,9 +176,11 @@ namespace Microsoft.AspNetCore.SignalR
public partial class HubInvocationContext
{
public HubInvocationContext(Microsoft.AspNetCore.SignalR.HubCallerContext context, string hubMethodName, object[] hubMethodArguments) { }
public HubInvocationContext(Microsoft.AspNetCore.SignalR.HubCallerContext context, System.Type hubType, string hubMethodName, object[] hubMethodArguments) { }
public Microsoft.AspNetCore.SignalR.HubCallerContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public System.Collections.Generic.IReadOnlyList<object> HubMethodArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public string HubMethodName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public System.Type HubType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
}
public abstract partial class HubLifetimeManager<THub> where THub : Microsoft.AspNetCore.SignalR.Hub
{

Просмотреть файл

@ -1,6 +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.
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Authorization;
@ -11,6 +12,18 @@ namespace Microsoft.AspNetCore.SignalR
/// </summary>
public class HubInvocationContext
{
/// <summary>
/// Instantiates a new instance of the <see cref="HubInvocationContext"/> class.
/// </summary>
/// <param name="context">Context for the active Hub connection and caller.</param>
/// <param name="hubType">The type of the Hub.</param>
/// <param name="hubMethodName">The name of the Hub method being invoked.</param>
/// <param name="hubMethodArguments">The arguments provided by the client.</param>
public HubInvocationContext(HubCallerContext context, Type hubType, string hubMethodName, object[] hubMethodArguments): this(context, hubMethodName, hubMethodArguments)
{
HubType = hubType;
}
/// <summary>
/// Instantiates a new instance of the <see cref="HubInvocationContext"/> class.
/// </summary>
@ -29,6 +42,11 @@ namespace Microsoft.AspNetCore.SignalR
/// </summary>
public HubCallerContext Context { get; }
/// <summary>
/// Gets the Hub type.
/// </summary>
public Type HubType { get; }
/// <summary>
/// Gets the name of the Hub method being invoked.
/// </summary>

Просмотреть файл

@ -495,7 +495,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal
return TaskCache.True;
}
return IsHubMethodAuthorizedSlow(provider, hubConnectionContext.User, policies, new HubInvocationContext(hubConnectionContext.HubCallerContext, hubMethodName, hubMethodArguments));
return IsHubMethodAuthorizedSlow(provider, hubConnectionContext.User, policies, new HubInvocationContext(hubConnectionContext.HubCallerContext, typeof(THub), hubMethodName, hubMethodArguments));
}
private static async Task<bool> IsHubMethodAuthorizedSlow(IServiceProvider provider, ClaimsPrincipal principal, IList<IAuthorizeData> policies, HubInvocationContext resource)

Просмотреть файл

@ -2215,6 +2215,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
{
Assert.NotNull(context.Resource);
var resource = Assert.IsType<HubInvocationContext>(context.Resource);
Assert.Equal(typeof(MethodHub), resource.HubType);
Assert.Equal(nameof(MethodHub.MultiParamAuthMethod), resource.HubMethodName);
Assert.Equal(2, resource.HubMethodArguments?.Count);
Assert.Equal("Hello", resource.HubMethodArguments[0]);