Merge branch 'merge/release/3.1-to-master' of https://github.com/dotnet-maestro-bot/AspNetCore into release/3.1

This commit is contained in:
Brennan Conroy 2019-10-31 16:15:52 -07:00
commit 433a5a0f97
541 changed files with 8753 additions and 3060 deletions

View File

@ -139,6 +139,7 @@ stages:
-pack
-noBuildDeps
$(_BuildArgs)
condition: ne(variables['Build.Reason'], 'PullRequest')
displayName: Build SiteExtension
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved,
@ -456,7 +457,7 @@ stages:
- name: Windows_Test_Dumps
path: artifacts/dumps/
publishOnError: true
includeForks: false
includeForks: true
- name: Windows_Test_Logs
path: artifacts/log/
publishOnError: true
@ -484,7 +485,7 @@ stages:
- name: Windows_Test_Templates_Dumps
path: artifacts/dumps/
publishOnError: true
includeForks: false
includeForks: true
- name: Windows_Test_Templates_Logs
path: artifacts/log/
publishOnError: true
@ -566,6 +567,25 @@ stages:
publishOnError: true
includeForks: true
# Helix x64
- template: jobs/default-build.yml
parameters:
jobName: Helix_x64
jobDisplayName: 'Tests: Helix x64'
agentOs: Windows
timeoutInMinutes: 180
steps:
- script: .\restore.cmd -ci
displayName: Restore
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=false -bl
displayName: Run build.cmd helix target
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
artifacts:
- name: Helix_logs
path: artifacts/log/
publishOnError: true
# Source build
- job: Source_Build
displayName: 'Test: Linux Source Build'

View File

@ -0,0 +1,45 @@
# Uses Scheduled Triggers, which aren't supported in YAML yet.
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=vsts&tabs=yaml#scheduled
# Daily Helix Tests for ASP.NET Core
jobs:
- template: jobs/default-build.yml
parameters:
jobName: Helix_x64_daily
jobDisplayName: 'Tests: Helix x64 Daily'
agentOs: Windows
timeoutInMinutes: 240
steps:
- script: .\restore.cmd -ci
displayName: Restore
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildNative=true -bl
displayName: Run build.cmd helix target
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
artifacts:
- name: Helix_logs
path: artifacts/log/
publishOnError: true
# Helix ARM64
- template: jobs/default-build.yml
parameters:
jobName: Helix_arm64_daily
jobDisplayName: "Tests: Helix ARM64 Daily"
agentOs: Linux
timeoutInMinutes: 180
steps:
- script: ./restore.sh -ci
displayName: Restore
- script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildNative=true -bl
displayName: Run build.sh helix arm64 target
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
installNodeJs: false
artifacts:
- name: Helix_arm64_logs
path: artifacts/log/
publishOnError: true
includeForks: true

2
.github/CODEOWNERS vendored
View File

@ -14,7 +14,7 @@
/src/Hosting/ @tratcher @anurse
/src/Http/ @tratcher @jkotalik @anurse
/src/Middleware/ @tratcher @anurse
/src/ProjectTemplates/ @ryanbrandenburg
# /src/ProjectTemplates/ @ryanbrandenburg
/src/Security/ @tratcher @anurse
/src/Servers/ @tratcher @jkotalik @anurse @halter73
/src/Middleware/Rewrite @jkotalik @anurse

66
.github/labeler.yml vendored Normal file
View File

@ -0,0 +1,66 @@
# "AzureAD" is an area-security area.
area-azure:
- src/Azure/AzureAppServices.HostingStartup/**/*
- src/Azure/AzureAppServicesIntegration/**/*
area-blazor:
- src/Components/**/*
area-commandlinetools:
- src/Tools/**/*
area-dataprotection:
- src/DataProtection/**/*
#area-grpc:
#area-healthchecks:
area-hosting:
- src/Hosting/**/*
- src/SiteExtensions/**/*
- src/DefaultBuilder/**/*
#area-httpclientfactory:
area-identity:
- src/Identity/**/*
area-infrastructure:
- global.json
- .azure/**/*
- .config/**/*
- eng/**/*
area-installers:
- src/Installers/**/*
area-middleware:
- src/Middleware/**/*
area-mvc:
- src/ProjectTemplates/**/*
- src/Razor/**/*
- src/Mvc/**/*
- src/MusicStore/**/*
area-platform:
- src/Framework/**/*
area-security:
- src/Security/**/*
- src/Azure/AzureAD/**/*
# For now, "Http" is under servers. We might adjust that later.
area-servers:
- src/Servers/**/*
- src/Http/**/*
area-signalr:
- src/SignalR/**/*
area-websockets:
- src/Middleware/WebSockets/**/*
api-suggestion:
- src/**/ref/**/*

12
.github/workflows/labeler.yml vendored Normal file
View File

@ -0,0 +1,12 @@
name: "Pull Request Labeler"
on:
- pull_request
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2
if: github.repository == 'aspnet/AspNetCore'
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

1
.gitignore vendored
View File

@ -40,3 +40,4 @@ launchSettings.json
msbuild.ProjectImports.zip
StyleCop.Cache
UpgradeLog.htm
.idea

View File

@ -51,7 +51,7 @@
<IncludeSymbols>true</IncludeSymbols>
<DefaultNetCoreTargetFramework>netcoreapp3.1</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFramework>netcoreapp5.0</DefaultNetCoreTargetFramework>
</PropertyGroup>
<!-- Warnings and errors -->
@ -61,6 +61,10 @@
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors>
<!-- xUnit1004 = warns about skipped tests. Make this a non-fatal build warning. -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);xUnit1004</WarningsNotAsErrors>
<!-- Working around https://github.com/NuGet/Home/issues/8467 -->
<NoWarn>$(NoWarn);NU5131</NoWarn>
<!-- Needed until we resolve https://github.com/aspnet/AspNetCore-Internal/issues/3103 -->
<NoWarn>$(NoWarn);NU5048</NoWarn>
</PropertyGroup>
<!-- Source code settings -->

View File

@ -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" />

View File

@ -1,7 +1,7 @@
ASP.NET Core
============
ASP.NET Core is an open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends. ASP.NET Core apps can run on .NET Core or on the full .NET Framework. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac and Linux. [Learn more about ASP.NET Core](https://docs.microsoft.com/aspnet/core/).
ASP.NET Core is an open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends. ASP.NET Core apps run on [.NET Core](https://dot.net), a free, cross-platform and open-source application runtime. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac and Linux. [Learn more about ASP.NET Core](https://docs.microsoft.com/aspnet/core/).
## Get Started

View File

@ -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.

View File

@ -1,11 +1,11 @@
Build ASP.NET Core from Source
==============================
Building ASP.NET Core from source allows you tweak and customize ASP.NET Core, and to contribute your improvements back to the project.
Building ASP.NET Core from source allows you to tweak and customize ASP.NET Core, and to contribute your improvements back to the project.
See https://github.com/aspnet/AspNetCore/labels/area-infrastructure for known issues and to track ongoing work.
## Install pre-requistes
## Install pre-requisites
### Windows
@ -44,7 +44,7 @@ Building ASP.NET Core on macOS or Linux requires:
## Clone the source code
ASP.NET Core uses git submodules to include source from a few other projects.
ASP.NET Core uses git submodules to include the source from a few other projects.
For a new copy of the project, run:
```
@ -64,19 +64,19 @@ Before opening our .sln files in Visual Studio or VS Code, you need to perform t
```
.\restore.cmd
```
This will download required tools and build the entire repository once. At that point, you should be able to open .sln files to work on the projects you care about.
This will download the required tools and build the entire repository once. At that point, you should be able to open .sln files to work on the projects you care about.
> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. On the master branch, we regularly update the versions of .NET Core SDK required to build the repo.
> You will need to restart Visual Studio every time we update the .NET Core SDK.
2. Use the `startvs.cmd` script to open Visual Studio .sln files. This script first sets required environment variables.
2. Use the `startvs.cmd` script to open Visual Studio .sln files. This script first sets the required environment variables.
### Solution files
We don't have a single .sln file for all of ASP.NET Core because Visual Studio doesn't currently handle projects of this scale.
Instead, we have many .sln files which include a sub-set of projects. These principles guide how we create and manage .slns:
1. Solution files are not used by CI or command line build scripts. They are for meant for use by developers only.
1. Solution files are not used by CI or command line build scripts. They are meant for use by developers only.
2. Solution files group together projects which are frequently edited at the same time.
3. Can't find a solution that has the projects you care about? Feel free to make a PR to add a new .sln file.
@ -91,7 +91,7 @@ Opening solution files and building may produce an error code CS0006 with a mess
The cause of this problem is that the solution you are using does not include the project that produces this .dll. This most often occurs after we have added new projects to the repo, but failed to update our .sln files to include the new project. In some cases, it is sometimes the intended behavior of the .sln which has been crafted to only include a subset of projects.
**You can fix this in one of two ways**
1. Build the project on command line. In most cases, running `build.cmd` on command line solve this problem.
1. Build the project on command line. In most cases, running `build.cmd` on command line solves this problem.
2. Update the solution to include the missing project. You can either do this one by one using `dotnet sln`
```
dotnet sln add C:\src\AspNetCore\src\Hosting\Abstractions\src\Microsoft.AspNetCore.Hosting.Abstractions.csproj
@ -139,7 +139,7 @@ On macOS/Linux:
./build.sh
```
By default, all of the C# projects are built. Some C# projects requires NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify /p:BuildNodeJs=false on the command line.
By default, all of the C# projects are built. Some C# projects require NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify /p:BuildNodeJs=false on the command line.
### Using `dotnet` on command line in this repo

View File

@ -22,4 +22,4 @@ Set `<HasReferenceAssembly>false</HasReferenceAssembly>` in the implementation (
### Regenerate reference assemblies for all projects
Run `.\eng\scripts\GenerateReferenceAssemblies.ps1` from repository root.
Run `.\eng\scripts\GenerateReferenceAssemblies.ps1` from repository root. Make sure you've run `.\restore.cmd` first.

View File

@ -9,408 +9,408 @@
-->
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="3.1.0-preview3.19531.1">
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="5.0.0-alpha1.19531.2">
<Uri>https://github.com/aspnet/Blazor</Uri>
<Sha>df77420cad90b1834fe43c952861dad11097d38f</Sha>
<Sha>67c011629f56585c6a561dc4bdca70efc43579dd</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="3.1.0-preview3.19531.7">
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="5.0.0-alpha1.19524.8">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>2bf9c124908d9ecf5623819312a8a4ac2e96cf4c</Sha>
<Sha>200bec7b2e7d659077f523a8287f52d99f6f06c0</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="3.1.0-preview3.19531.7">
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="5.0.0-alpha1.19524.8">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>2bf9c124908d9ecf5623819312a8a4ac2e96cf4c</Sha>
<Sha>200bec7b2e7d659077f523a8287f52d99f6f06c0</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="3.1.0-preview3.19531.7">
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="5.0.0-alpha1.19524.8">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>2bf9c124908d9ecf5623819312a8a4ac2e96cf4c</Sha>
<Sha>200bec7b2e7d659077f523a8287f52d99f6f06c0</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk.Razor" Version="3.1.0-preview3.19531.7">
<Dependency Name="Microsoft.NET.Sdk.Razor" Version="5.0.0-alpha1.19524.8">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>2bf9c124908d9ecf5623819312a8a4ac2e96cf4c</Sha>
<Sha>200bec7b2e7d659077f523a8287f52d99f6f06c0</Sha>
</Dependency>
<Dependency Name="dotnet-ef" Version="3.1.0-preview3.19531.3">
<Dependency Name="dotnet-ef" Version="5.0.0-alpha1.19531.1">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>036f31e120b92c08df7dbb540407bb13a169865c</Sha>
<Sha>ff6b374c976f69d5c426d2110328ed3498c0ad22</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.0-preview3.19531.3">
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0-alpha1.19531.1">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>036f31e120b92c08df7dbb540407bb13a169865c</Sha>
<Sha>ff6b374c976f69d5c426d2110328ed3498c0ad22</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="3.1.0-preview3.19531.3">
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0-alpha1.19531.1">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>036f31e120b92c08df7dbb540407bb13a169865c</Sha>
<Sha>ff6b374c976f69d5c426d2110328ed3498c0ad22</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.0-preview3.19531.3">
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-alpha1.19531.1">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>036f31e120b92c08df7dbb540407bb13a169865c</Sha>
<Sha>ff6b374c976f69d5c426d2110328ed3498c0ad22</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0-preview3.19531.3">
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-alpha1.19531.1">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>036f31e120b92c08df7dbb540407bb13a169865c</Sha>
<Sha>ff6b374c976f69d5c426d2110328ed3498c0ad22</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="3.1.0-preview3.19531.3">
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-alpha1.19531.1">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>036f31e120b92c08df7dbb540407bb13a169865c</Sha>
<Sha>ff6b374c976f69d5c426d2110328ed3498c0ad22</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore" Version="3.1.0-preview3.19531.3">
<Dependency Name="Microsoft.EntityFrameworkCore" Version="5.0.0-alpha1.19531.1">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>036f31e120b92c08df7dbb540407bb13a169865c</Sha>
<Sha>ff6b374c976f69d5c426d2110328ed3498c0ad22</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Analyzer.Testing" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.AspNetCore.Analyzer.Testing" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ActivatorUtilities.Sources" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ActivatorUtilities.Sources" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.SqlServer" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.SqlServer" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.CommandLineUtils.Sources" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.CommandLineUtils.Sources" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.AzureKeyVault" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.AzureKeyVault" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.KeyPerFile" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.KeyPerFile" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DiagnosticAdapter" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.DiagnosticAdapter" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HashCodeCombiner.Sources" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.HashCodeCombiner.Sources" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Hosting" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Hosting" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Http" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Http" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Localization.Abstractions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Localization.Abstractions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Localization" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Localization" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.AzureAppServices" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Testing" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Testing" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ObjectPool" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ObjectPool" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Options" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Primitives" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Primitives" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.TypeNameHelper.Sources" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.TypeNameHelper.Sources" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ValueStopwatch.Sources" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ValueStopwatch.Sources" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.WebEncoders" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.WebEncoders" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Internal.Extensions.Refs" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Internal.Extensions.Refs" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.JSInterop" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.JSInterop" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Mono.WebAssembly.Interop" Version="3.1.0-preview2.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Mono.WebAssembly.Interop" Version="5.0.0-preview2.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0-preview3.19530.2" 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>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>4ac4c0367003fe3973a3648eb0715ddb0e3bbcea</Sha>
</Dependency>
<Dependency Name="Microsoft.CSharp" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.CSharp" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="Microsoft.Win32.Registry" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="Microsoft.Win32.SystemEvents" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.Win32.SystemEvents" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.ComponentModel.Annotations" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.ComponentModel.Annotations" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Diagnostics.EventLog" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Diagnostics.EventLog" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Drawing.Common" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Drawing.Common" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.IO.Pipelines" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.IO.Pipelines" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Net.Http.WinHttpHandler" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Net.Http.WinHttpHandler" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Reflection.Metadata" Version="1.8.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Reflection.Metadata" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Cng" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Cryptography.Cng" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Pkcs" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Cryptography.Pkcs" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Xml" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Security.Permissions" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Permissions" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Security.Principal.Windows" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Principal.Windows" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.ServiceProcess.ServiceController" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.ServiceProcess.ServiceController" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Text.Encodings.Web" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Text.Encodings.Web" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Text.Json" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Threading.Channels" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Threading.Channels" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="System.Windows.Extensions" Version="4.7.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Windows.Extensions" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="3.1.0-preview3.19530.5" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="5.0.0-alpha1.19521.2" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>4950751278293d59898be799c0115e0ad895747e</Sha>
<Sha>a3a9cb66e59909d03269f7c0024f10fe07f0a2d5</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="3.1.0-preview3.19530.5" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="5.0.0-alpha1.19521.2" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>4950751278293d59898be799c0115e0ad895747e</Sha>
<Sha>a3a9cb66e59909d03269f7c0024f10fe07f0a2d5</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="3.1.0-preview3.19530.5" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="5.0.0-alpha1.19521.2" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>4950751278293d59898be799c0115e0ad895747e</Sha>
<Sha>a3a9cb66e59909d03269f7c0024f10fe07f0a2d5</Sha>
</Dependency>
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0-preview3.19530.5" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0-alpha1.19521.2" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>4950751278293d59898be799c0115e0ad895747e</Sha>
<Sha>a3a9cb66e59909d03269f7c0024f10fe07f0a2d5</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.1.0-preview3.19530.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-alpha1.19520.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>d29d1bf34dea385124d076405ccb66ccfd173a86</Sha>
<Sha>03453d9aae8e5d18e571699c5d2229b1ab5f4b9d</Sha>
</Dependency>
<Dependency Name="Internal.AspNetCore.Analyzers" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Internal.AspNetCore.Analyzers" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19517.3">
<Uri>https://github.com/dotnet/arcade</Uri>
@ -424,13 +424,13 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a42a124635ce1a218309ecb31ec59d559cacb886</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Testing" Version="3.1.0-preview3.19531.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.AspNetCore.Testing" Version="5.0.0-alpha1.19530.2" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>e43eaf0709fab3d8305449e3ae933420a8b913bc</Sha>
<Sha>7642beec82008e7d0e719220e1cb2c3f5277276c</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.5.0-beta1-19531-01" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.4.0-beta1-19456-03" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>d54455f982927b219209b63ba09c21b3f059be1d</Sha>
<Sha>3c865821f2864393a0ff7fe22c92ded6d51a546c</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>

View File

@ -6,19 +6,17 @@
-->
<Project>
<PropertyGroup Label="Version settings">
<AspNetCoreMajorVersion>3</AspNetCoreMajorVersion>
<AspNetCoreMinorVersion>1</AspNetCoreMinorVersion>
<AspNetCoreMajorVersion>5</AspNetCoreMajorVersion>
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
<PreReleasePreviewNumber>3</PreReleasePreviewNumber>
<PreReleasePreviewNumber>1</PreReleasePreviewNumber>
<!--
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
-->
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
<IncludePreReleaseLabelInPackageVersion Condition=" '$(DotNetFinalVersionKind)' == 'release' ">false</IncludePreReleaseLabelInPackageVersion>
<PreReleaseVersionLabel>preview$(PreReleasePreviewNumber)</PreReleaseVersionLabel>
<PreReleaseBrandingLabel>Preview $(PreReleasePreviewNumber)</PreReleaseBrandingLabel>
<PreReleaseVersionLabel>alpha$(PreReleasePreviewNumber)</PreReleaseVersionLabel>
<PreReleaseBrandingLabel>Alpha $(PreReleasePreviewNumber)</PreReleaseBrandingLabel>
<AspNetCoreMajorMinorVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</AspNetCoreMajorMinorVersion>
<!-- Additional assembly attributes are already configured to include the source revision ID. -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
@ -64,114 +62,114 @@
<!-- Packages from dotnet/arcade -->
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19517.3</MicrosoftDotNetGenAPIPackageVersion>
<!-- Packages from dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>3.5.0-beta1-19531-01</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>3.4.0-beta1-19456-03</MicrosoftNetCompilersToolsetPackageVersion>
<!-- Packages from dotnet/core-setup -->
<MicrosoftExtensionsDependencyModelPackageVersion>3.1.0-preview3.19530.5</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>3.1.0-preview3.19530.5</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>3.1.0-preview3.19530.5</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<NETStandardLibraryRefPackageVersion>2.1.0-preview3.19530.5</NETStandardLibraryRefPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-alpha1.19521.2</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-alpha1.19521.2</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-alpha1.19521.2</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<NETStandardLibraryRefPackageVersion>2.1.0-alpha1.19521.2</NETStandardLibraryRefPackageVersion>
<!-- Packages from dotnet/corefx -->
<MicrosoftBclAsyncInterfacesPackageVersion>1.1.0-preview3.19530.2</MicrosoftBclAsyncInterfacesPackageVersion>
<MicrosoftCSharpPackageVersion>4.7.0-preview3.19530.2</MicrosoftCSharpPackageVersion>
<MicrosoftWin32RegistryPackageVersion>4.7.0-preview3.19530.2</MicrosoftWin32RegistryPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>4.7.0-preview3.19530.2</MicrosoftWin32SystemEventsPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>4.7.0-preview3.19530.2</SystemComponentModelAnnotationsPackageVersion>
<SystemDiagnosticsEventLogPackageVersion>4.7.0-preview3.19530.2</SystemDiagnosticsEventLogPackageVersion>
<SystemDrawingCommonPackageVersion>4.7.0-preview3.19530.2</SystemDrawingCommonPackageVersion>
<SystemIOPipelinesPackageVersion>4.7.0-preview3.19530.2</SystemIOPipelinesPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>4.7.0-preview3.19530.2</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>4.7.0-preview3.19530.2</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemReflectionMetadataPackageVersion>1.8.0-preview3.19530.2</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>4.7.0-preview3.19530.2</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityCryptographyCngPackageVersion>4.7.0-preview3.19530.2</SystemSecurityCryptographyCngPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>4.7.0-preview3.19530.2</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>4.7.0-preview3.19530.2</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>4.7.0-preview3.19530.2</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>4.7.0-preview3.19530.2</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>4.7.0-preview3.19530.2</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>4.7.0-preview3.19530.2</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>4.7.0-preview3.19530.2</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>4.7.0-preview3.19530.2</SystemThreadingChannelsPackageVersion>
<SystemWindowsExtensionsPackageVersion>4.7.0-preview3.19530.2</SystemWindowsExtensionsPackageVersion>
<MicrosoftBclAsyncInterfacesPackageVersion>1.0.0</MicrosoftBclAsyncInterfacesPackageVersion>
<MicrosoftCSharpPackageVersion>5.0.0-alpha1.19520.7</MicrosoftCSharpPackageVersion>
<MicrosoftWin32RegistryPackageVersion>5.0.0-alpha1.19520.7</MicrosoftWin32RegistryPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-alpha1.19520.7</MicrosoftWin32SystemEventsPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>5.0.0-alpha1.19520.7</SystemComponentModelAnnotationsPackageVersion>
<SystemDiagnosticsEventLogPackageVersion>5.0.0-alpha1.19520.7</SystemDiagnosticsEventLogPackageVersion>
<SystemDrawingCommonPackageVersion>5.0.0-alpha1.19520.7</SystemDrawingCommonPackageVersion>
<SystemIOPipelinesPackageVersion>5.0.0-alpha1.19520.7</SystemIOPipelinesPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>5.0.0-alpha1.19520.7</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0-alpha1.19520.7</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemReflectionMetadataPackageVersion>5.0.0-alpha1.19520.7</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0-alpha1.19520.7</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityCryptographyCngPackageVersion>5.0.0-alpha1.19520.7</SystemSecurityCryptographyCngPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>5.0.0-alpha1.19520.7</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-alpha1.19520.7</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>5.0.0-alpha1.19520.7</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-alpha1.19520.7</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>5.0.0-alpha1.19520.7</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>5.0.0-alpha1.19520.7</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>5.0.0-alpha1.19520.7</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>5.0.0-alpha1.19520.7</SystemThreadingChannelsPackageVersion>
<SystemWindowsExtensionsPackageVersion>5.0.0-alpha1.19520.7</SystemWindowsExtensionsPackageVersion>
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<MicrosoftNETCorePlatformsPackageVersion>3.1.0-preview3.19530.2</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-alpha1.19520.7</MicrosoftNETCorePlatformsPackageVersion>
<!-- Packages from aspnet/Blazor -->
<MicrosoftAspNetCoreBlazorMonoPackageVersion>3.1.0-preview3.19531.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
<MicrosoftAspNetCoreBlazorMonoPackageVersion>5.0.0-alpha1.19531.2</MicrosoftAspNetCoreBlazorMonoPackageVersion>
<!-- Packages from aspnet/Extensions -->
<InternalAspNetCoreAnalyzersPackageVersion>3.1.0-preview3.19531.1</InternalAspNetCoreAnalyzersPackageVersion>
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>3.1.0-preview3.19531.1</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>3.1.0-preview3.19531.1</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>3.1.0-preview3.19531.1</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>
<MicrosoftExtensionsCachingAbstractionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsCachingAbstractionsPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsCachingSqlServerPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsCachingSqlServerPackageVersion>
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationIniPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationIniPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsConfigurationXmlPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsConfigurationXmlPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
<MicrosoftExtensionsFileProvidersCompositePackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsFileProvidersCompositePackageVersion>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsHostingPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsHttpPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsHttpPackageVersion>
<MicrosoftExtensionsLocalizationAbstractionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLocalizationAbstractionsPackageVersion>
<MicrosoftExtensionsLocalizationPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLocalizationPackageVersion>
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
<MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingEventSourcePackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingEventSourcePackageVersion>
<MicrosoftExtensionsLoggingEventLogPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingEventLogPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
<MicrosoftExtensionsObjectPoolPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsObjectPoolPackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>
<MicrosoftExtensionsPrimitivesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsPrimitivesPackageVersion>
<MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
<MicrosoftExtensionsWebEncodersPackageVersion>3.1.0-preview3.19531.1</MicrosoftExtensionsWebEncodersPackageVersion>
<MicrosoftInternalExtensionsRefsPackageVersion>3.1.0-preview3.19531.1</MicrosoftInternalExtensionsRefsPackageVersion>
<MicrosoftJSInteropPackageVersion>3.1.0-preview3.19531.1</MicrosoftJSInteropPackageVersion>
<MonoWebAssemblyInteropPackageVersion>3.1.0-preview2.19531.1</MonoWebAssemblyInteropPackageVersion>
<InternalAspNetCoreAnalyzersPackageVersion>5.0.0-alpha1.19530.2</InternalAspNetCoreAnalyzersPackageVersion>
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>5.0.0-alpha1.19530.2</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>5.0.0-alpha1.19530.2</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsCachingAbstractionsPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsCachingSqlServerPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsCachingSqlServerPackageVersion>
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationIniPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationIniPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsConfigurationXmlPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
<MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsFileProvidersCompositePackageVersion>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsHostingPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsHttpPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsHttpPackageVersion>
<MicrosoftExtensionsLocalizationAbstractionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLocalizationAbstractionsPackageVersion>
<MicrosoftExtensionsLocalizationPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLocalizationPackageVersion>
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
<MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingEventSourcePackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingEventSourcePackageVersion>
<MicrosoftExtensionsLoggingEventLogPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingEventLogPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
<MicrosoftExtensionsObjectPoolPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsObjectPoolPackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>
<MicrosoftExtensionsPrimitivesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsPrimitivesPackageVersion>
<MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
<MicrosoftExtensionsWebEncodersPackageVersion>5.0.0-alpha1.19530.2</MicrosoftExtensionsWebEncodersPackageVersion>
<MicrosoftInternalExtensionsRefsPackageVersion>5.0.0-alpha1.19530.2</MicrosoftInternalExtensionsRefsPackageVersion>
<MicrosoftJSInteropPackageVersion>5.0.0-alpha1.19530.2</MicrosoftJSInteropPackageVersion>
<MonoWebAssemblyInteropPackageVersion>5.0.0-preview2.19530.2</MonoWebAssemblyInteropPackageVersion>
<!-- Packages from aspnet/EntityFrameworkCore -->
<dotnetefPackageVersion>3.1.0-preview3.19531.3</dotnetefPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>3.1.0-preview3.19531.3</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>3.1.0-preview3.19531.3</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>3.1.0-preview3.19531.3</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>3.1.0-preview3.19531.3</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>3.1.0-preview3.19531.3</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>3.1.0-preview3.19531.3</MicrosoftEntityFrameworkCorePackageVersion>
<dotnetefPackageVersion>5.0.0-alpha1.19531.1</dotnetefPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-alpha1.19531.1</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>5.0.0-alpha1.19531.1</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>5.0.0-alpha1.19531.1</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>5.0.0-alpha1.19531.1</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>5.0.0-alpha1.19531.1</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>5.0.0-alpha1.19531.1</MicrosoftEntityFrameworkCorePackageVersion>
<!-- Packages from aspnet/AspNetCore-Tooling -->
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>3.1.0-preview3.19531.7</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
<MicrosoftAspNetCoreRazorLanguagePackageVersion>3.1.0-preview3.19531.7</MicrosoftAspNetCoreRazorLanguagePackageVersion>
<MicrosoftCodeAnalysisRazorPackageVersion>3.1.0-preview3.19531.7</MicrosoftCodeAnalysisRazorPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>3.1.0-preview3.19531.7</MicrosoftNETSdkRazorPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>5.0.0-alpha1.19524.8</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
<MicrosoftAspNetCoreRazorLanguagePackageVersion>5.0.0-alpha1.19524.8</MicrosoftAspNetCoreRazorLanguagePackageVersion>
<MicrosoftCodeAnalysisRazorPackageVersion>5.0.0-alpha1.19524.8</MicrosoftCodeAnalysisRazorPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>5.0.0-alpha1.19524.8</MicrosoftNETSdkRazorPackageVersion>
</PropertyGroup>
<!--
@ -236,7 +234,7 @@
<CastleCorePackageVersion>4.2.1</CastleCorePackageVersion>
<FSharpCorePackageVersion>4.2.1</FSharpCorePackageVersion>
<GoogleProtobufPackageVersion>3.8.0</GoogleProtobufPackageVersion>
<GrpcAspNetCorePackageVersion>2.24.0</GrpcAspNetCorePackageVersion>
<GrpcAspNetCorePackageVersion>2.23.2</GrpcAspNetCorePackageVersion>
<IdentityServer4AspNetIdentityPackageVersion>3.0.0</IdentityServer4AspNetIdentityPackageVersion>
<IdentityServer4EntityFrameworkPackageVersion>3.0.0</IdentityServer4EntityFrameworkPackageVersion>
<IdentityServer4PackageVersion>3.0.0</IdentityServer4PackageVersion>

View File

@ -1,8 +1,8 @@
<!-- Use this file to workaround issues. List the issue tracking the item to fix so we can remove the workaround when the issue is resolved. -->
<Project>
<!-- Workaround while there is no 3.1 SDK available, suppress unsupported version error -->
<!-- Workaround while there is no 5.0 SDK available, suppress unsupported version error -->
<PropertyGroup>
<NETCoreAppMaximumVersion>3.1</NETCoreAppMaximumVersion>
<NETCoreAppMaximumVersion>5.0</NETCoreAppMaximumVersion>
</PropertyGroup>
<ItemGroup>
@ -25,11 +25,6 @@
<Reference Include="Microsoft.AspNetCore.Mvc" Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true' AND '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(GenerateRazorAssemblyInfo)' == 'true'" />
</ItemGroup>
<!-- Workaround https://github.com/dotnet/cli/issues/10528 -->
<PropertyGroup>
<BundledNETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</BundledNETCorePlatformsPackageVersion>
</PropertyGroup>
<!-- Workaround https://github.com/aspnet/AspNetCore/issues/7503. This chains GenerateSourceLinkFile before razor component targets run. -->
<!-- Workaround https://github.com/dotnet/source-build/issues/1112. Source link is currently disabled in source build so do not apply this worksaround. -->
<Target Condition="'$(DotNetBuildFromSource)' != 'true'"
@ -45,6 +40,20 @@
<PackageReference Include="Internal.AspNetCore.BuildTasks" PrivateAssets="All" Version="$(InternalAspNetCoreBuildTasksPackageVersion)" IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup>
<!-- Workaround when there is no vNext SDK available, copy known apphost/framework reference info from 3.0 -->
<KnownAppHostPack
Include="@(KnownAppHostPack->WithMetadataValue('TargetFramework', 'netcoreapp3.0'))"
TargetFramework="$(DefaultNetCoreTargetFramework)"
Condition="@(KnownAppHostPack->Count()) != '0' AND !(@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '$(DefaultNetCoreTargetFramework)')))"
/>
<KnownFrameworkReference
Include="@(KnownFrameworkReference->WithMetadataValue('TargetFramework', 'netcoreapp3.0'))"
TargetFramework="$(DefaultNetCoreTargetFramework)"
Condition="@(KnownFrameworkReference->Count()) != '0' AND !(@(KnownFrameworkReference->AnyHaveMetadataValue('TargetFramework', '$(DefaultNetCoreTargetFramework)')))"
/>
</ItemGroup>
<!-- Workaround for netstandard2.1 projects until we can get a preview 8 SDK containing https://github.com/dotnet/sdk/pull/3463 fix. -->
<ItemGroup>
<KnownFrameworkReference Update="NETStandard.Library">

View File

@ -48,9 +48,10 @@ Write-Host "Extracting to $tempDir"
if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) {
# Use built-in commands where possible as they are cross-plat compatible
Microsoft.PowerShell.Archive\Expand-Archive -Path "nodejs.zip" -DestinationPath $tempDir
Microsoft.PowerShell.Archive\Expand-Archive -Path "nodejs.zip" -DestinationPath $tempDir -Force
}
else {
Remove-Item $tempDir -Recurse -ErrorAction Ignore
# Fallback to old approach for old installations of PowerShell
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("nodejs.zip", $tempDir)

View File

@ -169,7 +169,7 @@ try {
Write-Host "Run git diff to check for pending changes"
# Redirect stderr to stdout because PowerShell does not consistently handle output to stderr
$changedFiles = & cmd /c 'git --no-pager diff --ignore-space-at-eol --name-only 2>nul'
$changedFiles = & cmd /c 'git --no-pager diff --ignore-space-change --name-only 2>nul'
# Temporary: Disable check for blazor js file
$changedFilesExclusion = "src/Components/Web.JS/dist/Release/blazor.server.js"
@ -177,10 +177,9 @@ try {
if ($changedFiles) {
foreach ($file in $changedFiles) {
if ($file -eq $changedFilesExclusion) {continue}
$filePath = Resolve-Path "${repoRoot}/${file}"
LogError "Generated code is not up to date in $file. You might need to regenerate the reference assemblies or project list (see docs/ReferenceAssemblies.md and docs/ReferenceResolution.md)" -filepath $filePath
& git --no-pager diff --ignore-space-at-eol $filePath
& git --no-pager diff --ignore-space-change $filePath
}
}
}

View File

@ -9,10 +9,10 @@ set -euo pipefail
scriptroot="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
reporoot="$(dirname "$(dirname "$scriptroot")")"
# Build repo tasks
# Build repo tasks
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj
export DotNetBuildFromSource='true'
# Build projects
# Build projects
"$reporoot/eng/common/build.sh" --restore --build --pack "$@"

View File

@ -1,10 +1,4 @@
<Project>
<ItemDefinitionGroup>
<HelixAvailableTargetQueue>
<EnableByDefault>true</EnableByDefault>
</HelixAvailableTargetQueue>
</ItemDefinitionGroup>
<!-- this file is shared between Helix.proj and .csproj files -->
<ItemGroup Condition="'$(IsWindowsOnlyTest)' != 'true'">
<HelixAvailablePlatform Include="Windows" />
@ -12,15 +6,15 @@
<HelixAvailablePlatform Include="Linux" />
</ItemGroup>
<!-- x64 queues -->
<ItemGroup Condition="'$(IsWindowsOnlyTest)' != 'true' AND '$(TargetArchitecture)' == 'x64'">
<HelixAvailableTargetQueue Include="Windows.10.Amd64.ClientRS4.VS2017.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Windows.81.Amd64.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Windows.7.Amd64.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Windows.10.Amd64.EnterpriseRS3.ASPNET.Open" Platform="Windows" EnableByDefault="false" />
<HelixAvailableTargetQueue Include="OSX.1013.Amd64.Open" Platform="OSX" />
<!-- required for green PR queues -->
<ItemGroup Condition="'$(IsWindowsOnlyTest)' != 'true' AND '$(TargetArchitecture)' == 'x64' AND '$(IsRequiredCheck)' == 'true'">
<HelixAvailableTargetQueue Include="Ubuntu.1604.Amd64.Open" Platform="Linux" />
</ItemGroup>
<!-- daily scheduled only queues -->
<ItemGroup Condition="'$(IsWindowsOnlyTest)' != 'true' AND '$(TargetArchitecture)' == 'x64' AND '$(IsHelixDaily)' == 'true'">
<HelixAvailableTargetQueue Include="Ubuntu.1804.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="OSX.1014.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="Centos.7.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="Debian.8.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="Debian.9.Amd64.Open" Platform="Linux" />
@ -28,20 +22,27 @@
<HelixAvailableTargetQueue Include="(Fedora.28.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249" Platform="Linux" />
</ItemGroup>
<ItemGroup Condition="'$(IsWindowsOnlyTest)' != 'true' AND '$(TargetArchitecture)' == 'arm64'">
<ItemGroup Condition="'$(IsWindowsOnlyTest)' != 'true' AND '$(TargetArchitecture)' == 'arm64' AND '$(IsHelixDaily)' == 'true'">
<!-- arm64 queues -->
<HelixAvailableTargetQueue Include="(Debian.9.Arm64.Open)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm64v8-a12566d-20190807161036" Platform="Linux" />
<HelixAvailableTargetQueue Include="(Debian.9.Arm64.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm64v8-a12566d-20190807161036" Platform="Linux" />
<!-- Need to resolve permission issues on this docker queue
<HelixAvailableTargetQueue Include="(Alpine.38.Arm64)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-arm64v8-46e69dd-20190327215724" Platform="Linux" />
<HelixAvailableTargetQueue Include="(Ubuntu-1804.Arm64.Open)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-6f28fa9-20190606004102" Platform="Linux" />
-->
</ItemGroup>
<!-- non required queues run on every PR -->
<ItemGroup Condition="'$(IsWindowsOnlyTest)' != 'true' AND '$(TargetArchitecture)' == 'x64' AND '$(IsRequiredCheck)' != 'true'">
<HelixAvailableTargetQueue Include="Windows.10.Amd64.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Windows.81.Amd64.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Windows.7.Amd64.Open" Platform="Windows" />
</ItemGroup>
<ItemGroup Condition="'$(IsWindowsOnlyTest)' == 'true'">
<ItemGroup Condition="'$(IsWindowsOnlyTest)' == 'true' AND '$(IsRequiredCheck)' != 'true'">
<HelixAvailablePlatform Include="Windows" />
<HelixAvailableTargetQueue Include="Windows.10.Amd64.EnterpriseRS3.ASPNET.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Windows.10.Amd64.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Windows.81.Amd64.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Windows.7.Amd64.Open" Platform="Windows" />
@ -53,4 +54,5 @@
<HelixPreCommand Include="call RunPowershell.cmd update_schema.ps1 || exit /b 1" />
<HelixPreCommand Include="call RunPowershell.cmd UpdateIISExpressCertificate.ps1 || exit /b 1" />
</ItemGroup>
</Project>

View File

@ -42,7 +42,7 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
<ItemGroup>
<!-- Include default queues based on platform -->
<_HelixProjectTargetQueue Include="%(HelixAvailableTargetQueue.Identity)" Condition="'%(HelixAvailableTargetQueue.Identity)' != '' AND '$(_SelectedPlatforms.Contains(%(Platform)))' == 'true' AND '%(EnableByDefault)' == 'true'" />
<_HelixProjectTargetQueue Include="%(HelixAvailableTargetQueue.Identity)" Condition="'%(HelixAvailableTargetQueue.Identity)' != '' AND '$(_SelectedPlatforms.Contains(%(Platform)))' == 'true'" />
<_HelixApplicableTargetQueue Include="%(_HelixProjectTargetQueue.Identity)" Condition="'%(Identity)' == '$(HelixTargetQueue)'" />
</ItemGroup>

View File

@ -20,16 +20,20 @@
</PropertyGroup>
<ItemGroup>
<TSFiles Include="$(MSBuildProjectDirectory)\*\*.ts" />
<TSFiles Include="$(MSBuildProjectDirectory)\package.json" />
<TSFiles Include="$(MSBuildProjectDirectory)\*.npmproj" />
<TSFiles Include="src\**\*.ts" />
<TSFiles Include="test\**\*.ts" />
<TSFiles Include="package.json" />
<TSFiles Include="*.npmproj" />
<BuildOutputFiles Include="$(BaseIntermediateOutputPath)\build-sentinel" />
<BuildOutputFiles Include="dist\**\*.js" />
</ItemGroup>
<Target Name="_CheckForInvalidConfiguration">
<Error Text="Missing expected property: PackageId" Condition="'$(IsPackable)' != 'false' and '$(PackageId)' == ''" />
<Exec ContinueOnError="true" Command="node -v">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
<Exec ContinueOnError="true" Command="node -v" StandardOutputImportance="Low">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
</Exec>
<Error Text="Building *.npmproj but NodeJS was not detected on path. Ensure NodeJS is on path or disable building NodeJS projects with /p:BuildNodeJs=false. Skipping NodeJS projects will also skip managed projects depending on them, including Components, Mvc and Analysers." Condition="'$(ErrorCode)' != '0'"/>
@ -53,12 +57,25 @@
<CallTarget Targets="_Pack" Condition="'$(PackOnBuild)' == 'true'" />
</Target>
<Target Name="GetBuildInputCacheFile">
<Hash ItemsToHash="@(TSFiles)">
<Output TaskParameter="HashResult" PropertyName="_TSFileHash" />
</Hash>
<WriteLinesToFile
Lines="$(_TSFileHash)"
File="$(BaseIntermediateOutputPath)tsfiles.cache"
Overwrite="True"
WriteOnlyWhenDifferent="True" />
</Target>
<Target Name="_Build"
Condition="'$(IsBuildable)' != 'false'"
Inputs="@(TSFiles)"
Outputs="$(BaseIntermediateOutputPath)\build-sentinel" >
DependsOnTargets="GetBuildInputCacheFile"
Inputs="@(TSFiles);$(BaseIntermediateOutputPath)tsfiles.cache"
Outputs="@(BuildOutputFiles)">
<Yarn Command="$(NpmBuildArgs)" StandardOutputImportance="High" StandardErrorImportance="High" />
<WriteLinesToFile Overwrite="true" File="$(BaseIntermediateOutputPath)\build-sentinel" />
<WriteLinesToFile Overwrite="true" File="$(BaseIntermediateOutputPath)build-sentinel" />
</Target>
<PropertyGroup>
@ -73,7 +90,10 @@
</PackDependsOn>
</PropertyGroup>
<Target Name="_Pack" Condition="'$(IsPackable)' == 'true'" >
<Target Name="_Pack" Condition="'$(IsPackable)' == 'true'"
Inputs="@(TSFiles)"
Outputs="$(PackageOutputPath)\$(PackageFileName)">
<PropertyGroup>
<_PackageTargetPath>$(MSBuildProjectDirectory)\$(PackageFileName)</_PackageTargetPath>
</PropertyGroup>

View File

@ -12,7 +12,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NuGet.Build.Tasks" Version="5.3.0" />
<PackageReference Include="NuGet.Build.Tasks" Version="5.3.0-rtm.6192" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
</ItemGroup>

View File

@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">netcoreapp3.1</_RepoTaskAssemblyFolder>
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">netcoreapp5.0</_RepoTaskAssemblyFolder>
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' != 'core'">net472</_RepoTaskAssemblyFolder>
<_RepoTaskAssembly>$(ArtifactsBinDir)RepoTasks\Release\$(_RepoTaskAssemblyFolder)\RepoTasks.dll</_RepoTaskAssembly>
</PropertyGroup>

View File

@ -1,9 +1,9 @@
{
"sdk": {
"version": "3.1.100-preview1-014400"
"version": "5.0.100-alpha1-014696"
},
"tools": {
"dotnet": "3.1.100-preview1-014400",
"dotnet": "5.0.100-alpha1-014696",
"runtimes": {
"dotnet/x64": [
"$(MicrosoftNETCoreAppRuntimeVersion)"

View File

@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Antiforgery
/// <summary>
/// Allows providing or validating additional custom data for antiforgery tokens.
/// For example, the developer could use this to supply a nonce when the token is
/// generated, then he could validate the nonce when the token is validated.
/// generated, then validate it when the token is validated.
/// </summary>
/// <remarks>
/// The antiforgery system already embeds the client's username within the

View File

@ -379,7 +379,7 @@ namespace Microsoft.AspNetCore.Antiforgery
/// <param name="httpContext">The <see cref="HttpContext"/>.</param>
protected virtual void SetDoNotCacheHeaders(HttpContext httpContext)
{
// Since antifogery token generation is not very obvious to the end users (ex: MVC's form tag generates them
// Since antiforgery token generation is not very obvious to the end users (ex: MVC's form tag generates them
// by default), log a warning to let users know of the change in behavior to any cache headers they might
// have set explicitly.
LogCacheHeaderOverrideWarning(httpContext.Response);

View File

@ -56,7 +56,7 @@ namespace Microsoft.AspNetCore.Antiforgery.Internal
public void DefaultUniqueClaimTypes_NotPresent_SerializesAllClaimTypes()
{
var identity = new ClaimsIdentity("someAuthentication");
identity.AddClaim(new Claim(ClaimTypes.Email, "someone@antifrogery.com"));
identity.AddClaim(new Claim(ClaimTypes.Email, "someone@antiforgery.com"));
identity.AddClaim(new Claim(ClaimTypes.GivenName, "some"));
identity.AddClaim(new Claim(ClaimTypes.Surname, "one"));
identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, string.Empty));

View File

@ -8,9 +8,9 @@ using Xunit;
namespace Microsoft.AspNetCore.Components.Analyzers
{
public class ComponentInternalUsageDiagnoticsAnalyzerTest : AnalyzerTestBase
public class ComponentInternalUsageDiagnosticsAnalyzerTest : AnalyzerTestBase
{
public ComponentInternalUsageDiagnoticsAnalyzerTest()
public ComponentInternalUsageDiagnosticsAnalyzerTest()
{
Analyzer = new ComponentInternalUsageDiagnosticAnalyzer();
Runner = new ComponentAnalyzerDiagnosticAnalyzerRunner(Analyzer);

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Components.RenderTree;
namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnoticsAnalyzerTest
namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnosticsAnalyzerTest
{
class UsesRenderTreeFrameAsParameter
{

View File

@ -1,7 +1,7 @@
using System;
using Microsoft.AspNetCore.Components.RenderTree;
namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnoticsAnalyzerTest
namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnosticsAnalyzerTest
{
class UsesRenderTreeFrameTypeAsLocal
{

View File

@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.Blazor.Hosting
public static void Run(this IWebAssemblyHost host)
{
// Behave like async void, because we don't yet support async-main properly on WebAssembly.
// However, don't actualy make this method async, because we rely on startup being synchronous
// However, don't actually make this method async, because we rely on startup being synchronous
// for things like attaching navigation event handlers.
host.StartAsync().ContinueWith(task =>
{

View File

@ -20,6 +20,11 @@ namespace Microsoft.AspNetCore.Blazor.Services
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
{
if (!IsEnabled(logLevel))
{
return;
}
var formattedMessage = formatter(state, exception);
Console.WriteLine($"[{logLevel}] {formattedMessage}");
}

View File

@ -436,9 +436,15 @@
<!-- Clear the contents of /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker -->
<Delete Files="$(BlazorIntermediateLinkerOutputPath)*.dll" />
<PropertyGroup>
<_MonoLinkerDotNetPath>$(DOTNET_HOST_PATH)</_MonoLinkerDotNetPath>
<_MonoLinkerDotNetPath Condition="'$(_MonoLinkerDotNetPath)' == ''">dotnet</_MonoLinkerDotNetPath>
</PropertyGroup>
<!-- Run the linker and put the results in /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker -->
<Exec Command="dotnet &quot;$(MonoLinkerPath)&quot; $(_BlazorLinkerAdditionalOptions) @(_BlazorFolderLookupPaths, ' ') -o &quot;$(BlazorIntermediateLinkerOutputPath)&quot; @(_BlazorAssemblyDescriptorFiles, ' ') @(_BlazorAssembliesToLink, ' ')" />
<Exec Command="$(_MonoLinkerDotNetPath) &quot;$(MonoLinkerPath)&quot; $(_BlazorLinkerAdditionalOptions) @(_BlazorFolderLookupPaths, ' ') -o &quot;$(BlazorIntermediateLinkerOutputPath)&quot; @(_BlazorAssemblyDescriptorFiles, ' ') @(_BlazorAssembliesToLink, ' ')" />
<!-- Collect the contents of /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker/ -->
<ItemGroup>

View File

@ -2,7 +2,7 @@
<!-- This file specifies which parts of the BCL or Blazor packages must not be stripped
by the IL linker even if they are not referenced by user code. The file format is
described at https://github.com/mono/linker/blob/master/linker/README.md#syntax-of-xml-descriptor -->
described at https://github.com/mono/linker/blob/master/src/linker/README.md#syntax-of-xml-descriptor -->
<assembly fullname="mscorlib">
<!-- Preserve all methods on WasmRuntime, because these are called by JS-side code

View File

@ -96,7 +96,7 @@ namespace Test
}
[Fact]
public void Render_ChildComponent_TriesToSetNonParamter()
public void Render_ChildComponent_TriesToSetNonParameter()
{
// Arrange
AdditionalSyntaxTrees.Add(Parse(@"

View File

@ -100,7 +100,7 @@ namespace WsProxy {
break;
}
case "Debugger.paused": {
//TODO figure out how to stich out more frames and, in particular what happens when real wasm is on the stack
//TODO figure out how to stitch out more frames and, in particular what happens when real wasm is on the stack
var top_func = args? ["callFrames"]? [0]? ["functionName"]?.Value<string> ();
if (top_func == "mono_wasm_fire_bp" || top_func == "_mono_wasm_fire_bp") {
await OnBreakPointHit (args, token);
@ -419,7 +419,7 @@ namespace WsProxy {
var res = await SendCommand("Runtime.evaluate", o, token);
//if we fail we just buble that to the IDE (and let it panic over it)
//if we fail we just bubble that to the IDE (and let it panic over it)
if (res.IsErr)
{
SendResponse(msg_id, res, token);
@ -475,7 +475,7 @@ namespace WsProxy {
var res = await SendCommand ("Runtime.evaluate", o, token);
//if we fail we just buble that to the IDE (and let it panic over it)
//if we fail we just bubble that to the IDE (and let it panic over it)
if (res.IsErr) {
SendResponse (msg_id, res, token);
return;
@ -594,7 +594,7 @@ namespace WsProxy {
var res = await EnableBreakPoint (bp, token);
var ret_code = res.Value? ["result"]? ["value"]?.Value<int> ();
//if we fail we just buble that to the IDE (and let it panic over it)
//if we fail we just bubble that to the IDE (and let it panic over it)
if (!ret_code.HasValue) {
//FIXME figure out how to inform the IDE of that.
Info ($"FAILED TO ENABLE BP {bp.LocalId}");
@ -668,7 +668,7 @@ namespace WsProxy {
var res = await EnableBreakPoint (bp, token);
var ret_code = res.Value? ["result"]? ["value"]?.Value<int> ();
//if we fail we just buble that to the IDE (and let it panic over it)
//if we fail we just bubble that to the IDE (and let it panic over it)
if (!ret_code.HasValue) {
SendResponse (msg_id, res, token);
return;

View File

@ -83,12 +83,12 @@
"datatype": "choice",
"choices": [
{
"choice": "netcoreapp3.1",
"description": "Target netcoreapp3.1"
"choice": "netcoreapp5.0",
"description": "Target netcoreapp5.0"
}
],
"replaces": "netcoreapp3.1",
"defaultValue": "netcoreapp3.1"
"replaces": "netcoreapp5.0",
"defaultValue": "netcoreapp5.0"
},
"HostIdentifier": {
"type": "bind",

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

View File

@ -430,7 +430,7 @@ namespace Microsoft.AspNetCore.Components
private static string FormatEnumValueCore<T>(T value, CultureInfo culture) where T : struct, Enum
{
return value.ToString(); // The overload that acccepts a culture is [Obsolete]
return value.ToString(); // The overload that accepts a culture is [Obsolete]
}
private static string FormatNullableEnumValueCore<T>(T? value, CultureInfo culture) where T : struct, Enum
@ -440,7 +440,7 @@ namespace Microsoft.AspNetCore.Components
return null;
}
return value.Value.ToString(); // The overload that acccepts a culture is [Obsolete]
return value.Value.ToString(); // The overload that accepts a culture is [Obsolete]
}
/// <summary>
@ -1166,99 +1166,99 @@ namespace Microsoft.AspNetCore.Components
public static BindFormatter<T> Get<T>()
{
if (!_cache.TryGetValue(typeof(T), out var formattter))
if (!_cache.TryGetValue(typeof(T), out var formatter))
{
// We need to replicate all of the primitive cases that we handle here so that they will behave the same way.
// The result will be cached.
if (typeof(T) == typeof(string))
{
formattter = (BindFormatter<string>)FormatStringValueCore;
formatter = (BindFormatter<string>)FormatStringValueCore;
}
else if (typeof(T) == typeof(bool))
{
formattter = (BindFormatter<bool>)FormatBoolValueCore;
formatter = (BindFormatter<bool>)FormatBoolValueCore;
}
else if (typeof(T) == typeof(bool?))
{
formattter = (BindFormatter<bool?>)FormatNullableBoolValueCore;
formatter = (BindFormatter<bool?>)FormatNullableBoolValueCore;
}
else if (typeof(T) == typeof(int))
{
formattter = (BindFormatter<int>)FormatIntValueCore;
formatter = (BindFormatter<int>)FormatIntValueCore;
}
else if (typeof(T) == typeof(int?))
{
formattter = (BindFormatter<int?>)FormatNullableIntValueCore;
formatter = (BindFormatter<int?>)FormatNullableIntValueCore;
}
else if (typeof(T) == typeof(long))
{
formattter = (BindFormatter<long>)FormatLongValueCore;
formatter = (BindFormatter<long>)FormatLongValueCore;
}
else if (typeof(T) == typeof(long?))
{
formattter = (BindFormatter<long?>)FormatNullableLongValueCore;
formatter = (BindFormatter<long?>)FormatNullableLongValueCore;
}
else if (typeof(T) == typeof(float))
{
formattter = (BindFormatter<float>)FormatFloatValueCore;
formatter = (BindFormatter<float>)FormatFloatValueCore;
}
else if (typeof(T) == typeof(float?))
{
formattter = (BindFormatter<float?>)FormatNullableFloatValueCore;
formatter = (BindFormatter<float?>)FormatNullableFloatValueCore;
}
else if (typeof(T) == typeof(double))
{
formattter = (BindFormatter<double>)FormatDoubleValueCore;
formatter = (BindFormatter<double>)FormatDoubleValueCore;
}
else if (typeof(T) == typeof(double?))
{
formattter = (BindFormatter<double?>)FormatNullableDoubleValueCore;
formatter = (BindFormatter<double?>)FormatNullableDoubleValueCore;
}
else if (typeof(T) == typeof(decimal))
{
formattter = (BindFormatter<decimal>)FormatDecimalValueCore;
formatter = (BindFormatter<decimal>)FormatDecimalValueCore;
}
else if (typeof(T) == typeof(decimal?))
{
formattter = (BindFormatter<decimal?>)FormatNullableDecimalValueCore;
formatter = (BindFormatter<decimal?>)FormatNullableDecimalValueCore;
}
else if (typeof(T) == typeof(DateTime))
{
formattter = (BindFormatter<DateTime>)FormatDateTimeValueCore;
formatter = (BindFormatter<DateTime>)FormatDateTimeValueCore;
}
else if (typeof(T) == typeof(DateTime?))
{
formattter = (BindFormatter<DateTime?>)FormatNullableDateTimeValueCore;
formatter = (BindFormatter<DateTime?>)FormatNullableDateTimeValueCore;
}
else if (typeof(T) == typeof(DateTimeOffset))
{
formattter = (BindFormatter<DateTimeOffset>)FormatDateTimeOffsetValueCore;
formatter = (BindFormatter<DateTimeOffset>)FormatDateTimeOffsetValueCore;
}
else if (typeof(T) == typeof(DateTimeOffset?))
{
formattter = (BindFormatter<DateTimeOffset?>)FormatNullableDateTimeOffsetValueCore;
formatter = (BindFormatter<DateTimeOffset?>)FormatNullableDateTimeOffsetValueCore;
}
else if (typeof(T).IsEnum)
{
// We have to deal invoke this dynamically to work around the type constraint on Enum.TryParse.
var method = _formatEnumValue ??= typeof(BindConverter).GetMethod(nameof(FormatEnumValueCore), BindingFlags.NonPublic | BindingFlags.Static);
formattter = method.MakeGenericMethod(typeof(T)).CreateDelegate(typeof(BindFormatter<T>), target: null);
formatter = method.MakeGenericMethod(typeof(T)).CreateDelegate(typeof(BindFormatter<T>), target: null);
}
else if (Nullable.GetUnderlyingType(typeof(T)) is Type innerType && innerType.IsEnum)
{
// We have to deal invoke this dynamically to work around the type constraint on Enum.TryParse.
var method = _formatNullableEnumValue ??= typeof(BindConverter).GetMethod(nameof(FormatNullableEnumValueCore), BindingFlags.NonPublic | BindingFlags.Static);
formattter = method.MakeGenericMethod(innerType).CreateDelegate(typeof(BindFormatter<T>), target: null);
formatter = method.MakeGenericMethod(innerType).CreateDelegate(typeof(BindFormatter<T>), target: null);
}
else
{
formattter = MakeTypeConverterFormatter<T>();
formatter = MakeTypeConverterFormatter<T>();
}
_cache.TryAdd(typeof(T), formattter);
_cache.TryAdd(typeof(T), formatter);
}
return (BindFormatter<T>)formattter;
return (BindFormatter<T>)formatter;
}
private static BindFormatter<T> MakeTypeConverterFormatter<T>()

View File

@ -105,7 +105,7 @@ namespace Microsoft.AspNetCore.Components
_hasSetParametersPreviously = true;
// It's OK for the value to be null, but some "Value" param must be suppled
// It's OK for the value to be null, but some "Value" param must be supplied
// because it serves no useful purpose to have a <CascadingValue> otherwise.
if (!hasSuppliedValue)
{

View File

@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Components
// about IComponent). This gives us flexibility to change the lifecycle concepts easily,
// or for developers to design their own lifecycles as different base classes.
// TODO: When the component lifecycle design stabilises, add proper unit tests for ComponentBase.
// TODO: When the component lifecycle design stabilizes, add proper unit tests for ComponentBase.
/// <summary>
/// Optional base class for components. Alternatively, components may
@ -136,7 +136,7 @@ namespace Microsoft.AspNetCore.Components
/// </param>
/// <remarks>
/// The <see cref="OnAfterRender(bool)"/> and <see cref="OnAfterRenderAsync(bool)"/> lifecycle methods
/// are useful for performing interop, or interacting with values recieved from <c>@ref</c>.
/// are useful for performing interop, or interacting with values received from <c>@ref</c>.
/// Use the <paramref name="firstRender"/> parameter to ensure that initialization work is only performed
/// once.
/// </remarks>
@ -156,7 +156,7 @@ namespace Microsoft.AspNetCore.Components
/// <returns>A <see cref="Task"/> representing any asynchronous operation.</returns>
/// <remarks>
/// The <see cref="OnAfterRender(bool)"/> and <see cref="OnAfterRenderAsync(bool)"/> lifecycle methods
/// are useful for performing interop, or interacting with values recieved from <c>@ref</c>.
/// are useful for performing interop, or interacting with values received from <c>@ref</c>.
/// Use the <paramref name="firstRender"/> parameter to ensure that initialization work is only performed
/// once.
/// </remarks>
@ -246,7 +246,7 @@ namespace Microsoft.AspNetCore.Components
}
catch // avoiding exception filters for AOT runtime support
{
// Ignore exceptions from task cancelletions.
// Ignore exceptions from task cancellations.
// Awaiting a canceled task may produce either an OperationCanceledException (if produced as a consequence of
// CancellationToken.ThrowIfCancellationRequested()) or a TaskCanceledException (produced as a consequence of awaiting Task.FromCanceled).
// It's much easier to check the state of the Task (i.e. Task.IsCanceled) rather than catch two distinct exceptions.
@ -289,7 +289,7 @@ namespace Microsoft.AspNetCore.Components
}
catch // avoiding exception filters for AOT runtime support
{
// Ignore exceptions from task cancelletions, but don't bother issuing a state change.
// Ignore exceptions from task cancellations, but don't bother issuing a state change.
if (task.IsCanceled)
{
return;

View File

@ -12,9 +12,9 @@ namespace Microsoft.AspNetCore.Components
/// </summary>
//
// NOTE: for number parsing, the HTML5 spec dictates that <input type="number"> the DOM will represent
// number values as floating point numbers using `.` as the period separator. This is NOT culture senstive.
// number values as floating point numbers using `.` as the period separator. This is NOT culture sensitive.
// Put another way, the user might see `,` as their decimal separator, but the value available in events
// to JS code is always simpilar to what .NET parses with InvariantCulture.
// to JS code is always similar to what .NET parses with InvariantCulture.
//
// See: https://www.w3.org/TR/html5/sec-forms.html#number-state-typenumber
// See: https://www.w3.org/TR/html5/infrastructure.html#valid-floating-point-number

View File

@ -9,7 +9,7 @@
<dependency id="Microsoft.JSInterop" version="$jsInteropPackageVersion$" exclude="Build,Analyzers" />
<dependency id="System.ComponentModel.Annotations" version="$systemComponentModelAnnotationsPackageVersion$" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETCoreApp3.1">
<group targetFramework=".NETCoreApp5.0">
<dependency id="Microsoft.AspNetCore.Components.Analyzers" version="$componentAnalyzerPackageVersion$" />
<dependency id="Microsoft.AspNetCore.Authorization" version="$authorizationPackageVersion$" exclude="Build,Analyzers" />
<dependency id="Microsoft.JSInterop" version="$jsInteropPackageVersion$" exclude="Build,Analyzers" />

View File

@ -3,7 +3,7 @@
<metadata>
$CommonMetadataElements$
<dependencies>
<group targetFramework=".NETCoreApp3.1">
<group targetFramework=".NETCoreApp5.0">
<dependency id="Microsoft.AspNetCore.Components.Analyzers" version="$componentAnalyzerPackageVersion$" />
<dependency id="Microsoft.AspNetCore.Authorization" version="$authorizationPackageVersion$" exclude="Build,Analyzers" />
<dependency id="Microsoft.JSInterop" version="$jsInteropPackageVersion$" exclude="Build,Analyzers" />

View File

@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Components.Routing;
namespace Microsoft.AspNetCore.Components
{
/// <summary>
/// Provides an abstraction for querying and mananging URI navigation.
/// Provides an abstraction for querying and managing URI navigation.
/// </summary>
public abstract class NavigationManager
{
@ -134,7 +134,7 @@ namespace Microsoft.AspNetCore.Components
}
/// <summary>
/// Allows derived classes to lazyly self-initialize. Implementations that support lazy-initialization should override
/// Allows derived classes to lazily self-initialize. Implementations that support lazy-initialization should override
/// this method and call <see cref="Initialize(string, string)" />.
/// </summary>
protected virtual void EnsureInitialized()

View File

@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree
public enum RenderTreeFrameType: short
{
/// <summary>
/// Used only for unintialized frames.
/// Used only for uninitialized frames.
/// </summary>
None = 0,

View File

@ -142,7 +142,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree
// remaining work.
// During the synchronous rendering process we don't wait for the pending asynchronous
// work to finish as it will simply trigger new renders that will be handled afterwards.
// During the asynchronous rendering process we want to wait up untill al components have
// During the asynchronous rendering process we want to wait up until all components have
// finished rendering so that we can produce the complete output.
var componentState = GetRequiredComponentState(componentId);
componentState.SetDirectParameters(initialParameters);
@ -388,7 +388,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree
: null;
/// <summary>
/// Processses pending renders requests from components if there are any.
/// Processes pending renders requests from components if there are any.
/// </summary>
protected virtual void ProcessPendingRender()
{

View File

@ -242,7 +242,7 @@ namespace Microsoft.AspNetCore.Components.Rendering
AssertCanAddAttribute();
if (_lastNonAttributeFrameType == RenderTreeFrameType.Component)
{
// Since this is a component, we need to preserve the type of the EventCallabck, so we have
// Since this is a component, we need to preserve the type of the EventCallback, so we have
// to box.
Append(RenderTreeFrame.Attribute(sequence, name, (object)value));
}

View File

@ -147,20 +147,20 @@ namespace Microsoft.AspNetCore.Components.Rendering
// synchronously runs the callback
public override void Send(SendOrPostCallback d, object state)
{
Task antecedant;
Task antecedent;
var completion = new TaskCompletionSource<object>();
lock (_state.Lock)
{
antecedant = _state.Task;
antecedent = _state.Task;
_state.Task = completion.Task;
}
// We have to block. That's the contract of Send - we don't expect this to be used
// in many scenarios in Components.
//
// Using Wait here is ok because the antecedant task will never throw.
antecedant.Wait();
// Using Wait here is ok because the antecedent task will never throw.
antecedent.Wait();
ExecuteSynchronously(completion, d, state);
}
@ -195,7 +195,7 @@ namespace Microsoft.AspNetCore.Components.Rendering
ExecuteSynchronously(completion, d, state);
}
private Task Enqueue(Task antecedant, SendOrPostCallback d, object state, bool forceAsync = false)
private Task Enqueue(Task antecedent, SendOrPostCallback d, object state, bool forceAsync = false)
{
// If we get here is means that a callback is being explicitly queued. Let's instead add it to the queue and yield.
//
@ -212,7 +212,7 @@ namespace Microsoft.AspNetCore.Components.Rendering
}
var flags = forceAsync ? TaskContinuationOptions.RunContinuationsAsynchronously : TaskContinuationOptions.None;
return antecedant.ContinueWith(BackgroundWorkThunk, new WorkItem()
return antecedent.ContinueWith(BackgroundWorkThunk, new WorkItem()
{
SynchronizationContext = this,
ExecutionContext = executionContext,

View File

@ -222,7 +222,7 @@ namespace Microsoft.AspNetCore.Components.Test
// Act/Assert 2: Re-render the CascadingValue; observe nested component wasn't re-rendered
providedValue = "Updated value";
displayNestedComponent = false; // Remove the nested componet
displayNestedComponent = false; // Remove the nested component
component.TriggerRender();
// Assert: We did not render the nested component now it's been removed

View File

@ -366,7 +366,7 @@ namespace Microsoft.AspNetCore.Components
public void HasDuplicateCaptureUnmatchedValuesParameters_Throws()
{
// Arrange
var target = new HasDupliateCaptureUnmatchedValuesProperty();
var target = new HasDuplicateCaptureUnmatchedValuesProperty();
var parameters = new ParameterViewBuilder().Build();
// Act
@ -374,17 +374,17 @@ namespace Microsoft.AspNetCore.Components
// Assert
Assert.Equal(
$"Multiple properties were found on component type '{typeof(HasDupliateCaptureUnmatchedValuesProperty).FullName}' " +
$"Multiple properties were found on component type '{typeof(HasDuplicateCaptureUnmatchedValuesProperty).FullName}' " +
$"with '{nameof(ParameterAttribute)}.{nameof(ParameterAttribute.CaptureUnmatchedValues)}'. " +
$"Only a single property per type can use '{nameof(ParameterAttribute)}.{nameof(ParameterAttribute.CaptureUnmatchedValues)}'. " +
$"Properties:" + Environment.NewLine +
$"{nameof(HasDupliateCaptureUnmatchedValuesProperty.CaptureUnmatchedValuesProp1)}" + Environment.NewLine +
$"{nameof(HasDupliateCaptureUnmatchedValuesProperty.CaptureUnmatchedValuesProp2)}",
$"{nameof(HasDuplicateCaptureUnmatchedValuesProperty.CaptureUnmatchedValuesProp1)}" + Environment.NewLine +
$"{nameof(HasDuplicateCaptureUnmatchedValuesProperty.CaptureUnmatchedValuesProp2)}",
ex.Message);
}
[Fact]
public void HasCaptureUnmatchedValuesParameteterWithWrongType_Throws()
public void HasCaptureUnmatchedValuesParameterWithWrongType_Throws()
{
// Arrange
var target = new HasWrongTypeCaptureUnmatchedValuesProperty();
@ -630,7 +630,7 @@ namespace Microsoft.AspNetCore.Components
[Parameter(CaptureUnmatchedValues = true)] public IReadOnlyDictionary<string, object> CaptureUnmatchedValues { get; set; }
}
class HasDupliateCaptureUnmatchedValuesProperty
class HasDuplicateCaptureUnmatchedValuesProperty
{
[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> CaptureUnmatchedValuesProp1 { get; set; }
[Parameter(CaptureUnmatchedValues = true)] public IDictionary<string, object> CaptureUnmatchedValuesProp2 { get; set; }

View File

@ -442,7 +442,7 @@ namespace Microsoft.AspNetCore.Components.Test
[Fact]
public void HandlesKeyBeingAdded()
{
// This is an anomolous situation that can't occur with .razor components.
// This is an anomalous situation that can't occur with .razor components.
// It represents the case where, for the same sequence number, we have an
// old frame without a key and a new frame with a key.
@ -472,7 +472,7 @@ namespace Microsoft.AspNetCore.Components.Test
[Fact]
public void HandlesKeyBeingRemoved()
{
// This is an anomolous situation that can't occur with .razor components.
// This is an anomalous situation that can't occur with .razor components.
// It represents the case where, for the same sequence number, we have an
// old frame with a key and a new frame without a key.

View File

@ -3574,7 +3574,7 @@ namespace Microsoft.AspNetCore.Components.Test
// Act &A Assert
renderer.Dispose();
// All components must be disposed even if some throw as part of being diposed.
// All components must be disposed even if some throw as part of being disposed.
Assert.True(component.Disposed);
var aex = Assert.IsType<AggregateException>(Assert.Single(renderer.HandledExceptions));
Assert.Contains(exception1, aex.InnerExceptions);

View File

@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore.Components.Rendering
}
[Fact]
public void Post_RunsAynchronously_WhenNotBusy_Exception()
public void Post_RunsAsynchronously_WhenNotBusy_Exception()
{
// Arrange
var context = new RendererSynchronizationContext();

View File

@ -9,7 +9,7 @@ using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Components.Server
{
// We use a middlware so that we can use DI.
// We use a middleware so that we can use DI.
internal class CircuitDisconnectMiddleware
{
private const string CircuitIdKey = "circuitId";

View File

@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Components.Server
/// without losing any state in the event of transient connection issues.
/// </para>
/// <para>
/// This value determines the maximium number of circuit states retained by the server.
/// This value determines the maximum number of circuit states retained by the server.
/// <seealso cref="DisconnectedCircuitRetentionPeriod"/>
/// </para>
/// </summary>
@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Components.Server
/// without losing any state in the event of transient connection issues.
/// </para>
/// <para>
/// This value determines the maximium duration circuit state is retained by the server before being evicted.
/// This value determines the maximum duration circuit state is retained by the server before being evicted.
/// <seealso cref="DisconnectedCircuitMaxRetained"/>
/// </para>
/// </summary>

View File

@ -356,7 +356,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
// EndInvokeJSFromDotNet is used in a fire-and-forget context, so it's responsible for its own
// error handling.
public async Task EndInvokeJSFromDotNet(long asyncCall, bool succeded, string arguments)
public async Task EndInvokeJSFromDotNet(long asyncCall, bool succeeded, string arguments)
{
AssertInitialized();
AssertNotDisposed();
@ -365,7 +365,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
{
await Renderer.Dispatcher.InvokeAsync(() =>
{
if (!succeded)
if (!succeeded)
{
// We can log the arguments here because it is simply the JS error with the call stack.
Log.EndInvokeJSFailed(_logger, asyncCall, arguments);
@ -578,11 +578,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
private static class Log
{
private static readonly Action<ILogger, Exception> _intializationStarted;
private static readonly Action<ILogger, Exception> _intializationSucceded;
private static readonly Action<ILogger, Exception> _intializationFailed;
private static readonly Action<ILogger, Exception> _initializationStarted;
private static readonly Action<ILogger, Exception> _initializationSucceded;
private static readonly Action<ILogger, Exception> _initializationFailed;
private static readonly Action<ILogger, CircuitId, Exception> _disposeStarted;
private static readonly Action<ILogger, CircuitId, Exception> _disposeSucceded;
private static readonly Action<ILogger, CircuitId, Exception> _disposeSucceeded;
private static readonly Action<ILogger, CircuitId, Exception> _disposeFailed;
private static readonly Action<ILogger, CircuitId, Exception> _onCircuitOpened;
private static readonly Action<ILogger, CircuitId, string, Exception> _onConnectionUp;
@ -640,7 +640,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
public static readonly EventId EndInvokeJSSucceeded = new EventId(206, "EndInvokeJSSucceeded");
public static readonly EventId DispatchEventThroughJSInterop = new EventId(207, "DispatchEventThroughJSInterop");
public static readonly EventId LocationChange = new EventId(208, "LocationChange");
public static readonly EventId LocationChangeSucceded = new EventId(209, "LocationChangeSucceeded");
public static readonly EventId LocationChangeSucceeded = new EventId(209, "LocationChangeSucceeded");
public static readonly EventId LocationChangeFailed = new EventId(210, "LocationChangeFailed");
public static readonly EventId LocationChangeFailedInCircuit = new EventId(211, "LocationChangeFailedInCircuit");
public static readonly EventId OnRenderCompletedFailed = new EventId(212, "OnRenderCompletedFailed");
@ -648,17 +648,17 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
static Log()
{
_intializationStarted = LoggerMessage.Define(
_initializationStarted = LoggerMessage.Define(
LogLevel.Debug,
EventIds.InitializationStarted,
"Circuit initialization started.");
_intializationSucceded = LoggerMessage.Define(
_initializationSucceded = LoggerMessage.Define(
LogLevel.Debug,
EventIds.InitializationSucceeded,
"Circuit initialization succeeded.");
_intializationFailed = LoggerMessage.Define(
_initializationFailed = LoggerMessage.Define(
LogLevel.Debug,
EventIds.InitializationFailed,
"Circuit initialization failed.");
@ -668,10 +668,10 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
EventIds.DisposeStarted,
"Disposing circuit '{CircuitId}' started.");
_disposeSucceded = LoggerMessage.Define<CircuitId>(
_disposeSucceeded = LoggerMessage.Define<CircuitId>(
LogLevel.Debug,
EventIds.DisposeSucceeded,
"Disposing circuit '{CircuitId}' succeded.");
"Disposing circuit '{CircuitId}' succeeded.");
_disposeFailed = LoggerMessage.Define<CircuitId>(
LogLevel.Debug,
@ -726,7 +726,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
_unhandledExceptionClientDisconnected = LoggerMessage.Define<CircuitId>(
LogLevel.Debug,
EventIds.UnhandledExceptionClientDisconnected,
"An exception ocurred on the circuit host '{CircuitId}' while the client is disconnected.");
"An exception occurred on the circuit host '{CircuitId}' while the client is disconnected.");
_beginInvokeDotNetStatic = LoggerMessage.Define<string, string, string>(
LogLevel.Debug,
@ -780,8 +780,8 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
_locationChangeSucceeded = LoggerMessage.Define<string, CircuitId>(
LogLevel.Debug,
EventIds.LocationChangeSucceded,
"Location change to '{URI}' in circuit '{CircuitId}' succeded.");
EventIds.LocationChangeSucceeded,
"Location change to '{URI}' in circuit '{CircuitId}' succeeded.");
_locationChangeFailed = LoggerMessage.Define<string, CircuitId>(
LogLevel.Debug,
@ -799,11 +799,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
"Failed to complete render batch '{RenderId}' in circuit host '{CircuitId}'.");
}
public static void InitializationStarted(ILogger logger) => _intializationStarted(logger, null);
public static void InitializationSucceeded(ILogger logger) => _intializationSucceded(logger, null);
public static void InitializationFailed(ILogger logger, Exception exception) => _intializationFailed(logger, exception);
public static void InitializationStarted(ILogger logger) => _initializationStarted(logger, null);
public static void InitializationSucceeded(ILogger logger) => _initializationSucceded(logger, null);
public static void InitializationFailed(ILogger logger, Exception exception) => _initializationFailed(logger, exception);
public static void DisposeStarted(ILogger logger, CircuitId circuitId) => _disposeStarted(logger, circuitId, null);
public static void DisposeSucceeded(ILogger logger, CircuitId circuitId) => _disposeSucceded(logger, circuitId, null);
public static void DisposeSucceeded(ILogger logger, CircuitId circuitId) => _disposeSucceeded(logger, circuitId, null);
public static void DisposeFailed(ILogger logger, CircuitId circuitId, Exception exception) => _disposeFailed(logger, circuitId, exception);
public static void CircuitOpened(ILogger logger, CircuitId circuitId) => _onCircuitOpened(logger, circuitId, null);
public static void ConnectionUp(ILogger logger, CircuitId circuitId, string connectionId) => _onConnectionUp(logger, circuitId, connectionId, null);

View File

@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
/// the <see cref="CircuitClientProxy"/> to use the new client instance that attempted to reconnect to the server. Removing the entry from
/// <see cref="DisconnectedCircuits"/> should ensure we no longer have to concern ourselves with entry expiration.
///
/// Knowing when a client disconnected is not an exact science. There's a fair possiblity that a client may reconnect before the server realizes.
/// Knowing when a client disconnected is not an exact science. There's a fair possibility that a client may reconnect before the server realizes.
/// Consequently, we have to account for reconnects and disconnects occuring simultaneously as well as appearing out of order.
/// To manage this, we use a critical section to manage all state transitions.
/// </remarks>
@ -99,7 +99,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
else
{
// DisconnectCore may fail to disconnect the circuit if it was previously marked inactive or
// has been transfered to a new connection. Do not invoke the circuit handlers in this instance.
// has been transferred to a new connection. Do not invoke the circuit handlers in this instance.
// We have to do in this instance.
return Task.CompletedTask;
@ -181,7 +181,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
{
// Transition the host from disconnected to connected if it's available. In this critical section, we return
// an existing host if it's currently considered connected or transition a disconnected host to connected.
// Transfering also wires up the client to the new set.
// Transferring also wires up the client to the new set.
(circuitHost, previouslyConnected) = ConnectCore(circuitId, clientProxy, connectionId);
if (circuitHost == null)
@ -428,7 +428,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
_connectingToDisconnectedCircuit = LoggerMessage.Define<CircuitId, string>(
LogLevel.Debug,
EventIds.ConnectingToDisconnectedCircuit,
"Transfering disconnected circuit {CircuitId} to connection {ConnectionId}.");
"Transferring disconnected circuit {CircuitId} to connection {ConnectionId}.");
_failedToReconnectToCircuit = LoggerMessage.Define<CircuitId>(
LogLevel.Debug,

View File

@ -90,14 +90,14 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
// as we have a client that is not acknowledging render batches fast enough (something we consider needs
// to be fast).
// The result is something as follows:
// Lets imagine an extreme case where the server produces a new batch every milisecond.
// Lets say the client is able to ACK a batch every 100 miliseconds.
// Lets imagine an extreme case where the server produces a new batch every millisecond.
// Lets say the client is able to ACK a batch every 100 milliseconds.
// When the app starts the client might see the sequence 0->(MaxUnacknowledgedRenderBatches-1) and then
// after 100 miliseconds it sees it jump to 1xx, then to 2xx where xx is something between {0..99} the
// after 100 milliseconds it sees it jump to 1xx, then to 2xx where xx is something between {0..99} the
// reason for this is that the server slows down rendering new batches to as fast as the client can consume
// them.
// Similarly, if a client were to send events at a faster pace than the server can consume them, the server
// would still proces the events, but would not produce new renders until it gets an ack that frees up space
// would still process the events, but would not produce new renders until it gets an ack that frees up space
// for a new render.
// We should never see UnacknowledgedRenderBatches.Count > _options.MaxBufferedUnacknowledgedRenderBatches
@ -202,7 +202,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
{
// Send the render batch to the client
// If the "send" operation fails (synchronously or asynchronously) or the client
// gets disconected simply give up. This likely means that
// gets disconnected simply give up. This likely means that
// the circuit went offline while sending the data, so simply wait until the
// client reconnects back or the circuit gets evicted because it stayed
// disconnected for too long.
@ -247,7 +247,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
// from the client that it has received and successfully applied all batches up to that point).
// If receive an ack for a previously acknowledged batch, its an error, as the messages are
// guranteed to be delivered in order, so a message for a render batch of 2 will never arrive
// guaranteed to be delivered in order, so a message for a render batch of 2 will never arrive
// after a message for a render batch for 3.
// If that were to be the case, it would just be enough to relax the checks here and simply skip
// the message.
@ -282,7 +282,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
if (lastBatchId < incomingBatchId)
{
// This exception is due to a bad client input, so we mark it as such to prevent loging it as a warning and
// This exception is due to a bad client input, so we mark it as such to prevent logging it as a warning and
// flooding the logs with warnings.
throw new InvalidOperationException($"Received an acknowledgement for batch with id '{incomingBatchId}' when the last batch produced was '{lastBatchId}'.");
}

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
}
[Fact]
public void CreateCircuitId_Generates_GeneratesDifferentIds_ForSuccesiveCalls()
public void CreateCircuitId_Generates_GeneratesDifferentIds_ForSuccessiveCalls()
{
// Arrange
var factory = TestCircuitIdFactory.CreateTestFactory();

View File

@ -179,7 +179,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering
// Assert
Assert.Equal(new long[] { 2, 3, 4 }, renderIds);
Assert.True(task.Wait(3000), "One or more render batches werent acknowledged");
Assert.True(task.Wait(3000), "One or more render batches weren't acknowledged");
await task;
}
@ -233,7 +233,7 @@ namespace Microsoft.AspNetCore.Components.Web.Rendering
exceptions.Add(e);
};
// Receive the ack for the intial batch
// Receive the ack for the initial batch
_ = renderer.OnRenderCompletedAsync(2, null);
// Receive the ack for the second batch
_ = renderer.OnRenderCompletedAsync(3, null);

View File

@ -66,9 +66,9 @@ namespace Microsoft.AspNetCore.Components.Server.Tests
services.AddServerSideBlazor();
services.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build());
var serviceProvder = services.BuildServiceProvider();
var serviceProvider = services.BuildServiceProvider();
return new ApplicationBuilder(serviceProvder);
return new ApplicationBuilder(serviceProvider);
}
private class MyComponent : IComponent

View File

@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.Components
}
else
{
throw new JsonException($"Unexcepted JSON Token {reader.TokenType}.");
throw new JsonException($"Unexpected JSON Token {reader.TokenType}.");
}
}
@ -49,4 +49,4 @@ namespace Microsoft.AspNetCore.Components
writer.WriteEndObject();
}
}
}
}

View File

@ -6,6 +6,11 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<BuildOutputFiles Include="dist\release\blazor.server.js" />
<BuildOutputFiles Include="dist\release\blazor.webassembly.js" />
</ItemGroup>
<ItemGroup>
<ProjectReference
Include="..\..\SignalR\clients\ts\signalr\signalr.npmproj"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.Components.Forms
}
/// <summary>
/// Formats the value as a string. Derived classes can override this to determine the formating used for <c>CurrentValueAsString</c>.
/// Formats the value as a string. Derived classes can override this to determine the formatting used for <c>CurrentValueAsString</c>.
/// </summary>
/// <param name="value">The value to format.</param>
/// <returns>A string representation of the value.</returns>

View File

@ -212,7 +212,7 @@ namespace Microsoft.AspNetCore.Components.Forms
};
var fieldIdentifier = FieldIdentifier.Create(() => model.StringProperty);
// Act/Assert: Initally, it's valid and unmodified
// Act/Assert: Initially, it's valid and unmodified
var inputComponent = await RenderAndGetTestInputComponentAsync(rootComponent);
Assert.Equal("valid", inputComponent.CssClass); // no Class was specified

View File

@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests
[Theory]
[InlineData("en-US")]
[InlineData("fr-FR")]
public void CanSetCultureAndParseCultueSensitiveNumbersAndDates(string culture)
public void CanSetCultureAndParseCultureSensitiveNumbersAndDates(string culture)
{
var cultureInfo = CultureInfo.GetCultureInfo(culture);
SetCulture(culture);

View File

@ -626,7 +626,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
Browser.Exists(incompleteItemsSelector);
// Mark first item as done; observe the remaining incomplete item appears unchecked
// because the diff algoritm explicitly unchecks it
// because the diff algorithm explicitly unchecks it
appElement.FindElement(By.CssSelector(".incomplete-items .item-isdone")).Click();
Browser.True(() =>
{
@ -636,7 +636,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
});
// Mark first done item as not done; observe the remaining complete item appears checked
// because the diff algoritm explicitly re-checks it
// because the diff algorithm explicitly re-checks it
appElement.FindElement(By.CssSelector(".complete-items .item-isdone")).Click();
Browser.True(() =>
{

View File

@ -18,7 +18,7 @@
<p id="errormessage-failure">Error = @errorFailure</p>
<button id="triggerjsinterop-malformed" @onclick="@TriggerJSInterop">Trigger malformed JS interop callback</button>
<button id="triggerjsinterop-success" @onclick="@TriggerJSInteropSuccess">Trigger successfull JS interop callback</button>
<button id="triggerjsinterop-success" @onclick="@TriggerJSInteropSuccess">Trigger successful JS interop callback</button>
<button id="triggerjsinterop-failure" @onclick="@TriggerJSInteropFailure">Trigger error JS interop callback</button>
<button id="event-handler-throw-sync" @onclick="@TriggerSyncException">Trigger sync exception</button>

View File

@ -15,7 +15,7 @@
<Reference Include="Microsoft.Azure.Storage.Blob" />
</ItemGroup>
<ItemGroup Condition="'$(AspNetCoreMajorMinorVersion)' == '3.1'">
<ItemGroup Condition="'$(AspNetCoreMajorMinorVersion)' == '5.0'">
<!-- This dependency was replaced by Microsoft.Azure.Storage.Blob between 3.0 and 2.2. This suppression can be removed after 3.0 is complete. -->
<SuppressBaselineReference Include="WindowsAzure.Storage" />
<Reference Include="Microsoft.Data.OData" />

View File

@ -1,13 +1,13 @@
<!-- This file is automatically generated. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Compile Include="Microsoft.AspNetCore.Cryptography.KeyDerivation.netstandard2.0.cs" />
<Reference Include="Microsoft.AspNetCore.Cryptography.Internal" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
<Compile Include="Microsoft.AspNetCore.Cryptography.KeyDerivation.netcoreapp.cs" />
<Reference Include="Microsoft.AspNetCore.Cryptography.Internal" />
</ItemGroup>

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<Description>ASP.NET Core utilities for key derivation.</Description>
<TargetFrameworks>netstandard2.0;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<IsShippingPackage>true</IsShippingPackage>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if NETCOREAPP2_0
#if NETCOREAPP
using System;
using System.Diagnostics;
using System.Security.Cryptography;

View File

@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Cryptography.KeyDerivation.PBKDF2
{
#if NETSTANDARD2_0
return new ManagedPbkdf2Provider();
#elif NETCOREAPP2_0
#elif NETCOREAPP
// fastest implementation on .NET Core for Linux/macOS.
// Not supported on .NET Framework
return new NetCorePbkdf2Provider();

View File

@ -31,10 +31,10 @@ namespace Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption
/// This method allows for a slight performance improvement over IAuthenticatedEncryptor.Encrypt
/// in the case where the caller needs to prepend or append some data to the resulting ciphertext.
/// For instance, if the caller needs to append a 32-bit header to the resulting ciphertext, then
/// he can specify 4 for 'preBufferSize' and overwrite the first 32 bits of the buffer returned
/// specify 4 for 'preBufferSize' and overwrite the first 32 bits of the buffer returned
/// by this function. This saves the caller from having to allocate a new buffer to hold the final
/// transformed result.
///
///
/// All cryptography-related exceptions should be homogenized to CryptographicException.
/// </remarks>
byte[] Encrypt(ArraySegment<byte> plaintext, ArraySegment<byte> additionalAuthenticatedData, uint preBufferSize, uint postBufferSize);

View File

@ -15,14 +15,14 @@ namespace Microsoft.AspNetCore.DataProtection
/// <remarks>
/// <para>
/// If the developer changes the at-rest key protection mechanism, it is intended that
/// he also change the key storage location, and vice versa. For instance, a call to
/// they also change the key storage location, and vice versa. For instance, a call to
/// <see cref="DataProtectionBuilderExtensions.ProtectKeysWithCertificate(IDataProtectionBuilder,string)" /> should generally be accompanied by
/// a call to <see cref="DataProtectionBuilderExtensions.PersistKeysToFileSystem(IDataProtectionBuilder,DirectoryInfo)"/>, or exceptions may
/// occur at runtime due to the data protection system not knowing where to persist keys.
/// </para>
/// <para>
/// Similarly, when a developer modifies the default protected payload cryptographic
/// algorithms, it is intended that he also select an explitiy key storage location.
/// algorithms, they should also set an explicit key storage location.
/// A call to <see cref="DataProtectionBuilderExtensions.UseCryptographicAlgorithms(IDataProtectionBuilder,AuthenticatedEncryptorConfiguration)"/>
/// should therefore generally be paired with a call to <see cref="DataProtectionBuilderExtensions.PersistKeysToFileSystem(IDataProtectionBuilder,DirectoryInfo)"/>,
/// for example.
@ -40,4 +40,4 @@ namespace Microsoft.AspNetCore.DataProtection
/// </summary>
IServiceCollection Services { get; }
}
}
}

View File

@ -253,7 +253,7 @@ namespace Microsoft.AspNetCore.DataProtection.KeyManagement
}
}
// Do we need to notify the caller that he should reprotect the data?
// Do we need to notify the caller that they should reprotect the data?
status = UnprotectStatus.Ok;
if (keyIdFromPayload != currentKeyRing.DefaultKeyId)
{

View File

@ -226,9 +226,9 @@ namespace Microsoft.AspNetCore.DataProtection.KeyManagement
Volatile.Write(ref _cacheableKeyRing, existingCacheableKeyRing.WithTemporaryExtendedLifetime(utcNow));
}
// The immediate caller should fail so that he can report the error up his chain. This makes it more likely
// The immediate caller should fail so that they can report the error up the chain. This makes it more likely
// that an administrator can see the error and react to it as appropriate. The caller can retry the operation
// and will probably have success as long as he falls within the temporary extension mentioned above.
// and will probably have success as long as they fall within the temporary extension mentioned above.
throw;
}

View File

@ -1,7 +1,7 @@
DataProtection
==============
Data Protection APIs for protecting and unprotecting data. You can find documentation for Data Protection in the [ASP.NET Core Documentation](https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/).
Data Protection APIs for protecting and unprotecting data. You can find documentation for Data Protection in the [ASP.NET Core Documentation](https://docs.microsoft.com/aspnet/core/security/data-protection/).
## Community Maintained Data Protection Providers & Projects

View File

@ -158,7 +158,7 @@ namespace Microsoft.AspNetCore.Tests
var applicationName = "CreateDefaultBuilderApp";
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
{
TargetFramework = "netcoreapp3.1",
TargetFramework = "netcoreapp5.0",
HostingModel = HostingModel.InProcess
};
@ -213,7 +213,7 @@ namespace Microsoft.AspNetCore.Tests
{
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
{
TargetFramework = "netcoreapp3.1",
TargetFramework = "netcoreapp5.0",
};
if (setTestEnvVars)

View File

@ -0,0 +1,48 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.JsonPatch", "src\Microsoft.AspNetCore.JsonPatch.csproj", "{B2094419-9ED4-4733-B15D-60314118B61C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.JsonPatch.Tests", "test\Microsoft.AspNetCore.JsonPatch.Tests.csproj", "{4F34177F-6E1E-4880-A2CA-0511EFEDB395}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B2094419-9ED4-4733-B15D-60314118B61C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Debug|x64.ActiveCfg = Debug|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Debug|x64.Build.0 = Debug|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Debug|x86.ActiveCfg = Debug|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Debug|x86.Build.0 = Debug|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Release|Any CPU.Build.0 = Release|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Release|x64.ActiveCfg = Release|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Release|x64.Build.0 = Release|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Release|x86.ActiveCfg = Release|Any CPU
{B2094419-9ED4-4733-B15D-60314118B61C}.Release|x86.Build.0 = Release|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Debug|x64.ActiveCfg = Debug|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Debug|x64.Build.0 = Debug|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Debug|x86.ActiveCfg = Debug|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Debug|x86.Build.0 = Debug|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Release|Any CPU.Build.0 = Release|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Release|x64.ActiveCfg = Release|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Release|x64.Build.0 = Release|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Release|x86.ActiveCfg = Release|Any CPU
{4F34177F-6E1E-4880-A2CA-0511EFEDB395}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -201,6 +201,16 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal
bool TryTest(object target, string segment, Newtonsoft.Json.Serialization.IContractResolver contractResolver, object value, out string errorMessage);
bool TryTraverse(object target, string segment, Newtonsoft.Json.Serialization.IContractResolver contractResolver, out object nextTarget, out string errorMessage);
}
public partial class JObjectAdapter : Microsoft.AspNetCore.JsonPatch.Internal.IAdapter
{
public JObjectAdapter() { }
public virtual bool TryAdd(object target, string segment, Newtonsoft.Json.Serialization.IContractResolver contractResolver, object value, out string errorMessage) { throw null; }
public virtual bool TryGet(object target, string segment, Newtonsoft.Json.Serialization.IContractResolver contractResolver, out object value, out string errorMessage) { throw null; }
public virtual bool TryRemove(object target, string segment, Newtonsoft.Json.Serialization.IContractResolver contractResolver, out string errorMessage) { throw null; }
public virtual bool TryReplace(object target, string segment, Newtonsoft.Json.Serialization.IContractResolver contractResolver, object value, out string errorMessage) { throw null; }
public virtual bool TryTest(object target, string segment, Newtonsoft.Json.Serialization.IContractResolver contractResolver, object value, out string errorMessage) { throw null; }
public virtual bool TryTraverse(object target, string segment, Newtonsoft.Json.Serialization.IContractResolver contractResolver, out object nextTarget, out string errorMessage) { throw null; }
}
public partial class ListAdapter : Microsoft.AspNetCore.JsonPatch.Internal.IAdapter
{
public ListAdapter() { }

View File

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.JsonPatch.Internal;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections;
@ -29,6 +30,10 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
var jsonContract = contractResolver.ResolveContract(target.GetType());
if (target is JObject)
{
return new JObjectAdapter();
}
if (target is IList)
{
return new ListAdapter();

View File

@ -7,18 +7,18 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
{
/// <summary>
/// Defines the operations that can be performed on a JSON patch document.
/// </summary>
/// </summary>
public interface IObjectAdapter
{
/// <summary>
/// Using the "add" operation a new value is inserted into the root of the target
/// document, into the target array at the specified valid index, or to a target object at
/// the specified location.
///
/// When adding to arrays, the specified index MUST NOT be greater than the number of elements in the array.
///
/// When adding to arrays, the specified index MUST NOT be greater than the number of elements in the array.
/// To append the value to the array, the index of "-" character is used (see [RFC6901]).
///
/// When adding to an object, if an object member does not already exist, a new member is added to the object at the
///
/// When adding to an object, if an object member does not already exist, a new member is added to the object at the
/// specified location or if an object member does exist, that member's value is replaced.
///
/// The operation object MUST contain a "value" member whose content
@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
/// For example:
///
/// { "op": "copy", "from": "/a/b/c", "path": "/a/b/e" }
///
///
/// See RFC 6902 https://tools.ietf.org/html/rfc6902#page-7
/// </summary>
/// <param name="operation">The copy operation.</param>
@ -67,7 +67,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
/// { "op": "move", "from": "/a/b/c", "path": "/a/b/d" }
///
/// A location cannot be moved into one of its children.
///
///
/// See RFC 6902 https://tools.ietf.org/html/rfc6902#page-6
/// </summary>
/// <param name="operation">The move operation.</param>
@ -85,7 +85,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
///
/// If removing an element from an array, any elements above the
/// specified index are shifted one position to the left.
///
///
/// See RFC 6902 https://tools.ietf.org/html/rfc6902#page-6
/// </summary>
/// <param name="operation">The remove operation.</param>
@ -93,7 +93,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
void Remove(Operation operation, object objectToApplyTo);
/// <summary>
/// Using the "replace" operation he value at the target location is replaced
/// Using the "replace" operation the value at the target location is replaced
/// with a new value. The operation object MUST contain a "value" member
/// which specifies the replacement value.
///
@ -102,7 +102,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
/// For example:
///
/// { "op": "replace", "path": "/a/b/c", "value": 42 }
///
///
/// See RFC 6902 https://tools.ietf.org/html/rfc6902#page-6
/// </summary>
/// <param name="operation">The replace operation.</param>

View File

@ -0,0 +1,140 @@
using Microsoft.AspNetCore.JsonPatch.Internal;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
namespace Microsoft.AspNetCore.JsonPatch.Internal
{
public class JObjectAdapter : IAdapter
{
public virtual bool TryAdd(
object target,
string segment,
IContractResolver contractResolver,
object value,
out string errorMessage)
{
var obj = (JObject) target;
obj[segment] = JToken.FromObject(value);
errorMessage = null;
return true;
}
public virtual bool TryGet(
object target,
string segment,
IContractResolver contractResolver,
out object value,
out string errorMessage)
{
var obj = (JObject) target;
if (!obj.ContainsKey(segment))
{
value = null;
errorMessage = Resources.FormatTargetLocationAtPathSegmentNotFound(segment);
return false;
}
value = obj[segment];
errorMessage = null;
return true;
}
public virtual bool TryRemove(
object target,
string segment,
IContractResolver contractResolver,
out string errorMessage)
{
var obj = (JObject) target;
if (!obj.ContainsKey(segment))
{
errorMessage = Resources.FormatTargetLocationAtPathSegmentNotFound(segment);
return false;
}
obj.Remove(segment);
errorMessage = null;
return true;
}
public virtual bool TryReplace(
object target,
string segment,
IContractResolver contractResolver,
object value,
out string errorMessage)
{
var obj = (JObject) target;
if (!obj.ContainsKey(segment))
{
errorMessage = Resources.FormatTargetLocationAtPathSegmentNotFound(segment);
return false;
}
obj[segment] = JToken.FromObject(value);
errorMessage = null;
return true;
}
public virtual bool TryTest(
object target,
string segment,
IContractResolver contractResolver,
object value,
out string errorMessage)
{
var obj = (JObject) target;
if (!obj.ContainsKey(segment))
{
errorMessage = Resources.FormatTargetLocationAtPathSegmentNotFound(segment);
return false;
}
var currentValue = obj[segment];
if (currentValue == null || string.IsNullOrEmpty(currentValue.ToString()))
{
errorMessage = Resources.FormatValueForTargetSegmentCannotBeNullOrEmpty(segment);
return false;
}
if (!JToken.DeepEquals(JsonConvert.SerializeObject(currentValue), JsonConvert.SerializeObject(value)))
{
errorMessage = Resources.FormatValueNotEqualToTestValue(currentValue, value, segment);
return false;
}
errorMessage = null;
return true;
}
public virtual bool TryTraverse(
object target,
string segment,
IContractResolver contractResolver,
out object nextTarget,
out string errorMessage)
{
var obj = (JObject) target;
if (!obj.ContainsKey(segment))
{
nextTarget = null;
errorMessage = null;
return false;
}
nextTarget = obj[segment];
errorMessage = null;
return true;
}
}
}

View File

@ -0,0 +1,144 @@
// 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.Collections.Generic;
using System.Dynamic;
using Microsoft.AspNetCore.JsonPatch.Exceptions;
using Microsoft.AspNetCore.JsonPatch.Operations;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Xunit;
namespace Microsoft.AspNetCore.JsonPatch
{
public class JsonPatchDocumentJObjectTest
{
[Fact]
public void ApplyTo_Array_Add()
{
// Arrange
var model = new ObjectWithJObject{ CustomData = JObject.FromObject(new { Emails = new[] { "foo@bar.com" } })};
var patch = new JsonPatchDocument<ObjectWithJObject>();
patch.Operations.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Emails/-", null, "foo@baz.com"));
// Act
patch.ApplyTo(model);
// Assert
Assert.Equal("foo@baz.com", model.CustomData["Emails"][1].Value<string>());
}
[Fact]
public void ApplyTo_Model_Test1()
{
// Arrange
var model = new ObjectWithJObject{ CustomData = JObject.FromObject(new { Email = "foo@bar.com", Name = "Bar" })};
var patch = new JsonPatchDocument<ObjectWithJObject>();
patch.Operations.Add(new Operation<ObjectWithJObject>("test", "/CustomData/Email", null, "foo@baz.com"));
patch.Operations.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, "Bar Baz"));
// Act & Assert
Assert.Throws<JsonPatchException>(() => patch.ApplyTo(model));
}
[Fact]
public void ApplyTo_Model_Test2()
{
// Arrange
var model = new ObjectWithJObject{ CustomData = JObject.FromObject(new { Email = "foo@bar.com", Name = "Bar" })};
var patch = new JsonPatchDocument<ObjectWithJObject>();
patch.Operations.Add(new Operation<ObjectWithJObject>("test", "/CustomData/Email", null, "foo@bar.com"));
patch.Operations.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, "Bar Baz"));
// Act
patch.ApplyTo(model);
// Assert
Assert.Equal("Bar Baz", model.CustomData["Name"].Value<string>());
}
[Fact]
public void ApplyTo_Model_Copy()
{
// Arrange
var model = new ObjectWithJObject{ CustomData = JObject.FromObject(new { Email = "foo@bar.com" })};
var patch = new JsonPatchDocument<ObjectWithJObject>();
patch.Operations.Add(new Operation<ObjectWithJObject>("copy", "/CustomData/UserName", "/CustomData/Email"));
// Act
patch.ApplyTo(model);
// Assert
Assert.Equal("foo@bar.com", model.CustomData["UserName"].Value<string>());
}
[Fact]
public void ApplyTo_Model_Remove()
{
// Arrange
var model = new ObjectWithJObject{ CustomData = JObject.FromObject(new { FirstName = "Foo", LastName = "Bar" })};
var patch = new JsonPatchDocument<ObjectWithJObject>();
patch.Operations.Add(new Operation<ObjectWithJObject>("remove", "/CustomData/LastName", null));
// Act
patch.ApplyTo(model);
// Assert
Assert.False(model.CustomData.ContainsKey("LastName"));
}
[Fact]
public void ApplyTo_Model_Move()
{
// Arrange
var model = new ObjectWithJObject{ CustomData = JObject.FromObject(new { FirstName = "Bar" })};
var patch = new JsonPatchDocument<ObjectWithJObject>();
patch.Operations.Add(new Operation<ObjectWithJObject>("move", "/CustomData/LastName", "/CustomData/FirstName"));
// Act
patch.ApplyTo(model);
// Assert
Assert.False(model.CustomData.ContainsKey("FirstName"));
Assert.Equal("Bar", model.CustomData["LastName"].Value<string>());
}
[Fact]
public void ApplyTo_Model_Add()
{
// Arrange
var model = new ObjectWithJObject();
var patch = new JsonPatchDocument<ObjectWithJObject>();
patch.Operations.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, "Foo"));
// Act
patch.ApplyTo(model);
// Assert
Assert.Equal("Foo", model.CustomData["Name"].Value<string>());
}
[Fact]
public void ApplyTo_Model_Replace()
{
// Arrange
var model = new ObjectWithJObject{ CustomData = JObject.FromObject(new { Email = "foo@bar.com", Name = "Bar" })};
var patch = new JsonPatchDocument<ObjectWithJObject>();
patch.Operations.Add(new Operation<ObjectWithJObject>("replace", "/CustomData/Email", null, "foo@baz.com"));
// Act
patch.ApplyTo(model);
// Assert
Assert.Equal("foo@baz.com", model.CustomData["Email"].Value<string>());
}
}
}

View File

@ -0,0 +1,9 @@
using Newtonsoft.Json.Linq;
namespace Microsoft.AspNetCore.JsonPatch
{
public class ObjectWithJObject
{
public JObject CustomData { get; set; } = new JObject();
}
}

View File

@ -173,6 +173,7 @@ namespace Microsoft.AspNetCore.Hosting
{
var exceptionDetailProvider = new ExceptionDetailsProvider(
HostingEnvironment.ContentRootFileProvider,
Logger,
sourceCodeLineCount: 6);
model.ErrorDetails = exceptionDetailProvider.GetDetails(exception);

View File

@ -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)

View File

@ -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
{
@ -114,6 +122,7 @@ namespace Microsoft.AspNetCore.Hosting
public HttpContext HttpContext { get; set; }
public IDisposable Scope { get; set; }
public Activity Activity { get; set; }
internal HostingRequestStartingLog StartLog { get; set; }
public long StartTimestamp { get; set; }
internal bool HasDiagnosticListener { get; set; }
@ -125,6 +134,7 @@ namespace Microsoft.AspNetCore.Hosting
Scope = null;
Activity = null;
StartLog = null;
StartTimestamp = 0;
HasDiagnosticListener = false;

View File

@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Hosting
}
// Non-inline
LogRequestStarting(httpContext);
LogRequestStarting(context);
}
}
context.StartTimestamp = startTimestamp;
@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Hosting
{
currentTimestamp = Stopwatch.GetTimestamp();
// Non-inline
LogRequestFinished(httpContext, startTimestamp, currentTimestamp);
LogRequestFinished(context, startTimestamp, currentTimestamp);
}
if (_diagnosticListener.IsEnabled())
@ -167,30 +167,34 @@ namespace Microsoft.AspNetCore.Hosting
}
[MethodImpl(MethodImplOptions.NoInlining)]
private void LogRequestStarting(HttpContext httpContext)
private void LogRequestStarting(HostingApplication.Context context)
{
// IsEnabled is checked in the caller, so if we are here just log
var startLog = new HostingRequestStartingLog(context.HttpContext);
context.StartLog = startLog;
_logger.Log(
logLevel: LogLevel.Information,
eventId: LoggerEventIds.RequestStarting,
state: new HostingRequestStartingLog(httpContext),
state: startLog,
exception: null,
formatter: HostingRequestStartingLog.Callback);
}
[MethodImpl(MethodImplOptions.NoInlining)]
private void LogRequestFinished(HttpContext httpContext, long startTimestamp, long currentTimestamp)
private void LogRequestFinished(HostingApplication.Context context, long startTimestamp, long currentTimestamp)
{
// IsEnabled isn't checked in the caller, startTimestamp > 0 is used as a fast proxy check
// but that may be because diagnostics are enabled, which also uses startTimestamp, so check here
if (_logger.IsEnabled(LogLevel.Information))
// but that may be because diagnostics are enabled, which also uses startTimestamp,
// so check if we logged the start event
if (context.StartLog != null)
{
var elapsed = new TimeSpan((long)(TimestampToTicks * (currentTimestamp - startTimestamp)));
_logger.Log(
logLevel: LogLevel.Information,
eventId: LoggerEventIds.RequestFinished,
state: new HostingRequestFinishedLog(httpContext, elapsed),
state: new HostingRequestFinishedLog(context, elapsed),
exception: null,
formatter: HostingRequestFinishedLog.Callback);
}

View File

@ -9,51 +9,56 @@ using Microsoft.AspNetCore.Http;
namespace Microsoft.AspNetCore.Hosting
{
using static HostingRequestStartingLog;
internal class HostingRequestFinishedLog : IReadOnlyList<KeyValuePair<string, object>>
{
internal static readonly Func<object, Exception, string> Callback = (state, exception) => ((HostingRequestFinishedLog)state).ToString();
private readonly HttpContext _httpContext;
private readonly TimeSpan _elapsed;
private readonly HostingApplication.Context _context;
private string _cachedToString;
public TimeSpan Elapsed { get; }
public int Count => 3;
public int Count => 11;
public KeyValuePair<string, object> this[int index]
{
get
{
switch (index)
var request = _context.HttpContext.Request;
var response = _context.HttpContext.Response;
return index switch
{
case 0:
return new KeyValuePair<string, object>("ElapsedMilliseconds", _elapsed.TotalMilliseconds);
case 1:
return new KeyValuePair<string, object>("StatusCode", _httpContext.Response.StatusCode);
case 2:
return new KeyValuePair<string, object>("ContentType", _httpContext.Response.ContentType);
default:
throw new IndexOutOfRangeException(nameof(index));
}
0 => new KeyValuePair<string, object>("ElapsedMilliseconds", Elapsed.TotalMilliseconds),
1 => new KeyValuePair<string, object>(nameof(response.StatusCode), response.StatusCode),
2 => new KeyValuePair<string, object>(nameof(response.ContentType), response.ContentType),
3 => new KeyValuePair<string, object>(nameof(response.ContentLength), response.ContentLength),
4 => new KeyValuePair<string, object>(nameof(request.Protocol), request.Protocol),
5 => new KeyValuePair<string, object>(nameof(request.Method), request.Method),
6 => new KeyValuePair<string, object>(nameof(request.Scheme), request.Scheme),
7 => new KeyValuePair<string, object>(nameof(request.Host), request.Host.Value),
8 => new KeyValuePair<string, object>(nameof(request.PathBase), request.PathBase.Value),
9 => new KeyValuePair<string, object>(nameof(request.Path), request.Path.Value),
10 => new KeyValuePair<string, object>(nameof(request.QueryString), request.QueryString.Value),
_ => throw new IndexOutOfRangeException(nameof(index)),
};
}
}
public HostingRequestFinishedLog(HttpContext httpContext, TimeSpan elapsed)
public HostingRequestFinishedLog(HostingApplication.Context context, TimeSpan elapsed)
{
_httpContext = httpContext;
_elapsed = elapsed;
_context = context;
Elapsed = elapsed;
}
public override string ToString()
{
if (_cachedToString == null)
{
_cachedToString = string.Format(
CultureInfo.InvariantCulture,
"Request finished in {0}ms {1} {2}",
_elapsed.TotalMilliseconds,
_httpContext.Response.StatusCode,
_httpContext.Response.ContentType);
var response = _context.HttpContext.Response;
_cachedToString = $"Request finished {_context.StartLog.ToStringWithoutPreamble()} - {response.StatusCode.ToString(CultureInfo.InvariantCulture)} {ValueOrEmptyMarker(response.ContentLength)} {EscapedValueOrEmptyMarker(response.ContentType)} {Elapsed.TotalMilliseconds.ToString("0.0000", CultureInfo.InvariantCulture)}ms";
}
return _cachedToString;

View File

@ -5,12 +5,16 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Net;
using Microsoft.AspNetCore.Http;
namespace Microsoft.AspNetCore.Hosting
{
internal class HostingRequestStartingLog : IReadOnlyList<KeyValuePair<string, object>>
{
private const string LogPreamble = "Request starting ";
private const string EmptyEntry = "-";
internal static readonly Func<object, Exception, string> Callback = (state, exception) => ((HostingRequestStartingLog)state).ToString();
private readonly HttpRequest _request;
@ -19,35 +23,19 @@ namespace Microsoft.AspNetCore.Hosting
public int Count => 9;
public KeyValuePair<string, object> this[int index]
public KeyValuePair<string, object> this[int index] => index switch
{
get
{
switch (index)
{
case 0:
return new KeyValuePair<string, object>("Protocol", _request.Protocol);
case 1:
return new KeyValuePair<string, object>("Method", _request.Method);
case 2:
return new KeyValuePair<string, object>("ContentType", _request.ContentType);
case 3:
return new KeyValuePair<string, object>("ContentLength", _request.ContentLength);
case 4:
return new KeyValuePair<string, object>("Scheme", _request.Scheme);
case 5:
return new KeyValuePair<string, object>("Host", _request.Host.ToString());
case 6:
return new KeyValuePair<string, object>("PathBase", _request.PathBase.ToString());
case 7:
return new KeyValuePair<string, object>("Path", _request.Path.ToString());
case 8:
return new KeyValuePair<string, object>("QueryString", _request.QueryString.ToString());
default:
throw new IndexOutOfRangeException(nameof(index));
}
}
}
0 => new KeyValuePair<string, object>(nameof(_request.Protocol), _request.Protocol),
1 => new KeyValuePair<string, object>(nameof(_request.Method), _request.Method),
2 => new KeyValuePair<string, object>(nameof(_request.ContentType), _request.ContentType),
3 => new KeyValuePair<string, object>(nameof(_request.ContentLength), _request.ContentLength),
4 => new KeyValuePair<string, object>(nameof(_request.Scheme), _request.Scheme),
5 => new KeyValuePair<string, object>(nameof(_request.Host), _request.Host.Value),
6 => new KeyValuePair<string, object>(nameof(_request.PathBase), _request.PathBase.Value),
7 => new KeyValuePair<string, object>(nameof(_request.Path), _request.Path.Value),
8 => new KeyValuePair<string, object>(nameof(_request.QueryString), _request.QueryString.Value),
_ => throw new IndexOutOfRangeException(nameof(index)),
};
public HostingRequestStartingLog(HttpContext httpContext)
{
@ -58,18 +46,8 @@ namespace Microsoft.AspNetCore.Hosting
{
if (_cachedToString == null)
{
_cachedToString = string.Format(
CultureInfo.InvariantCulture,
"Request starting {0} {1} {2}://{3}{4}{5}{6} {7} {8}",
_request.Protocol,
_request.Method,
_request.Scheme,
_request.Host.Value,
_request.PathBase.Value,
_request.Path.Value,
_request.QueryString.Value,
_request.ContentType,
_request.ContentLength);
var request = _request;
_cachedToString = $"{LogPreamble}{request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} {EscapedValueOrEmptyMarker(request.ContentType)} {ValueOrEmptyMarker(request.ContentLength)}"; ;
}
return _cachedToString;
@ -87,5 +65,15 @@ namespace Microsoft.AspNetCore.Hosting
{
return GetEnumerator();
}
internal string ToStringWithoutPreamble()
=> ToString().Substring(LogPreamble.Length);
internal static string EscapedValueOrEmptyMarker(string potentialValue)
// Encode space as +
=> potentialValue?.Length > 0 ? potentialValue.Replace(' ', '+') : EmptyEntry;
internal static string ValueOrEmptyMarker<T>(T? potentialValue) where T : struct, IFormattable
=> potentialValue?.ToString(null, CultureInfo.InvariantCulture) ?? EmptyEntry;
}
}

View File

@ -270,6 +270,7 @@ namespace Microsoft.AspNetCore.Hosting
{
var exceptionDetailProvider = new ExceptionDetailsProvider(
hostingEnv.ContentRootFileProvider,
logger,
sourceCodeLineCount: 6);
model.ErrorDetails = exceptionDetailProvider.GetDetails(ex);
@ -355,7 +356,7 @@ namespace Microsoft.AspNetCore.Hosting
public void Dispose()
{
DisposeAsync().ConfigureAwait(false).GetAwaiter().GetResult();
DisposeAsync().GetAwaiter().GetResult();
}
public async ValueTask DisposeAsync()

View File

@ -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()
{
}
}
}
}

View File

@ -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();
}
}
}

View File

@ -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.
namespace Microsoft.AspNetCore.Server.IntegrationTesting

View File

@ -1,13 +0,0 @@
using Microsoft.AspNetCore.Hosting.Server.Features;
using System.Linq;
namespace Microsoft.AspNetCore.Hosting
{
public static class IWebHostExtensions
{
public static string GetAddress(this IWebHost host)
{
return host.ServerFeatures.Get<IServerAddressesFeature>().Addresses.First();
}
}
}

Some files were not shown because too many files have changed in this diff Show More