Merge branch 'pr/1'

This commit is contained in:
Isaac Levin 2019-07-18 16:40:35 -04:00
commit 598acacf9b
418 changed files with 11196 additions and 16317 deletions

View File

@ -0,0 +1,35 @@
# This configuration builds the repository and runs stress
pr: none
# Don't run CI for this config
trigger: none
variables:
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: _TeamName
value: AspNetCore
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: _BuildArgs
value: /p:TeamName=$(_TeamName)
/p:OfficialBuildId=$(Build.BuildNumber)
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- name: _BuildArgs
value: ''
jobs:
- template: jobs/default-build.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
jobName: Windows_Stress_Test
jobDisplayName: "Windows Stress test"
agentOs: Windows
isTestingJob: true
steps:
- script: .\src\Servers\Kestrel\stress\build.cmd -ci -c Release
displayName: Build Repo
- script: .\.dotnet\dotnet.exe run --project .\src\Servers\Kestrel\stress\HttpStress.csproj -c Release -aspnetlog
displayName: Run stress
artifacts:
- name: Windows_Test_Stress_Logs
path: artifacts/log/
publishOnError: true

View File

@ -59,11 +59,9 @@
<PropertyGroup>
<SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\</SharedSourceRoot>
<GoogleTestSubmoduleRoot>$(RepoRoot)src\submodules\googletest\</GoogleTestSubmoduleRoot>
<!-- Embed source files that are not tracked by the source control manager in the PDB. -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Disable source link on local builds for faster local builds. -->
<EnableSourceLink Condition="'$(ContinuousIntegrationBuild)' != 'true' and '$(OfficialBuildId)' == ''">false</EnableSourceLink>
</PropertyGroup>
<PropertyGroup>

View File

@ -19,6 +19,11 @@
<ExcludeFromSourceBuild Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true'">true</ExcludeFromSourceBuild>
</PropertyGroup>
<PropertyGroup Label="Resx settings">
<GenerateResxSource Condition="$(GenerateResxSource) == ''">true</GenerateResxSource>
<GenerateResxSourceEmitFormatMethods Condition="$(GenerateResxSourceEmitFormatMethods) == ''">true</GenerateResxSourceEmitFormatMethods>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!-- Properties which should be set after the project has been evaluated -->

View File

@ -38,4 +38,5 @@ if ($Help) {
exit 0
}
git clean -dix -e .dotnet/ -e .tools/ -e src/SignalR/clients/ts/FunctionalTests/node_modules/ @GitArguments
git clean -dix -e .dotnet/ -e .tools/ @GitArguments
git checkout -- $(git ls-files -d)

View File

@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<AspNetCoreBaselineVersion>2.2.5</AspNetCoreBaselineVersion>
<AspNetCoreBaselineVersion>2.2.6</AspNetCoreBaselineVersion>
</PropertyGroup>
<!-- Package: dotnet-dev-certs-->
<PropertyGroup Condition=" '$(PackageId)' == 'dotnet-dev-certs' ">
@ -77,12 +77,12 @@
</ItemGroup>
<!-- Package: Microsoft.AspNetCore.AspNetCoreModule-->
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AspNetCoreModule' ">
<BaselinePackageVersion>2.2.5</BaselinePackageVersion>
<BaselinePackageVersion>2.2.6</BaselinePackageVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AspNetCoreModule' AND '$(TargetFramework)' == 'netcoreapp2.2' " />
<!-- Package: Microsoft.AspNetCore.AspNetCoreModuleV2-->
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AspNetCoreModuleV2' ">
<BaselinePackageVersion>2.2.5</BaselinePackageVersion>
<BaselinePackageVersion>2.2.6</BaselinePackageVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.AspNetCoreModuleV2' AND '$(TargetFramework)' == 'netcoreapp2.2' " />
<!-- Package: Microsoft.AspNetCore.Authentication.Abstractions-->
@ -649,6 +649,11 @@
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Mvc.Analyzers' AND '$(TargetFramework)' == 'netstandard1.3' " />
<!-- Package: Microsoft.AspNetCore.Mvc.Api.Analyzers-->
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Mvc.Api.Analyzers' ">
<BaselinePackageVersion>2.2.6</BaselinePackageVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Mvc.Api.Analyzers' AND '$(TargetFramework)' == 'netstandard1.3' " />
<!-- Package: Microsoft.AspNetCore.Mvc.ApiExplorer-->
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Mvc.ApiExplorer' ">
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>
@ -932,7 +937,7 @@
</ItemGroup>
<!-- Package: Microsoft.AspNetCore.Server.HttpSys-->
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Server.HttpSys' ">
<BaselinePackageVersion>2.2.0</BaselinePackageVersion>
<BaselinePackageVersion>2.2.6</BaselinePackageVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Server.HttpSys' AND '$(TargetFramework)' == 'netstandard2.0' ">
<BaselinePackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="[2.2.0, )" />
@ -943,13 +948,13 @@
</ItemGroup>
<!-- Package: Microsoft.AspNetCore.Server.IIS-->
<PropertyGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Server.IIS' ">
<BaselinePackageVersion>2.2.2</BaselinePackageVersion>
<BaselinePackageVersion>2.2.6</BaselinePackageVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageId)' == 'Microsoft.AspNetCore.Server.IIS' AND '$(TargetFramework)' == 'netstandard2.0' ">
<BaselinePackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="[2.2.0, )" />
<BaselinePackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="[2.2.0, )" />
<BaselinePackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="[2.2.0, )" />
<BaselinePackageReference Include="System.IO.Pipelines" Version="[4.5.2, )" />
<BaselinePackageReference Include="System.IO.Pipelines" Version="[4.5.3, )" />
<BaselinePackageReference Include="System.Security.Principal.Windows" Version="[4.5.0, )" />
</ItemGroup>
<!-- Package: Microsoft.AspNetCore.Server.IISIntegration-->

View File

@ -4,7 +4,7 @@ This file contains a list of all the packages and their versions which were rele
build of ASP.NET Core 2.2.x. Update this list when preparing for a new patch.
-->
<Baseline Version="2.2.5">
<Baseline Version="2.2.6">
<Package Id="dotnet-dev-certs" Version="2.2.0" />
<Package Id="dotnet-sql-cache" Version="2.2.0" />
<Package Id="dotnet-user-secrets" Version="2.2.0" />
@ -12,8 +12,8 @@ build of ASP.NET Core 2.2.x. Update this list when preparing for a new patch.
<Package Id="Microsoft.AspNetCore.Antiforgery" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Version="2.2.0-preview-35687" />
<Package Id="Microsoft.AspNetCore.ApplicationInsights.HostingStartup" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.AspNetCoreModule" Version="2.2.5" />
<Package Id="Microsoft.AspNetCore.AspNetCoreModuleV2" Version="2.2.5" />
<Package Id="Microsoft.AspNetCore.AspNetCoreModule" Version="2.2.6" />
<Package Id="Microsoft.AspNetCore.AspNetCoreModuleV2" Version="2.2.6" />
<Package Id="Microsoft.AspNetCore.Authentication.Abstractions" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="2.2.0" />
@ -74,6 +74,7 @@ build of ASP.NET Core 2.2.x. Update this list when preparing for a new patch.
<Package Id="Microsoft.AspNetCore.MiddlewareAnalysis" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Mvc.Analyzers" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Mvc.Api.Analyzers" Version="2.2.6" />
<Package Id="Microsoft.AspNetCore.Mvc.ApiExplorer" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<Package Id="Microsoft.AspNetCore.Mvc.Cors" Version="2.2.0" />
@ -100,8 +101,8 @@ build of ASP.NET Core 2.2.x. Update this list when preparing for a new patch.
<Package Id="Microsoft.AspNetCore.Rewrite" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Routing.Abstractions" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Routing" Version="2.2.2" />
<Package Id="Microsoft.AspNetCore.Server.HttpSys" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Server.IIS" Version="2.2.2" />
<Package Id="Microsoft.AspNetCore.Server.HttpSys" Version="2.2.6" />
<Package Id="Microsoft.AspNetCore.Server.IIS" Version="2.2.6" />
<Package Id="Microsoft.AspNetCore.Server.IISIntegration" Version="2.2.1" />
<Package Id="Microsoft.AspNetCore.Server.Kestrel.Core" Version="2.2.0" />
<Package Id="Microsoft.AspNetCore.Server.Kestrel.Https" Version="2.2.0" />

View File

@ -84,6 +84,7 @@ and are generated based on the last package release.
<LatestPackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryPackageVersion)" />
<LatestPackageReference Include="System.Buffers" Version="$(SystemBuffersPackageVersion)" />
<LatestPackageReference Include="System.CodeDom" Version="$(SystemCodeDomPackageVersion)" />
<LatestPackageReference Include="System.CommandLine.Experimental" Version="$(SystemCommandlineExperimentalPackageVersion)" />
<LatestPackageReference Include="System.ComponentModel" Version="$(SystemComponentModelPackageVersion)" />
<LatestPackageReference Include="System.ComponentModel.Annotations" Version="$(SystemComponentModelAnnotationsPackageVersion)" />
<LatestPackageReference Include="System.Diagnostics.EventLog" Version="$(SystemDiagnosticsEventLogPackageVersion)" />

View File

@ -63,4 +63,8 @@ Later on, this will be checked using this condition:
Microsoft.AspNetCore.Server.IIS;
</PackagesInPatch>
</PropertyGroup>
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.2.7' ">
<PackagesInPatch>
</PackagesInPatch>
</PropertyGroup>
</Project>

View File

@ -73,6 +73,7 @@
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Authorization" ProjectPath="$(RepoRoot)src\Security\Authorization\Core\src\Microsoft.AspNetCore.Authorization.csproj" RefProjectPath="$(RepoRoot)src\Security\Authorization\Core\ref\Microsoft.AspNetCore.Authorization.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Authorization.Policy" ProjectPath="$(RepoRoot)src\Security\Authorization\Policy\src\Microsoft.AspNetCore.Authorization.Policy.csproj" RefProjectPath="$(RepoRoot)src\Security\Authorization\Policy\ref\Microsoft.AspNetCore.Authorization.Policy.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.CookiePolicy" ProjectPath="$(RepoRoot)src\Security\CookiePolicy\src\Microsoft.AspNetCore.CookiePolicy.csproj" RefProjectPath="$(RepoRoot)src\Security\CookiePolicy\ref\Microsoft.AspNetCore.CookiePolicy.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.ConcurrencyLimiter" ProjectPath="$(RepoRoot)src\Middleware\ConcurrencyLimiter\src\Microsoft.AspNetCore.ConcurrencyLimiter.csproj" RefProjectPath="$(RepoRoot)src\Middleware\ConcurrencyLimiter\ref\Microsoft.AspNetCore.ConcurrencyLimiter.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Cors" ProjectPath="$(RepoRoot)src\Middleware\CORS\src\Microsoft.AspNetCore.Cors.csproj" RefProjectPath="$(RepoRoot)src\Middleware\CORS\ref\Microsoft.AspNetCore.Cors.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Diagnostics.Abstractions" ProjectPath="$(RepoRoot)src\Middleware\Diagnostics.Abstractions\src\Microsoft.AspNetCore.Diagnostics.Abstractions.csproj" RefProjectPath="$(RepoRoot)src\Middleware\Diagnostics.Abstractions\ref\Microsoft.AspNetCore.Diagnostics.Abstractions.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" ProjectPath="$(RepoRoot)src\Middleware\Diagnostics.EntityFrameworkCore\src\Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj" RefProjectPath="$(RepoRoot)src\Middleware\Diagnostics.EntityFrameworkCore\ref\Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj" />
@ -87,7 +88,6 @@
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Localization" ProjectPath="$(RepoRoot)src\Middleware\Localization\src\Microsoft.AspNetCore.Localization.csproj" RefProjectPath="$(RepoRoot)src\Middleware\Localization\ref\Microsoft.AspNetCore.Localization.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.MiddlewareAnalysis" ProjectPath="$(RepoRoot)src\Middleware\MiddlewareAnalysis\src\Microsoft.AspNetCore.MiddlewareAnalysis.csproj" RefProjectPath="$(RepoRoot)src\Middleware\MiddlewareAnalysis\ref\Microsoft.AspNetCore.MiddlewareAnalysis.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.NodeServices" ProjectPath="$(RepoRoot)src\Middleware\NodeServices\src\Microsoft.AspNetCore.NodeServices.csproj" RefProjectPath="$(RepoRoot)src\Middleware\NodeServices\ref\Microsoft.AspNetCore.NodeServices.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.RequestThrottling" ProjectPath="$(RepoRoot)src\Middleware\RequestThrottling\src\Microsoft.AspNetCore.RequestThrottling.csproj" RefProjectPath="$(RepoRoot)src\Middleware\RequestThrottling\ref\Microsoft.AspNetCore.RequestThrottling.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.ResponseCaching.Abstractions" ProjectPath="$(RepoRoot)src\Middleware\ResponseCaching.Abstractions\src\Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj" RefProjectPath="$(RepoRoot)src\Middleware\ResponseCaching.Abstractions\ref\Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.ResponseCaching" ProjectPath="$(RepoRoot)src\Middleware\ResponseCaching\src\Microsoft.AspNetCore.ResponseCaching.csproj" RefProjectPath="$(RepoRoot)src\Middleware\ResponseCaching\ref\Microsoft.AspNetCore.ResponseCaching.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.ResponseCompression" ProjectPath="$(RepoRoot)src\Middleware\ResponseCompression\src\Microsoft.AspNetCore.ResponseCompression.csproj" RefProjectPath="$(RepoRoot)src\Middleware\ResponseCompression\ref\Microsoft.AspNetCore.ResponseCompression.csproj" />

View File

@ -9,432 +9,432 @@
-->
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="0.10.0-preview8.19355.1">
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="0.10.0-preview8.19365.1">
<Uri>https://github.com/aspnet/Blazor</Uri>
<Sha>7e2a0091dd81c0cb17ceb7bdc4d67aed67dbec66</Sha>
<Sha>9045a3861427fc95575c07bd0455c98731567969</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="3.0.0-preview8.19361.5">
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="3.0.0-preview8.19365.2">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>a23fdc5348f411e8fcc29761fb03cf74b1c4f970</Sha>
<Sha>d95774f01eb5f86d3f9ad00d2341deb74b024f37</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="3.0.0-preview8.19361.5">
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="3.0.0-preview8.19365.2">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>a23fdc5348f411e8fcc29761fb03cf74b1c4f970</Sha>
<Sha>d95774f01eb5f86d3f9ad00d2341deb74b024f37</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="3.0.0-preview8.19361.5">
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="3.0.0-preview8.19365.2">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>a23fdc5348f411e8fcc29761fb03cf74b1c4f970</Sha>
<Sha>d95774f01eb5f86d3f9ad00d2341deb74b024f37</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk.Razor" Version="3.0.0-preview8.19361.5">
<Dependency Name="Microsoft.NET.Sdk.Razor" Version="3.0.0-preview8.19365.2">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
<Sha>a23fdc5348f411e8fcc29761fb03cf74b1c4f970</Sha>
<Sha>d95774f01eb5f86d3f9ad00d2341deb74b024f37</Sha>
</Dependency>
<Dependency Name="dotnet-ef" Version="3.0.0-preview8.19361.7">
<Dependency Name="dotnet-ef" Version="3.0.0-preview8.19365.5">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>c916044ea14b17159b7c2cb5f5848bf43f15efc7</Sha>
<Sha>751fb9dcf92357260128fc55afeb1e1735791297</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="3.0.0-preview8.19361.7">
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="3.0.0-preview8.19365.5">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>c916044ea14b17159b7c2cb5f5848bf43f15efc7</Sha>
<Sha>751fb9dcf92357260128fc55afeb1e1735791297</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="3.0.0-preview8.19361.7">
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="3.0.0-preview8.19365.5">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>c916044ea14b17159b7c2cb5f5848bf43f15efc7</Sha>
<Sha>751fb9dcf92357260128fc55afeb1e1735791297</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="3.0.0-preview8.19361.7">
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="3.0.0-preview8.19365.5">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>c916044ea14b17159b7c2cb5f5848bf43f15efc7</Sha>
<Sha>751fb9dcf92357260128fc55afeb1e1735791297</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0-preview8.19361.7">
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0-preview8.19365.5">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>c916044ea14b17159b7c2cb5f5848bf43f15efc7</Sha>
<Sha>751fb9dcf92357260128fc55afeb1e1735791297</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview8.19361.7">
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview8.19365.5">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>c916044ea14b17159b7c2cb5f5848bf43f15efc7</Sha>
<Sha>751fb9dcf92357260128fc55afeb1e1735791297</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore" Version="3.0.0-preview8.19361.7">
<Dependency Name="Microsoft.EntityFrameworkCore" Version="3.0.0-preview8.19365.5">
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
<Sha>c916044ea14b17159b7c2cb5f5848bf43f15efc7</Sha>
<Sha>751fb9dcf92357260128fc55afeb1e1735791297</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Analyzer.Testing" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.AspNetCore.Analyzer.Testing" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ActivatorUtilities.Sources" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ActivatorUtilities.Sources" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.SqlServer" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.SqlServer" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.CommandLineUtils.Sources" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.CommandLineUtils.Sources" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.AzureKeyVault" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.AzureKeyVault" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.KeyPerFile" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.KeyPerFile" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Configuration" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DiagnosticAdapter" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.DiagnosticAdapter" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HashCodeCombiner.Sources" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.HashCodeCombiner.Sources" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Hosting" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Hosting" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Http" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Http" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Localization.Abstractions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Localization.Abstractions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Localization" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Localization" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.AzureAppServices" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.AzureAppServices" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Testing" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging.Testing" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Logging" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ObjectPool" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ObjectPool" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Options" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Primitives" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.Primitives" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.TypeNameHelper.Sources" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.TypeNameHelper.Sources" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.ValueStopwatch.Sources" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.ValueStopwatch.Sources" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.WebEncoders" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Extensions.WebEncoders" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Internal.Extensions.Refs" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.Internal.Extensions.Refs" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.JSInterop" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.JSInterop" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Mono.WebAssembly.Interop" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Mono.WebAssembly.Interop" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="Microsoft.CSharp" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.CSharp" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="Microsoft.Win32.Registry" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.Win32.Registry" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="Microsoft.Win32.SystemEvents" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.Win32.SystemEvents" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.ComponentModel.Annotations" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.ComponentModel.Annotations" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Data.SqlClient" Version="4.7.0-preview6.19264.9" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64" Pinned="true">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a28176b5ec68b6da1472934fe9493790d1665cae</Sha>
</Dependency>
<Dependency Name="System.Diagnostics.EventLog" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Diagnostics.EventLog" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Drawing.Common" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Drawing.Common" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.IO.Pipelines" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.IO.Pipelines" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Net.Http.WinHttpHandler" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Net.Http.WinHttpHandler" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Reflection.Metadata" Version="1.7.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Reflection.Metadata" Version="1.7.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Cng" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Cryptography.Cng" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Pkcs" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Cryptography.Pkcs" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Xml" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Cryptography.Xml" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Security.Permissions" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Permissions" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Security.Principal.Windows" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Security.Principal.Windows" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.ServiceProcess.ServiceController" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.ServiceProcess.ServiceController" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Text.Encodings.Web" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Text.Encodings.Web" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Text.Json" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Threading.Channels" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Threading.Channels" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="System.Windows.Extensions" Version="4.6.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="System.Windows.Extensions" Version="4.6.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="3.0.0-preview8-27911-04" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="3.0.0-preview8-27914-06" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>3ca720b8a2dc8f711a4762729d5c6a223ecc523a</Sha>
<Sha>2bb2dcaeffb1dfeda077354449868ddac254bc3d</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="3.0.0-preview8-27911-04" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="3.0.0-preview8-27914-06" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>3ca720b8a2dc8f711a4762729d5c6a223ecc523a</Sha>
<Sha>2bb2dcaeffb1dfeda077354449868ddac254bc3d</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.0.0-preview8-27911-04" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="3.0.0-preview8-27914-06" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>3ca720b8a2dc8f711a4762729d5c6a223ecc523a</Sha>
<Sha>2bb2dcaeffb1dfeda077354449868ddac254bc3d</Sha>
</Dependency>
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0-preview8-27911-04" CoherentParentDependency="Microsoft.Extensions.Logging">
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0-preview8-27914-06" CoherentParentDependency="Microsoft.Extensions.Logging">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>3ca720b8a2dc8f711a4762729d5c6a223ecc523a</Sha>
<Sha>2bb2dcaeffb1dfeda077354449868ddac254bc3d</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.0.0-preview8.19361.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.0.0-preview8.19364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>a393ffee970c6d962c5830bb1c6fa4c3a3e268a6</Sha>
<Sha>c14b80faff694bae4e085bad221e2e83410e5f33</Sha>
</Dependency>
<Dependency Name="Internal.AspNetCore.Analyzers" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Internal.AspNetCore.Analyzers" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19356.1">
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19365.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a65d0966dc28861394ce78cfdcb9d5dff370957c</Sha>
<Sha>fb27fd4d8a2b67d4333e33d4b898c65171c9f3c1</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19356.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19365.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a65d0966dc28861394ce78cfdcb9d5dff370957c</Sha>
<Sha>fb27fd4d8a2b67d4333e33d4b898c65171c9f3c1</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19356.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19365.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a65d0966dc28861394ce78cfdcb9d5dff370957c</Sha>
<Sha>fb27fd4d8a2b67d4333e33d4b898c65171c9f3c1</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Testing" Version="3.0.0-preview8.19361.5" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Dependency Name="Microsoft.AspNetCore.Testing" Version="3.0.0-preview8.19365.1" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>340377c1b06f9eb34d018f84bea69119fb622093</Sha>
<Sha>8bf6089b4491bc4387cdfec64ab56e7cc39030f8</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.3.0-beta2-19359-05">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.3.0-beta2-19363-02">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>17aaaf42dfcf86952acf0c7f788887623e7f4095</Sha>
<Sha>342275182023200bcd42b3d9919e984039577b44</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>

View File

@ -50,117 +50,117 @@
-->
<PropertyGroup Label="Automated">
<!-- Packages from dotnet/arcade -->
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19356.1</MicrosoftDotNetGenAPIPackageVersion>
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19365.4</MicrosoftDotNetGenAPIPackageVersion>
<!-- Packages from dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>3.3.0-beta2-19359-05</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>3.3.0-beta2-19363-02</MicrosoftNetCompilersToolsetPackageVersion>
<!-- Packages from dotnet/core-setup -->
<MicrosoftExtensionsDependencyModelPackageVersion>3.0.0-preview8-27911-04</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>3.0.0-preview8-27911-04</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>3.0.0-preview8-27911-04</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<NETStandardLibraryRefPackageVersion>2.1.0-preview8-27911-04</NETStandardLibraryRefPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>3.0.0-preview8-27914-06</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>3.0.0-preview8-27914-06</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>3.0.0-preview8-27914-06</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<NETStandardLibraryRefPackageVersion>2.1.0-preview8-27914-06</NETStandardLibraryRefPackageVersion>
<!-- Packages from dotnet/corefx -->
<MicrosoftBclAsyncInterfacesPackageVersion>1.0.0-preview8.19361.1</MicrosoftBclAsyncInterfacesPackageVersion>
<MicrosoftCSharpPackageVersion>4.6.0-preview8.19361.1</MicrosoftCSharpPackageVersion>
<MicrosoftWin32RegistryPackageVersion>4.6.0-preview8.19361.1</MicrosoftWin32RegistryPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>4.6.0-preview8.19361.1</MicrosoftWin32SystemEventsPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>4.6.0-preview8.19361.1</SystemComponentModelAnnotationsPackageVersion>
<MicrosoftBclAsyncInterfacesPackageVersion>1.0.0-preview8.19364.1</MicrosoftBclAsyncInterfacesPackageVersion>
<MicrosoftCSharpPackageVersion>4.6.0-preview8.19364.1</MicrosoftCSharpPackageVersion>
<MicrosoftWin32RegistryPackageVersion>4.6.0-preview8.19364.1</MicrosoftWin32RegistryPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>4.6.0-preview8.19364.1</MicrosoftWin32SystemEventsPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>4.6.0-preview8.19364.1</SystemComponentModelAnnotationsPackageVersion>
<SystemDataSqlClientPackageVersion>4.7.0-preview6.19264.9</SystemDataSqlClientPackageVersion>
<SystemDiagnosticsEventLogPackageVersion>4.6.0-preview8.19361.1</SystemDiagnosticsEventLogPackageVersion>
<SystemDrawingCommonPackageVersion>4.6.0-preview8.19361.1</SystemDrawingCommonPackageVersion>
<SystemIOPipelinesPackageVersion>4.6.0-preview8.19361.1</SystemIOPipelinesPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>4.6.0-preview8.19361.1</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>4.6.0-preview8.19361.1</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemReflectionMetadataPackageVersion>1.7.0-preview8.19361.1</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>4.6.0-preview8.19361.1</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityCryptographyCngPackageVersion>4.6.0-preview8.19361.1</SystemSecurityCryptographyCngPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>4.6.0-preview8.19361.1</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>4.6.0-preview8.19361.1</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>4.6.0-preview8.19361.1</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>4.6.0-preview8.19361.1</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>4.6.0-preview8.19361.1</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>4.6.0-preview8.19361.1</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>4.6.0-preview8.19361.1</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>4.6.0-preview8.19361.1</SystemThreadingChannelsPackageVersion>
<SystemWindowsExtensionsPackageVersion>4.6.0-preview8.19361.1</SystemWindowsExtensionsPackageVersion>
<SystemDiagnosticsEventLogPackageVersion>4.6.0-preview8.19364.1</SystemDiagnosticsEventLogPackageVersion>
<SystemDrawingCommonPackageVersion>4.6.0-preview8.19364.1</SystemDrawingCommonPackageVersion>
<SystemIOPipelinesPackageVersion>4.6.0-preview8.19364.1</SystemIOPipelinesPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>4.6.0-preview8.19364.1</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>4.6.0-preview8.19364.1</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemReflectionMetadataPackageVersion>1.7.0-preview8.19364.1</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>4.6.0-preview8.19364.1</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityCryptographyCngPackageVersion>4.6.0-preview8.19364.1</SystemSecurityCryptographyCngPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>4.6.0-preview8.19364.1</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>4.6.0-preview8.19364.1</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>4.6.0-preview8.19364.1</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>4.6.0-preview8.19364.1</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>4.6.0-preview8.19364.1</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>4.6.0-preview8.19364.1</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>4.6.0-preview8.19364.1</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>4.6.0-preview8.19364.1</SystemThreadingChannelsPackageVersion>
<SystemWindowsExtensionsPackageVersion>4.6.0-preview8.19364.1</SystemWindowsExtensionsPackageVersion>
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<MicrosoftNETCorePlatformsPackageVersion>3.0.0-preview8.19361.1</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>3.0.0-preview8.19364.1</MicrosoftNETCorePlatformsPackageVersion>
<!-- Packages from aspnet/Blazor -->
<MicrosoftAspNetCoreBlazorMonoPackageVersion>0.10.0-preview8.19355.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
<MicrosoftAspNetCoreBlazorMonoPackageVersion>0.10.0-preview8.19365.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
<!-- Packages from aspnet/Extensions -->
<InternalAspNetCoreAnalyzersPackageVersion>3.0.0-preview8.19361.5</InternalAspNetCoreAnalyzersPackageVersion>
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>3.0.0-preview8.19361.5</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>3.0.0-preview8.19361.5</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>3.0.0-preview8.19361.5</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>
<MicrosoftExtensionsCachingAbstractionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsCachingAbstractionsPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsCachingSqlServerPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsCachingSqlServerPackageVersion>
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationIniPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationIniPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsConfigurationXmlPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsConfigurationXmlPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
<MicrosoftExtensionsFileProvidersCompositePackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsFileProvidersCompositePackageVersion>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsHostingPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsHttpPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsHttpPackageVersion>
<MicrosoftExtensionsLocalizationAbstractionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLocalizationAbstractionsPackageVersion>
<MicrosoftExtensionsLocalizationPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLocalizationPackageVersion>
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
<MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingEventSourcePackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingEventSourcePackageVersion>
<MicrosoftExtensionsLoggingEventLogPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingEventLogPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
<MicrosoftExtensionsObjectPoolPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsObjectPoolPackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>
<MicrosoftExtensionsPrimitivesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsPrimitivesPackageVersion>
<MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
<MicrosoftExtensionsWebEncodersPackageVersion>3.0.0-preview8.19361.5</MicrosoftExtensionsWebEncodersPackageVersion>
<MicrosoftInternalExtensionsRefsPackageVersion>3.0.0-preview8.19361.5</MicrosoftInternalExtensionsRefsPackageVersion>
<MicrosoftJSInteropPackageVersion>3.0.0-preview8.19361.5</MicrosoftJSInteropPackageVersion>
<MonoWebAssemblyInteropPackageVersion>3.0.0-preview8.19361.5</MonoWebAssemblyInteropPackageVersion>
<InternalAspNetCoreAnalyzersPackageVersion>3.0.0-preview8.19365.1</InternalAspNetCoreAnalyzersPackageVersion>
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>3.0.0-preview8.19365.1</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>3.0.0-preview8.19365.1</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>3.0.0-preview8.19365.1</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>
<MicrosoftExtensionsCachingAbstractionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsCachingAbstractionsPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsCachingSqlServerPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsCachingSqlServerPackageVersion>
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationIniPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationIniPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsConfigurationXmlPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsConfigurationXmlPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
<MicrosoftExtensionsFileProvidersCompositePackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsFileProvidersCompositePackageVersion>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsHostingPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsHttpPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsHttpPackageVersion>
<MicrosoftExtensionsLocalizationAbstractionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLocalizationAbstractionsPackageVersion>
<MicrosoftExtensionsLocalizationPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLocalizationPackageVersion>
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
<MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingEventSourcePackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingEventSourcePackageVersion>
<MicrosoftExtensionsLoggingEventLogPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingEventLogPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
<MicrosoftExtensionsObjectPoolPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsObjectPoolPackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>
<MicrosoftExtensionsPrimitivesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsPrimitivesPackageVersion>
<MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
<MicrosoftExtensionsWebEncodersPackageVersion>3.0.0-preview8.19365.1</MicrosoftExtensionsWebEncodersPackageVersion>
<MicrosoftInternalExtensionsRefsPackageVersion>3.0.0-preview8.19365.1</MicrosoftInternalExtensionsRefsPackageVersion>
<MicrosoftJSInteropPackageVersion>3.0.0-preview8.19365.1</MicrosoftJSInteropPackageVersion>
<MonoWebAssemblyInteropPackageVersion>3.0.0-preview8.19365.1</MonoWebAssemblyInteropPackageVersion>
<!-- Packages from aspnet/EntityFrameworkCore -->
<dotnetefPackageVersion>3.0.0-preview8.19361.7</dotnetefPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>3.0.0-preview8.19361.7</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>3.0.0-preview8.19361.7</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>3.0.0-preview8.19361.7</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>3.0.0-preview8.19361.7</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>3.0.0-preview8.19361.7</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>3.0.0-preview8.19361.7</MicrosoftEntityFrameworkCorePackageVersion>
<dotnetefPackageVersion>3.0.0-preview8.19365.5</dotnetefPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>3.0.0-preview8.19365.5</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>3.0.0-preview8.19365.5</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>3.0.0-preview8.19365.5</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>3.0.0-preview8.19365.5</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>3.0.0-preview8.19365.5</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>3.0.0-preview8.19365.5</MicrosoftEntityFrameworkCorePackageVersion>
<!-- Packages from aspnet/AspNetCore-Tooling -->
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>3.0.0-preview8.19361.5</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
<MicrosoftAspNetCoreRazorLanguagePackageVersion>3.0.0-preview8.19361.5</MicrosoftAspNetCoreRazorLanguagePackageVersion>
<MicrosoftCodeAnalysisRazorPackageVersion>3.0.0-preview8.19361.5</MicrosoftCodeAnalysisRazorPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>3.0.0-preview8.19361.5</MicrosoftNETSdkRazorPackageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>3.0.0-preview8.19365.2</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
<MicrosoftAspNetCoreRazorLanguagePackageVersion>3.0.0-preview8.19365.2</MicrosoftAspNetCoreRazorLanguagePackageVersion>
<MicrosoftCodeAnalysisRazorPackageVersion>3.0.0-preview8.19365.2</MicrosoftCodeAnalysisRazorPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>3.0.0-preview8.19365.2</MicrosoftNETSdkRazorPackageVersion>
</PropertyGroup>
<!--
@ -186,6 +186,7 @@
<!-- Stable dotnet/corefx packages no longer updated for .NET Core 3 -->
<SystemBuffersPackageVersion>4.5.0</SystemBuffersPackageVersion>
<SystemCodeDomPackageVersion>4.4.0</SystemCodeDomPackageVersion>
<SystemCommandlineExperimentalPackageVersion>0.3.0-alpha.19317.1</SystemCommandlineExperimentalPackageVersion>
<SystemComponentModelPackageVersion>4.3.0</SystemComponentModelPackageVersion>
<SystemNetHttpPackageVersion>4.3.2</SystemNetHttpPackageVersion>
<SystemThreadingTasksExtensionsPackageVersion>4.5.2</SystemThreadingTasksExtensionsPackageVersion>
@ -201,16 +202,16 @@
<MicrosoftCodeAnalysisCSharpPackageVersion>3.0.0</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>3.0.0</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
<MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>3.19.8</MicrosoftIdentityModelClientsActiveDirectoryPackageVersion>
<MicrosoftIdentityModelLoggingPackageVersion>5.3.0</MicrosoftIdentityModelLoggingPackageVersion>
<MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>5.3.0</MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>
<MicrosoftIdentityModelProtocolsWsFederationPackageVersion>5.3.0</MicrosoftIdentityModelProtocolsWsFederationPackageVersion>
<MicrosoftIdentityModelLoggingPackageVersion>5.5.0</MicrosoftIdentityModelLoggingPackageVersion>
<MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>5.5.0</MicrosoftIdentityModelProtocolsOpenIdConnectPackageVersion>
<MicrosoftIdentityModelProtocolsWsFederationPackageVersion>5.5.0</MicrosoftIdentityModelProtocolsWsFederationPackageVersion>
<MicrosoftInternalAspNetCoreH2SpecAllPackageVersion>2.2.1</MicrosoftInternalAspNetCoreH2SpecAllPackageVersion>
<MicrosoftNETCoreWindowsApiSetsPackageVersion>1.0.1</MicrosoftNETCoreWindowsApiSetsPackageVersion>
<MicrosoftOwinSecurityCookiesPackageVersion>3.0.1</MicrosoftOwinSecurityCookiesPackageVersion>
<MicrosoftOwinTestingPackageVersion>3.0.1</MicrosoftOwinTestingPackageVersion>
<MicrosoftWebAdministrationPackageVersion>11.1.0</MicrosoftWebAdministrationPackageVersion>
<MicrosoftWebXdtPackageVersion>1.4.0</MicrosoftWebXdtPackageVersion>
<SystemIdentityModelTokensJwtPackageVersion>5.3.0</SystemIdentityModelTokensJwtPackageVersion>
<SystemIdentityModelTokensJwtPackageVersion>5.5.0</SystemIdentityModelTokensJwtPackageVersion>
<!-- Packages from 2.1/2.2 branches used for site extension build -->
<MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion>2.1.1</MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion>2.2.0</MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion>

View File

@ -3,7 +3,7 @@
<!--
This MSBuild file is intended to be used as the body of the default
publishing release pipeline. The release pipeline will use this file
to invoke the the SignCheck tool to validate that packages about to
to invoke the SignCheck tool to validate that packages about to
be published are correctly signed.
Parameters:

View File

@ -0,0 +1,77 @@
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
<PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
<WorkItemCommand>%HELIX_CORRELATION_PAYLOAD%\performance\scripts\benchmarks_ci.py --csproj %HELIX_CORRELATION_PAYLOAD%\performance\$(TargetCsproj)</WorkItemCommand>
<CliArguments>--dotnet-versions %DOTNET_VERSION% --cli-source-info args --cli-branch %PERFLAB_BRANCH% --cli-commit-sha %PERFLAB_HASH% --cli-repository https://github.com/%PERFLAB_REPO% --cli-source-timestamp %PERFLAB_BUILDTIMESTAMP%</CliArguments>
<Python>py -3</Python>
<CoreRun>%HELIX_CORRELATION_PAYLOAD%\Core_Root\CoreRun.exe</CoreRun>
<HelixPreCommands>$(HelixPreCommands);call %HELIX_CORRELATION_PAYLOAD%\performance\tools\machine-setup.cmd</HelixPreCommands>
<ArtifactsDirectory>%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts</ArtifactsDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT' and '$(RunFromPerfRepo)' == 'false'">
<BaseDirectory>$HELIX_CORRELATION_PAYLOAD</BaseDirectory>
<PerformanceDirectory>$(BaseDirectory)/performance</PerformanceDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT' and '$(RunFromPerfRepo)' == 'true'">
<BaseDirectory>$HELIX_WORKITEM_PAYLOAD</BaseDirectory>
<PerformanceDirectory>$(BaseDirectory)</PerformanceDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
<WorkItemCommand>$(PerformanceDirectory)/scripts/benchmarks_ci.py --csproj $(PerformanceDirectory)/$(TargetCsproj)</WorkItemCommand>
<CliArguments>--dotnet-versions $DOTNET_VERSION --cli-source-info args --cli-branch $PERFLAB_BRANCH --cli-commit-sha $PERFLAB_HASH --cli-repository https://github.com/$PERFLAB_REPO --cli-source-timestamp $PERFLAB_BUILDTIMESTAMP</CliArguments>
<Python>python3</Python>
<CoreRun>$(BaseDirectory)/Core_Root/corerun</CoreRun>
<HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh</HelixPreCommands>
<ArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts</ArtifactsDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(UseCoreRun)' == 'true'">
<CoreRunArgument>--corerun $(CoreRun)</CoreRunArgument>
</PropertyGroup>
<PropertyGroup Condition="'$(WorkItemCommand)' != ''">
<WorkItemCommand>$(Python) $(WorkItemCommand) --incremental no --architecture $(Architecture) -f $(_Framework) $(PerfLabArguments)</WorkItemCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(_Framework)' != 'net461'">
<WorkItemCommand>$(WorkItemCommand) $(CliArguments)</WorkItemCommand>
</PropertyGroup>
<ItemGroup>
<HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
<PayloadDirectory>%(Identity)</PayloadDirectory>
</HelixCorrelationPayload>
</ItemGroup>
<PropertyGroup>
<PartitionCount>5</PartitionCount>
</PropertyGroup>
<ItemGroup>
<Partition Include="$(BuildConfig).Partition0" Index="0" />
<Partition Include="$(BuildConfig).Partition1" Index="1" />
<Partition Include="$(BuildConfig).Partition2" Index="2" />
<Partition Include="$(BuildConfig).Partition3" Index="3" />
<Partition Include="$(BuildConfig).Partition4" Index="4" />
</ItemGroup>
<!--
Partition the Microbenchmarks project, but nothing else
-->
<ItemGroup Condition="$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
<HelixWorkItem Include="@(Partition)">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<Command>$(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command>
<Timeout>4:00</Timeout>
</HelixWorkItem>
</ItemGroup>
<ItemGroup Condition="!$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
<HelixWorkItem Include="$(BuildConfig).WorkItem">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<Command>$(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory)"</Command>
<Timeout>4:00</Timeout>
</HelixWorkItem>
</ItemGroup>
</Project>

View File

@ -0,0 +1,91 @@
Param(
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY,
[string] $CoreRootDirectory,
[string] $Architecture="x64",
[string] $Framework="netcoreapp3.0",
[string] $CompilationMode="Tiered",
[string] $Repository=$env:BUILD_REPOSITORY_NAME,
[string] $Branch=$env:BUILD_SOURCEBRANCH,
[string] $CommitSha=$env:BUILD_SOURCEVERSION,
[string] $BuildNumber=$env:BUILD_BUILDNUMBER,
[string] $RunCategories="coreclr corefx",
[string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj",
[string] $Kind="micro",
[switch] $Internal,
[string] $Configurations="CompilationMode=$CompilationMode"
)
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance")
$UseCoreRun = ($CoreRootDirectory -ne [string]::Empty)
$PayloadDirectory = (Join-Path $SourceDirectory "Payload")
$PerformanceDirectory = (Join-Path $PayloadDirectory "performance")
$WorkItemDirectory = (Join-Path $SourceDirectory "workitem")
$ExtraBenchmarkDotNetArguments = "--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --stopOnFirstError true"
$Creator = $env:BUILD_DEFINITIONNAME
$PerfLabArguments = ""
$HelixSourcePrefix = "pr"
$Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open"
if ($Framework.StartsWith("netcoreapp")) {
$Queue = "Windows.10.Amd64.ClientRS4.Open"
}
if ($Internal) {
$Queue = "Windows.10.Amd64.ClientRS5.Perf"
$PerfLabArguments = "--upload-to-perflab-container"
$ExtraBenchmarkDotNetArguments = ""
$Creator = ""
$HelixSourcePrefix = "official"
}
$CommonSetupArguments="--frameworks $Framework --queue $Queue --build-number $BuildNumber --build-configs $Configurations"
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
if ($RunFromPerformanceRepo) {
$SetupArguments = "--perf-hash $CommitSha $CommonSetupArguments"
robocopy $SourceDirectory $PerformanceDirectory /E /XD $PayloadDirectory $SourceDirectory\artifacts $SourceDirectory\.git
}
else {
git clone --branch master --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory
}
if ($UseCoreRun) {
$NewCoreRoot = (Join-Path $PayloadDirectory "Core_Root")
Move-Item -Path $CoreRootDirectory -Destination $NewCoreRoot
}
$DocsDir = (Join-Path $PerformanceDirectory "docs")
robocopy $DocsDir $WorkItemDirectory
# Set variables that we will need to have in future steps
$ci = $true
. "$PSScriptRoot\..\pipeline-logging-functions.ps1"
# Directories
Write-PipelineSetVariable -Name 'PayloadDirectory' -Value "$PayloadDirectory" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'PerformanceDirectory' -Value "$PerformanceDirectory" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'WorkItemDirectory' -Value "$WorkItemDirectory" -IsMultiJobVariable $false
# Script Arguments
Write-PipelineSetVariable -Name 'Python' -Value "py -3" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'ExtraBenchmarkDotNetArguments' -Value "$ExtraBenchmarkDotNetArguments" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'SetupArguments' -Value "$SetupArguments" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'PerfLabArguments' -Value "$PerfLabArguments" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'BDNCategories' -Value "$RunCategories" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'TargetCsproj' -Value "$Csproj" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'Kind' -Value "$Kind" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'Architecture' -Value "$Architecture" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'UseCoreRun' -Value "$UseCoreRun" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'RunFromPerfRepo' -Value "$RunFromPerformanceRepo" -IsMultiJobVariable $false
# Helix Arguments
Write-PipelineSetVariable -Name 'Creator' -Value "$Creator" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'Queue' -Value "$Queue" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'HelixSourcePrefix' -Value "$HelixSourcePrefix" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name '_BuildConfig' -Value "$Architecture.$Kind.$Framework" -IsMultiJobVariable $false
exit 0

View File

@ -0,0 +1,176 @@
#!/usr/bin/env bash
source_directory=$BUILD_SOURCESDIRECTORY
core_root_directory=
architecture=x64
framework=netcoreapp3.0
compilation_mode=tiered
repository=$BUILD_REPOSITORY_NAME
branch=$BUILD_SOURCEBRANCH
commit_sha=$BUILD_SOURCEVERSION
build_number=$BUILD_BUILDNUMBER
internal=false
kind="micro"
run_categories="coreclr corefx"
csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
configurations=
run_from_perf_repo=false
use_core_run=true
while (($# > 0)); do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--sourcedirectory)
source_directory=$2
shift 2
;;
--corerootdirectory)
core_root_directory=$2
shift 2
;;
--architecture)
architecture=$2
shift 2
;;
--framework)
framework=$2
shift 2
;;
--compilationmode)
compilation_mode=$2
shift 2
;;
--repository)
repository=$2
shift 2
;;
--branch)
branch=$2
shift 2
;;
--commitsha)
commit_sha=$2
shift 2
;;
--buildnumber)
build_number=$2
shift 2
;;
--kind)
kind=$2
shift 2
;;
--runcategories)
run_categories=$2
shift 2
;;
--csproj)
csproj=$2
shift 2
;;
--internal)
internal=true
shift 1
;;
--configurations)
configurations=$2
shift 2
;;
--help)
echo "Common settings:"
echo " --corerootdirectory <value> Directory where Core_Root exists, if running perf testing with --corerun"
echo " --architecture <value> Architecture of the testing being run"
echo " --configurations <value> List of key=value pairs that will be passed to perf testing infrastructure."
echo " ex: --configurations \"CompilationMode=Tiered OptimzationLevel=PGO\""
echo " --help Print help and exit"
echo ""
echo "Advanced settings:"
echo " --framework <value> The framework to run, if not running in master"
echo " --compliationmode <value> The compilation mode if not passing --configurations"
echo " --sourcedirectory <value> The directory of the sources. Defaults to env:BUILD_SOURCESDIRECTORY"
echo " --repository <value> The name of the repository in the <owner>/<repository name> format. Defaults to env:BUILD_REPOSITORY_NAME"
echo " --branch <value> The name of the branch. Defaults to env:BUILD_SOURCEBRANCH"
echo " --commitsha <value> The commit sha1 to run against. Defaults to env:BUILD_SOURCEVERSION"
echo " --buildnumber <value> The build number currently running. Defaults to env:BUILD_BUILDNUMBER"
echo " --csproj The relative path to the benchmark csproj whose tests should be run. Defaults to src\benchmarks\micro\MicroBenchmarks.csproj"
echo " --kind <value> Related to csproj. The kind of benchmarks that should be run. Defaults to micro"
echo " --runcategories <value> Related to csproj. Categories of benchmarks to run. Defaults to \"coreclr corefx\""
echo " --internal If the benchmarks are running as an official job."
echo ""
exit 0
;;
esac
done
if [[ "$repository" == "dotnet/performance" ]]; then
run_from_perf_repo=true
fi
if [ -z "$configurations" ]; then
configurations="CompliationMode=$compilation_mode"
fi
if [ -z "$core_root_directory" ]; then
use_core_run=false
fi
payload_directory=$source_directory/Payload
performance_directory=$payload_directory/performance
workitem_directory=$source_directory/workitem
extra_benchmark_dotnet_arguments="--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --stopOnFirstError true"
perflab_arguments=
queue=Ubuntu.1804.Amd64.Open
creator=$BUILD_DEFINITIONNAME
helix_source_prefix="pr"
if [[ "$internal" == true ]]; then
perflab_arguments="--upload-to-perflab-container"
helix_source_prefix="official"
creator=
extra_benchmark_dotnet_arguments=
if [[ "$architecture" = "arm64" ]]; then
queue=Ubuntu.1804.Arm64.Perf
else
queue=Ubuntu.1804.Amd64.Perf
fi
fi
common_setup_arguments="--frameworks $framework --queue $queue --build-number $build_number --build-configs $configurations"
setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
if [[ "$run_from_perf_repo" = true ]]; then
payload_directory=
workitem_directory=$source_directory
performance_directory=$workitem_directory
setup_arguments="--perf-hash $commit_sha $common_setup_arguments"
else
git clone --branch master --depth 1 --quiet https://github.com/dotnet/performance $performance_directory
docs_directory=$performance_directory/docs
mv $docs_directory $workitem_directory
fi
if [[ "$use_core_run" = true ]]; then
new_core_root=$payload_directory/Core_Root
mv $core_root_directory $new_core_root
fi
# Make sure all of our variables are available for future steps
echo "##vso[task.setvariable variable=UseCoreRun]$use_core_run"
echo "##vso[task.setvariable variable=Architecture]$architecture"
echo "##vso[task.setvariable variable=PayloadDirectory]$payload_directory"
echo "##vso[task.setvariable variable=PerformanceDirectory]$performance_directory"
echo "##vso[task.setvariable variable=WorkItemDirectory]$workitem_directory"
echo "##vso[task.setvariable variable=Queue]$queue"
echo "##vso[task.setvariable variable=SetupArguments]$setup_arguments"
echo "##vso[task.setvariable variable=Python]python3"
echo "##vso[task.setvariable variable=PerfLabArguments]$perflab_arguments"
echo "##vso[task.setvariable variable=ExtraBenchmarkDotNetArguments]$extra_benchmark_dotnet_arguments"
echo "##vso[task.setvariable variable=BDNCategories]$run_categories"
echo "##vso[task.setvariable variable=TargetCsproj]$csproj"
echo "##vso[task.setvariable variable=RunFromPerfRepo]$run_from_perf_repo"
echo "##vso[task.setvariable variable=Creator]$creator"
echo "##vso[task.setvariable variable=HelixSourcePrefix]$helix_source_prefix"
echo "##vso[task.setvariable variable=Kind]$kind"
echo "##vso[task.setvariable variable=_BuildConfig]$architecture.$kind.$framework"

View File

@ -77,13 +77,14 @@ function Write-PipelineTaskError {
[string]$Name,
[string]$Value,
[switch]$Secret,
[switch]$AsOutput)
[switch]$AsOutput,
[bool]$IsMultiJobVariable=$true)
if($ci) {
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
'variable' = $Name
'isSecret' = $Secret
'isOutput' = 'true'
'isOutput' = $IsMultiJobVariable
} -AsOutput:$AsOutput
}
}

View File

@ -19,14 +19,14 @@ function Get-Headers([string]$accept, [string]$barToken) {
}
# Get all the $SourceRepo subscriptions
$normalizedSurceRepo = $SourceRepo.Replace('dnceng@', '')
$getSubscriptionsApiEndpoint = "$maestroEndpoint/api/subscriptions?sourceRepository=$normalizedSurceRepo&api-version=$apiVersion"
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
$getSubscriptionsApiEndpoint = "$maestroEndpoint/api/subscriptions?sourceRepository=$normalizedSourceRepo&api-version=$apiVersion"
$headers = Get-Headers 'application/json' $barToken
$subscriptions = Invoke-WebRequest -Uri $getSubscriptionsApiEndpoint -Headers $headers | ConvertFrom-Json
if (!$subscriptions) {
Write-Host "No subscriptions found for source repo '$normalizedSurceRepo' in channel '$ChannelId'"
Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
return
}

View File

@ -0,0 +1,93 @@
parameters:
steps: [] # optional -- any additional steps that need to happen before pulling down the performance repo and sending the performance benchmarks to helix (ie building your repo)
variables: [] # optional -- list of additional variables to send to the template
jobName: '' # required -- job name
displayName: '' # optional -- display name for the job. Will use jobName if not passed
pool: '' # required -- name of the Build pool
container: '' # required -- name of the container
extraSetupParameters: '' # optional -- extra arguments to pass to the setup script
frameworks: ['netcoreapp3.0'] # optional -- list of frameworks to run against
continueOnError: 'false' # optional -- determines whether to continue the build if the step errors
dependsOn: '' # optional -- dependencies of the job
timeoutInMinutes: 320 # optional -- timeout for the job
enableTelemetry: false # optional -- enable for telemetry
jobs:
- template: ../jobs/jobs.yml
parameters:
dependsOn: ${{ parameters.dependsOn }}
enableTelemetry: ${{ parameters.enableTelemetry }}
enablePublishBuildArtifacts: true
continueOnError: ${{ parameters.continueOnError }}
jobs:
- job: '${{ parameters.jobName }}'
${{ if ne(parameters.displayName, '') }}:
displayName: '${{ parameters.displayName }}'
${{ if eq(parameters.displayName, '') }}:
displayName: '${{ parameters.jobName }}'
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
variables:
- ${{ each variable in parameters.variables }}:
- ${{ if ne(variable.name, '') }}:
- name: ${{ variable.name }}
value: ${{ variable.value }}
- ${{ if ne(variable.group, '') }}:
- group: ${{ variable.group }}
- IsInternal: ''
- HelixApiAccessToken: ''
- HelixPreCommand: ''
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- ${{ if eq(variables['Agent.Os'], 'Windows_NT') }}:
- HelixPreCommand: 'set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
- IsInternal: -Internal
- ${{ if ne(variables['Agent.Os'], 'Windows_NT') }}:
- HelixPreCommand: 'export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
- IsInternal: --internal
- group: DotNet-HelixApi-Access
- group: dotnet-benchview
workspace:
clean: all
pool:
${{ parameters.pool }}
container: ${{ parameters.container }}
strategy:
matrix:
${{ each framework in parameters.frameworks }}:
${{ framework }}:
_Framework: ${{ framework }}
steps:
- checkout: self
clean: true
# Run all of the steps to setup repo
- ${{ each step in parameters.steps }}:
- ${{ step }}
- powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal) -Framework $(_Framework) ${{ parameters.extraSetupParameters }}
displayName: Performance Setup (Windows)
condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}
- script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal) --framework $(_Framework) ${{ parameters.extraSetupParameters }}
displayName: Performance Setup (Unix)
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}
- script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments)
displayName: Run ci setup script
# Run perf testing in helix
- template: /eng/common/templates/steps/perf-send-to-helix.yml
parameters:
HelixSource: '$(HelixSourcePrefix)/$(Build.Repository.Name)/$(Build.SourceBranch)' # sources must start with pr/, official/, prodcon/, or agent/
HelixType: 'test/performance/$(Kind)/$(_Framework)/$(Architecture)'
HelixAccessToken: $(HelixApiAccessToken)
HelixTargetQueues: $(Queue)
HelixPreCommands: $(HelixPreCommand)
Creator: $(Creator)
WorkItemTimeout: 4:00 # 4 hours
WorkItemDirectory: '$(WorkItemDirectory)' # WorkItemDirectory can not be empty, so we send it some docs to keep it happy
CorrelationPayloadDirectory: '$(PayloadDirectory)' # it gets checked out to a folder with shorter path than WorkItemDirectory so we can avoid file name too long exceptions

View File

@ -81,10 +81,10 @@ stages:
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)
/p:CommitSha=$(Build.SourceVersion)
/p:AzureStorageAccountName=$(ProxyBackedFeedsAccountName)
/p:AzureStorageAccountKey=$(dotnetfeed-storage-access-key-1)
/p:AzureDevOpsFeedsBaseUrl=$(dotnetfeed-internal-private-feed-url)
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
/p:BARBuildId=$(BARBuildId)
/p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
/p:BuildAssetRegistryToken='$(MaestroAccessToken)'
@ -167,4 +167,4 @@ stages:
- template: ../promote-build.yml
parameters:
ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}

View File

@ -77,6 +77,7 @@ stages:
filePath: eng\common\sdk-task.ps1
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
/p:ChannelId=$(PublicDevRelease_30_Channel_Id)
/p:ArtifactsCategory=.NetCore
/p:IsStableBuild=$(IsStableBuild)
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)

View File

@ -81,10 +81,10 @@ stages:
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)
/p:CommitSha=$(Build.SourceVersion)
/p:NugetPath=$(Agent.BuildDirectory)/Nuget/NuGet.exe
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
/p:AzureStorageAccountName=$(ProxyBackedFeedsAccountName)
/p:AzureStorageAccountKey=$(dotnetfeed-storage-access-key-1)
/p:AzureDevOpsFeedsBaseUrl=$(dotnetfeed-internal-private-feed-url)
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
/p:BARBuildId=$(BARBuildId)
/p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
/p:BuildAssetRegistryToken='$(MaestroAccessToken)'

View File

@ -48,6 +48,7 @@ stages:
filePath: eng\common\sdk-task.ps1
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
/p:ChannelId=$(PublicValidationRelease_30_Channel_Id)
/p:ArtifactsCategory=.NetCoreValidation
/p:IsStableBuild=$(IsStableBuild)
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)

View File

@ -14,5 +14,8 @@ variables:
# Whether the build is internal or not
IsInternalBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
# Storage account name for proxy-backed feeds
ProxyBackedFeedsAccountName: dotnetfeed
SourceLinkCLIVersion: 3.0.0
SymbolToolVersion: 1.0.1

View File

@ -0,0 +1,66 @@
# Please remember to update the documentation if you make changes to these parameters!
parameters:
HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/
HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/'
HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number
HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues
HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group
HelixPreCommands: '' # optional -- commands to run before Helix work item execution
HelixPostCommands: '' # optional -- commands to run after Helix work item execution
WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload
IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control
WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
Creator: '' # optional -- if the build is external, use this to specify who is sending the job
DisplayNamePrefix: 'Send job to Helix' # optional -- rename the beginning of the displayName of the steps in AzDO
condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false
steps:
- powershell: $(Build.SourcesDirectory)\eng\common\msbuild.ps1 $(Build.SourcesDirectory)\eng\common\performance\perfhelixpublish.proj /restore /t:Test /bl:$(Build.SourcesDirectory)\artifacts\log\$env:BuildConfig\SendToHelix.binlog
displayName: ${{ parameters.DisplayNamePrefix }} (Windows)
env:
BuildConfig: $(_BuildConfig)
HelixSource: ${{ parameters.HelixSource }}
HelixType: ${{ parameters.HelixType }}
HelixBuild: ${{ parameters.HelixBuild }}
HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
HelixAccessToken: ${{ parameters.HelixAccessToken }}
HelixPreCommands: ${{ parameters.HelixPreCommands }}
HelixPostCommands: ${{ parameters.HelixPostCommands }}
WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
Creator: ${{ parameters.Creator }}
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}
- script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/performance/perfhelixpublish.proj /restore /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
displayName: ${{ parameters.DisplayNamePrefix }} (Unix)
env:
BuildConfig: $(_BuildConfig)
HelixSource: ${{ parameters.HelixSource }}
HelixType: ${{ parameters.HelixType }}
HelixBuild: ${{ parameters.HelixBuild }}
HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
HelixAccessToken: ${{ parameters.HelixAccessToken }}
HelixPreCommands: ${{ parameters.HelixPreCommands }}
HelixPostCommands: ${{ parameters.HelixPostCommands }}
WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
Creator: ${{ parameters.Creator }}
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}

View File

@ -84,7 +84,7 @@ function Exec-Process([string]$command, [string]$commandArgs) {
return $global:LASTEXITCODE = $process.ExitCode
}
finally {
# If we didn't finish then an error occured or the user hit ctrl-c. Either
# If we didn't finish then an error occurred or the user hit ctrl-c. Either
# way kill the process
if (-not $finished) {
$process.Kill()
@ -147,7 +147,7 @@ function InitializeDotNetCli([bool]$install) {
# It also ensures that VS msbuild will use the downloaded sdk targets.
$env:PATH = "$dotnetRoot;$env:PATH"
# Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
# Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build
Write-PipelinePrependPath -Path $dotnetRoot
Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'

View File

@ -24,7 +24,7 @@
},
"msbuild-sdks": {
"Yarn.MSBuild": "1.15.2",
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19356.1",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19356.1"
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19365.4",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19365.4"
}
}

View File

@ -1,41 +1,42 @@
// 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.Concurrent;
using System.Linq;
using System.Diagnostics;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Microsoft.AspNetCore.Analyzers
{
internal class BuildServiceProviderValidator : StartupDiagnosticValidator
internal class BuildServiceProviderValidator
{
public static BuildServiceProviderValidator CreateAndInitialize(CompilationAnalysisContext context, ConcurrentBag<StartupComputedAnalysis> analyses)
private readonly StartupAnalysis _context;
public BuildServiceProviderValidator(StartupAnalysis context)
{
if (analyses == null)
{
throw new ArgumentNullException(nameof(analyses));
}
_context = context;
}
var validator = new BuildServiceProviderValidator();
public void AnalyzeSymbol(SymbolAnalysisContext context)
{
Debug.Assert(context.Symbol.Kind == SymbolKind.NamedType);
Debug.Assert(StartupFacts.IsStartupClass(_context.StartupSymbols, (INamedTypeSymbol)context.Symbol));
foreach (var serviceAnalysis in analyses.OfType<ServicesAnalysis>())
var type = (INamedTypeSymbol)context.Symbol;
foreach (var serviceAnalysis in _context.GetRelatedAnalyses<ServicesAnalysis>(type))
{
foreach (var serviceItem in serviceAnalysis.Services)
{
if (serviceItem.UseMethod.Name == "BuildServiceProvider")
{
context.ReportDiagnostic(Diagnostic.Create(
StartupAnalzyer.BuildServiceProviderShouldNotCalledInConfigureServicesMethod,
StartupAnalzyer.Diagnostics.BuildServiceProviderShouldNotCalledInConfigureServicesMethod,
serviceItem.Operation.Syntax.GetLocation(),
serviceItem.UseMethod.Name,
serviceAnalysis.ConfigureServicesMethod.Name));
}
}
}
return validator;
}
}
}

View File

@ -15,6 +15,7 @@
<IncludeBuildOutput>false</IncludeBuildOutput>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<Nullable>Enable</Nullable>
</PropertyGroup>
<ItemGroup>

View File

@ -1,18 +1,23 @@
// 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.Immutable;
using Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Analyzers
{
internal abstract class ConfigureMethodAnalysis : StartupComputedAnalysis
internal class MiddlewareAnalysis
{
protected ConfigureMethodAnalysis(IMethodSymbol configureMethod)
: base(configureMethod.ContainingType)
public MiddlewareAnalysis(IMethodSymbol configureMethod, ImmutableArray<MiddlewareItem> middleware)
{
ConfigureMethod = configureMethod;
Middleware = middleware;
}
public INamedTypeSymbol StartupType => ConfigureMethod.ContainingType;
public IMethodSymbol ConfigureMethod { get; }
public ImmutableArray<MiddlewareItem> Middleware { get; }
}
}

View File

@ -0,0 +1,48 @@
// 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.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Operations;
namespace Microsoft.AspNetCore.Analyzers
{
internal class MiddlewareAnalyzer
{
private readonly StartupAnalysisBuilder _context;
public MiddlewareAnalyzer(StartupAnalysisBuilder context)
{
_context = context;
}
public void AnalyzeConfigureMethod(OperationBlockStartAnalysisContext context)
{
var configureMethod = (IMethodSymbol)context.OwningSymbol;
var middleware = ImmutableArray.CreateBuilder<MiddlewareItem>();
// Note: this is a simple source-order implementation. We don't attempt perform data flow
// analysis in order to determine the actual order in which middleware are ordered.
//
// This can currently be confused by things like Map(...)
context.RegisterOperationAction(context =>
{
// We're looking for usage of extension methods, so we need to look at the 'this' parameter
// rather than invocation.Instance.
if (context.Operation is IInvocationOperation invocation &&
invocation.Instance == null &&
invocation.Arguments.Length >= 1 &&
invocation.Arguments[0].Parameter?.Type == _context.StartupSymbols.IApplicationBuilder)
{
middleware.Add(new MiddlewareItem(invocation));
}
}, OperationKind.Invocation);
context.RegisterOperationBlockEndAction(context =>
{
_context.ReportAnalysis(new MiddlewareAnalysis(configureMethod, middleware.ToImmutable()));
});
}
}
}

View File

@ -1,18 +1,23 @@
// 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.Immutable;
using Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Analyzers
{
internal abstract class ConfigureServicesMethodAnalysis : StartupComputedAnalysis
internal class OptionsAnalysis
{
protected ConfigureServicesMethodAnalysis(IMethodSymbol configureServicesMethod)
: base(configureServicesMethod.ContainingType)
public OptionsAnalysis(IMethodSymbol configureServicesMethod, ImmutableArray<OptionsItem> options)
{
ConfigureServicesMethod = configureServicesMethod;
Options = options;
}
public INamedTypeSymbol StartupType => ConfigureServicesMethod.ContainingType;
public IMethodSymbol ConfigureServicesMethod { get; }
public ImmutableArray<OptionsItem> Options { get; }
}
}

View File

@ -0,0 +1,43 @@
// 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.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Operations;
namespace Microsoft.AspNetCore.Analyzers
{
internal class OptionsAnalyzer
{
private readonly StartupAnalysisBuilder _context;
public OptionsAnalyzer(StartupAnalysisBuilder context)
{
_context = context;
}
public void AnalyzeConfigureServices(OperationBlockStartAnalysisContext context)
{
var configureServicesMethod = (IMethodSymbol)context.OwningSymbol;
var options = ImmutableArray.CreateBuilder<OptionsItem>();
context.RegisterOperationAction(context =>
{
if (context.Operation is ISimpleAssignmentOperation operation &&
operation.Value.ConstantValue.HasValue &&
operation.Target is IPropertyReferenceOperation property &&
property.Property?.ContainingType?.Name != null &&
property.Property.ContainingType.Name.EndsWith("Options"))
{
options.Add(new OptionsItem(property.Property, operation.Value.ConstantValue.Value));
}
}, OperationKind.SimpleAssignment);
context.RegisterOperationBlockEndAction(context =>
{
_context.ReportAnalysis(new OptionsAnalysis(configureServicesMethod, options.ToImmutable()));
});
}
}
}

View File

@ -0,0 +1,26 @@
// 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 Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Analyzers
{
internal static class OptionsFacts
{
public static bool IsEndpointRoutingExplicitlyDisabled(OptionsAnalysis analysis)
{
for (var i = 0; i < analysis.Options.Length; i++)
{
var item = analysis.Options[i];
if (string.Equals(item.OptionsType.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat), SymbolNames.MvcOptions.MetadataName) &&
string.Equals(item.Property.Name, SymbolNames.MvcOptions.EnableEndpointRoutingPropertyName, StringComparison.Ordinal))
{
return item.ConstantValue as bool? == false;
}
}
return false;
}
}
}

View File

@ -0,0 +1,22 @@
// 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 Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Analyzers
{
internal class OptionsItem
{
public OptionsItem(IPropertySymbol property, object constantValue)
{
Property = property;
ConstantValue = constantValue;
}
public INamedTypeSymbol OptionsType => Property.ContainingType;
public IPropertySymbol Property { get; }
public object ConstantValue { get; }
}
}

View File

@ -0,0 +1,23 @@
// 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.Immutable;
using Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Analyzers
{
internal class ServicesAnalysis
{
public ServicesAnalysis(IMethodSymbol configureServicesMethod, ImmutableArray<ServicesItem> services)
{
ConfigureServicesMethod = configureServicesMethod;
Services = services;
}
public INamedTypeSymbol StartupType => ConfigureServicesMethod.ContainingType;
public IMethodSymbol ConfigureServicesMethod { get; }
public ImmutableArray<ServicesItem> Services { get; }
}
}

View File

@ -0,0 +1,43 @@
// 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.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Operations;
namespace Microsoft.AspNetCore.Analyzers
{
internal class ServicesAnalyzer
{
private readonly StartupAnalysisBuilder _context;
public ServicesAnalyzer(StartupAnalysisBuilder context)
{
_context = context;
}
public void AnalyzeConfigureServices(OperationBlockStartAnalysisContext context)
{
var configureServicesMethod = (IMethodSymbol)context.OwningSymbol;
var services = ImmutableArray.CreateBuilder<ServicesItem>();
context.RegisterOperationAction(context =>
{
// We're looking for usage of extension methods, so we need to look at the 'this' parameter
// rather than invocation.Instance.
if (context.Operation is IInvocationOperation invocation &&
invocation.Instance == null &&
invocation.Arguments.Length >= 1 &&
invocation.Arguments[0].Parameter?.Type == _context.StartupSymbols.IServiceCollection)
{
services.Add(new ServicesItem(invocation));
}
}, OperationKind.Invocation);
context.RegisterOperationBlockEndAction(context =>
{
_context.ReportAnalysis(new ServicesAnalysis(configureServicesMethod, services.ToImmutable()));
});
}
}
}

View File

@ -0,0 +1,56 @@
// 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.Immutable;
using Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Analyzers
{
internal class StartupAnalysis
{
private ImmutableDictionary<INamedTypeSymbol, ImmutableArray<object>> _analysesByType;
public StartupAnalysis(
StartupSymbols startupSymbols,
ImmutableDictionary<INamedTypeSymbol, ImmutableArray<object>> analysesByType)
{
StartupSymbols = startupSymbols;
_analysesByType = analysesByType;
}
public StartupSymbols StartupSymbols { get; }
public T? GetRelatedSingletonAnalysis<T>(INamedTypeSymbol type) where T : class
{
if (_analysesByType.TryGetValue(type, out var list))
{
for (var i = 0; i < list.Length; i++)
{
if (list[i] is T item)
{
return item;
}
}
}
return null;
}
public ImmutableArray<T> GetRelatedAnalyses<T>(INamedTypeSymbol type) where T : class
{
var items = ImmutableArray.CreateBuilder<T>();
if (_analysesByType.TryGetValue(type, out var list))
{
for (var i = 0; i < list.Length; i++)
{
if (list[i] is T item)
{
items.Add(item);
}
}
}
return items.ToImmutable();
}
}
}

View File

@ -0,0 +1,71 @@
// 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.Collections.Immutable;
using Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Analyzers
{
internal class StartupAnalysisBuilder
{
private readonly Dictionary<INamedTypeSymbol, List<object>> _analysesByType;
private readonly StartupAnalzyer _analyzer;
private readonly object _lock;
public StartupAnalysisBuilder(StartupAnalzyer analyzer, StartupSymbols startupSymbols)
{
_analyzer = analyzer;
StartupSymbols = startupSymbols;
_analysesByType = new Dictionary<INamedTypeSymbol, List<object>>();
_lock = new object();
}
public StartupSymbols StartupSymbols { get; }
public StartupAnalysis Build()
{
lock (_lock)
{
return new StartupAnalysis(
StartupSymbols,
_analysesByType.ToImmutableDictionary(
k => k.Key,
v => v.Value.ToImmutableArray()));
}
}
public void ReportAnalysis(ServicesAnalysis analysis)
{
ReportAnalysisCore(analysis.StartupType, analysis);
_analyzer.OnServicesAnalysisCompleted(analysis);
}
public void ReportAnalysis(OptionsAnalysis analysis)
{
ReportAnalysisCore(analysis.StartupType, analysis);
_analyzer.OnOptionsAnalysisCompleted(analysis);
}
public void ReportAnalysis(MiddlewareAnalysis analysis)
{
ReportAnalysisCore(analysis.StartupType, analysis);
_analyzer.OnMiddlewareAnalysisCompleted(analysis);
}
private void ReportAnalysisCore(INamedTypeSymbol type, object analysis)
{
lock (_lock)
{
if (!_analysesByType.TryGetValue(type, out var list))
{
list = new List<object>();
_analysesByType.Add(type, list);
}
list.Add(analysis);
}
}
}
}

View File

@ -0,0 +1,47 @@
// 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.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Microsoft.AspNetCore.Analyzers
{
public partial class StartupAnalzyer : DiagnosticAnalyzer
{
internal static class Diagnostics
{
public static readonly ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics;
static Diagnostics()
{
SupportedDiagnostics = ImmutableArray.Create<DiagnosticDescriptor>(new[]
{
// ASP
BuildServiceProviderShouldNotCalledInConfigureServicesMethod,
// MVC
UnsupportedUseMvcWithEndpointRouting,
});
}
internal readonly static DiagnosticDescriptor BuildServiceProviderShouldNotCalledInConfigureServicesMethod = new DiagnosticDescriptor(
"ASP0000",
"Do not call 'IServiceCollection.BuildServiceProvider' in 'ConfigureServices'",
"Calling 'BuildServiceProvider' from application code results in an additional copy of singleton services being created. Consider alternatives such as dependency injecting services as parameters to 'Configure'.",
"Design",
DiagnosticSeverity.Warning,
isEnabledByDefault: true,
helpLinkUri: "https://aka.ms/AA5k895");
internal readonly static DiagnosticDescriptor UnsupportedUseMvcWithEndpointRouting = new DiagnosticDescriptor(
"MVC1005",
"Cannot use UseMvc with Endpoint Routing.",
"Using '{0}' to configure MVC is not supported while using Endpoint Routing. To continue using '{0}', please set 'MvcOptions.EnableEndpointRounting = false' inside '{1}'.",
"Usage",
DiagnosticSeverity.Warning,
isEnabledByDefault: true,
helpLinkUri: "https://aka.ms/YJggeFn");
}
}
}

View File

@ -0,0 +1,48 @@
// 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 Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Microsoft.AspNetCore.Analyzers
{
// Events for testability. Allows us to unit test the data we gather from analysis.
public partial class StartupAnalzyer : DiagnosticAnalyzer
{
internal event EventHandler<IMethodSymbol>? ConfigureServicesMethodFound;
internal void OnConfigureServicesMethodFound(IMethodSymbol method)
{
ConfigureServicesMethodFound?.Invoke(this, method);
}
internal event EventHandler<ServicesAnalysis>? ServicesAnalysisCompleted;
internal void OnServicesAnalysisCompleted(ServicesAnalysis analysis)
{
ServicesAnalysisCompleted?.Invoke(this, analysis);
}
internal event EventHandler<OptionsAnalysis>? OptionsAnalysisCompleted;
internal void OnOptionsAnalysisCompleted(OptionsAnalysis analysis)
{
OptionsAnalysisCompleted?.Invoke(this, analysis);
}
internal event EventHandler<IMethodSymbol>? ConfigureMethodFound;
internal void OnConfigureMethodFound(IMethodSymbol method)
{
ConfigureMethodFound?.Invoke(this, method);
}
internal event EventHandler<MiddlewareAnalysis>? MiddlewareAnalysisCompleted;
internal void OnMiddlewareAnalysisCompleted(MiddlewareAnalysis analysis)
{
MiddlewareAnalysisCompleted?.Invoke(this, analysis);
}
}
}

View File

@ -0,0 +1,90 @@
// 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.Immutable;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Microsoft.AspNetCore.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public partial class StartupAnalzyer : DiagnosticAnalyzer
{
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => Diagnostics.SupportedDiagnostics;
public override void Initialize(AnalysisContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
context.EnableConcurrentExecution();
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
context.RegisterCompilationStartAction(OnCompilationStart);
}
private void OnCompilationStart(CompilationStartAnalysisContext context)
{
var symbols = new StartupSymbols(context.Compilation);
// Don't run analyzer if ASP.NET Core types cannot be found
if (!symbols.HasRequiredSymbols)
{
return;
}
context.RegisterSymbolStartAction(context =>
{
var type = (INamedTypeSymbol)context.Symbol;
if (!StartupFacts.IsStartupClass(symbols, type))
{
// Not a startup class, nothing to do.
return;
}
// This analyzer fans out a bunch of jobs. The context will capture the results of doing analysis
// on the startup code, so that other analyzers that run later can examine them.
var builder = new StartupAnalysisBuilder(this, symbols);
var services = new ServicesAnalyzer(builder);
var options = new OptionsAnalyzer(builder);
var middleware = new MiddlewareAnalyzer(builder);
context.RegisterOperationBlockStartAction(context =>
{
if (context.OwningSymbol.Kind != SymbolKind.Method)
{
return;
}
var method = (IMethodSymbol)context.OwningSymbol;
if (StartupFacts.IsConfigureServices(symbols, method))
{
OnConfigureServicesMethodFound(method);
services.AnalyzeConfigureServices(context);
options.AnalyzeConfigureServices(context);
}
if (StartupFacts.IsConfigure(symbols, method))
{
OnConfigureMethodFound(method);
middleware.AnalyzeConfigureMethod(context);
}
});
// Run after analyses have had a chance to finish to add diagnostics.
context.RegisterSymbolEndAction(context =>
{
var analysis = builder.Build();
new UseMvcAnalyzer(analysis).AnalyzeSymbol(context);
new BuildServiceProviderValidator(analysis).AnalyzeSymbol(context);
});
}, SymbolKind.NamedType);
}
}
}

View File

@ -11,6 +11,7 @@ namespace Microsoft.AspNetCore.Analyzers
{
IApplicationBuilder = compilation.GetTypeByMetadataName(SymbolNames.IApplicationBuilder.MetadataName);
IServiceCollection = compilation.GetTypeByMetadataName(SymbolNames.IServiceCollection.MetadataName);
MvcOptions = compilation.GetTypeByMetadataName(SymbolNames.MvcOptions.MetadataName);
}
public bool HasRequiredSymbols => IApplicationBuilder != null && IServiceCollection != null;
@ -18,5 +19,7 @@ namespace Microsoft.AspNetCore.Analyzers
public INamedTypeSymbol IApplicationBuilder { get; }
public INamedTypeSymbol IServiceCollection { get; }
public INamedTypeSymbol MvcOptions { get; }
}
}

View File

@ -41,5 +41,12 @@ namespace Microsoft.AspNetCore.Analyzers
public const string UseSignalRMethodName = "UseSignalR";
}
public static class MvcOptions
{
public const string MetadataName = "Microsoft.AspNetCore.Mvc.MvcOptions";
public const string EnableEndpointRoutingPropertyName = "EnableEndpointRouting";
}
}
}

View File

@ -0,0 +1,55 @@
// 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.Diagnostics;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Microsoft.AspNetCore.Analyzers
{
internal class UseMvcAnalyzer
{
private readonly StartupAnalysis _context;
public UseMvcAnalyzer(StartupAnalysis context)
{
_context = context;
}
public void AnalyzeSymbol(SymbolAnalysisContext context)
{
Debug.Assert(context.Symbol.Kind == SymbolKind.NamedType);
Debug.Assert(StartupFacts.IsStartupClass(_context.StartupSymbols, (INamedTypeSymbol)context.Symbol));
var type = (INamedTypeSymbol)context.Symbol;
var optionsAnalysis = _context.GetRelatedSingletonAnalysis<OptionsAnalysis>(type);
if (optionsAnalysis == null)
{
return;
}
// Find the middleware analysis foreach of the Configure methods defined by this class and validate.
//
// Note that this doesn't attempt to handle inheritance scenarios.
foreach (var middlewareAnalysis in _context.GetRelatedAnalyses<MiddlewareAnalysis>(type))
{
foreach (var middlewareItem in middlewareAnalysis.Middleware)
{
if (middlewareItem.UseMethod.Name == "UseMvc" || middlewareItem.UseMethod.Name == "UseMvcWithDefaultRoute")
{
// Report a diagnostic if it's unclear that the user turned off Endpoint Routing.
if (!OptionsFacts.IsEndpointRoutingExplicitlyDisabled(optionsAnalysis))
{
context.ReportDiagnostic(Diagnostic.Create(
StartupAnalzyer.Diagnostics.UnsupportedUseMvcWithEndpointRouting,
middlewareItem.Operation.Syntax.GetLocation(),
middlewareItem.UseMethod.Name,
optionsAnalysis.ConfigureServicesMethod.Name));
}
}
}
}
}
}
}

View File

@ -17,6 +17,11 @@ namespace Microsoft.AspNetCore.Analyzers
public TestSource Read(string source)
{
if (!source.EndsWith(".cs"))
{
source = source + ".cs";
}
var filePath = Path.Combine(ProjectDirectory, "TestFiles", GetType().Name, source);
if (!File.Exists(filePath))
{

View File

@ -0,0 +1,31 @@
// 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.Threading.Tasks;
using Microsoft.AspNetCore.Analyzer.Testing;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Microsoft.AspNetCore.Analyzers
{
internal class AnalyzersDiagnosticAnalyzerRunner : DiagnosticAnalyzerRunner
{
public AnalyzersDiagnosticAnalyzerRunner(DiagnosticAnalyzer analyzer)
{
Analyzer = analyzer;
}
public DiagnosticAnalyzer Analyzer { get; }
public Task<Diagnostic[]> GetDiagnosticsAsync(string source)
{
return GetDiagnosticsAsync(sources: new[] { source }, Analyzer, Array.Empty<string>());
}
public Task<Diagnostic[]> GetDiagnosticsAsync(Project project)
{
return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
}
}
}

View File

@ -1,39 +1,38 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Concurrent;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Analyzer.Testing;
using Microsoft.AspNetCore.Mvc;
using Microsoft.CodeAnalysis;
using Xunit;
namespace Microsoft.AspNetCore.Analyzers
{
public class StartupAnalyzerTest
public class StartupAnalyzerTest : AnalyzerTestBase
{
public StartupAnalyzerTest()
{
StartupAnalyzer = new StartupAnalzyer();
StartupAnalyzer.StartupFilePredicate = path => path.Equals("Test.cs", StringComparison.Ordinal);
Runner = new MvcDiagnosticAnalyzerRunner(StartupAnalyzer);
Runner = new AnalyzersDiagnosticAnalyzerRunner(StartupAnalyzer);
Analyses = new ConcurrentBag<StartupComputedAnalysis>();
Analyses = new ConcurrentBag<object>();
ConfigureServicesMethods = new ConcurrentBag<IMethodSymbol>();
ConfigureMethods = new ConcurrentBag<IMethodSymbol>();
StartupAnalyzer.AnalysisStarted += (sender, analysis) => Analyses.Add(analysis);
StartupAnalyzer.ServicesAnalysisCompleted += (sender, analysis) => Analyses.Add(analysis);
StartupAnalyzer.OptionsAnalysisCompleted += (sender, analysis) => Analyses.Add(analysis);
StartupAnalyzer.MiddlewareAnalysisCompleted += (sender, analysis) => Analyses.Add(analysis);
StartupAnalyzer.ConfigureServicesMethodFound += (sender, method) => ConfigureServicesMethods.Add(method);
StartupAnalyzer.ConfigureMethodFound += (sender, method) => ConfigureMethods.Add(method);
}
private StartupAnalzyer StartupAnalyzer { get; }
private MvcDiagnosticAnalyzerRunner Runner { get; }
private AnalyzersDiagnosticAnalyzerRunner Runner { get; }
private ConcurrentBag<StartupComputedAnalysis> Analyses { get; }
private ConcurrentBag<object> Analyses { get; }
private ConcurrentBag<IMethodSymbol> ConfigureServicesMethods { get; }
@ -43,7 +42,7 @@ namespace Microsoft.AspNetCore.Analyzers
public async Task StartupAnalyzer_FindsStartupMethods_StartupSignatures_Standard()
{
// Arrange
var source = ReadSource("StartupSignatures_Standard");
var source = Read("StartupSignatures_Standard");
// Act
var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
@ -59,7 +58,7 @@ namespace Microsoft.AspNetCore.Analyzers
public async Task StartupAnalyzer_FindsStartupMethods_StartupSignatures_MoreVariety()
{
// Arrange
var source = ReadSource("StartupSignatures_MoreVariety");
var source = Read("StartupSignatures_MoreVariety");
// Act
var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
@ -81,14 +80,14 @@ namespace Microsoft.AspNetCore.Analyzers
public async Task StartupAnalyzer_MvcOptionsAnalysis_UseMvc_FindsEndpointRoutingDisabled()
{
// Arrange
var source = ReadSource("MvcOptions_UseMvcWithDefaultRouteAndEndpointRoutingDisabled");
var source = Read("MvcOptions_UseMvcWithDefaultRouteAndEndpointRoutingDisabled");
// Act
var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
// Assert
var mvcOptionsAnalysis = Assert.Single(Analyses.OfType<MvcOptionsAnalysis>());
Assert.False(mvcOptionsAnalysis.EndpointRoutingEnabled);
var optionsAnalysis = Assert.Single(Analyses.OfType<OptionsAnalysis>());
Assert.True(OptionsFacts.IsEndpointRoutingExplicitlyDisabled(optionsAnalysis));
var middlewareAnalysis = Assert.Single(Analyses.OfType<MiddlewareAnalysis>());
var middleware = Assert.Single(middlewareAnalysis.Middleware);
@ -101,14 +100,14 @@ namespace Microsoft.AspNetCore.Analyzers
public async Task StartupAnalyzer_MvcOptionsAnalysis_AddMvcOptions_FindsEndpointRoutingDisabled()
{
// Arrange
var source = ReadSource("MvcOptions_UseMvcWithDefaultRouteAndAddMvcOptionsEndpointRoutingDisabled");
var source = Read("MvcOptions_UseMvcWithDefaultRouteAndAddMvcOptionsEndpointRoutingDisabled");
// Act
var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
// Assert
var mvcOptionsAnalysis = Assert.Single(Analyses.OfType<MvcOptionsAnalysis>());
Assert.False(mvcOptionsAnalysis.EndpointRoutingEnabled);
var optionsAnalysis = Assert.Single(Analyses.OfType<OptionsAnalysis>());
Assert.True(OptionsFacts.IsEndpointRoutingExplicitlyDisabled(optionsAnalysis));
var middlewareAnalysis = Assert.Single(Analyses.OfType<MiddlewareAnalysis>());
var middleware = Assert.Single(middlewareAnalysis.Middleware);
@ -124,14 +123,14 @@ namespace Microsoft.AspNetCore.Analyzers
public async Task StartupAnalyzer_MvcOptionsAnalysis_FindsEndpointRoutingEnabled(string sourceFileName, string mvcMiddlewareName)
{
// Arrange
var source = ReadSource(sourceFileName);
var source = Read(sourceFileName);
// Act
var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
// Assert
var mvcOptionsAnalysis = Assert.Single(Analyses.OfType<MvcOptionsAnalysis>());
Assert.Null(mvcOptionsAnalysis.EndpointRoutingEnabled);
var optionsAnalysis = Assert.Single(Analyses.OfType<OptionsAnalysis>());
Assert.False(OptionsFacts.IsEndpointRoutingExplicitlyDisabled(optionsAnalysis));
var middlewareAnalysis = Assert.Single(Analyses.OfType<MiddlewareAnalysis>());
var middleware = Assert.Single(middlewareAnalysis.Middleware);
@ -141,7 +140,7 @@ namespace Microsoft.AspNetCore.Analyzers
diagnostics,
diagnostic =>
{
Assert.Same(StartupAnalzyer.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
Assert.Same(StartupAnalzyer.Diagnostics.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
AnalyzerAssert.DiagnosticLocation(source.DefaultMarkerLocation, diagnostic.Location);
});
}
@ -150,14 +149,14 @@ namespace Microsoft.AspNetCore.Analyzers
public async Task StartupAnalyzer_MvcOptionsAnalysis_MultipleMiddleware()
{
// Arrange
var source = ReadSource("MvcOptions_UseMvcWithOtherMiddleware");
var source = Read("MvcOptions_UseMvcWithOtherMiddleware");
// Act
var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
// Assert
var mvcOptionsAnalysis = Assert.Single(Analyses.OfType<MvcOptionsAnalysis>());
Assert.Null(mvcOptionsAnalysis.EndpointRoutingEnabled);
var optionsAnalysis = Assert.Single(Analyses.OfType<OptionsAnalysis>());
Assert.False(OptionsFacts.IsEndpointRoutingExplicitlyDisabled(optionsAnalysis));
var middlewareAnalysis = Assert.Single(Analyses.OfType<MiddlewareAnalysis>());
@ -173,7 +172,7 @@ namespace Microsoft.AspNetCore.Analyzers
diagnostics,
diagnostic =>
{
Assert.Same(StartupAnalzyer.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
Assert.Same(StartupAnalzyer.Diagnostics.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
AnalyzerAssert.DiagnosticLocation(source.DefaultMarkerLocation, diagnostic.Location);
});
}
@ -182,38 +181,39 @@ namespace Microsoft.AspNetCore.Analyzers
public async Task StartupAnalyzer_MvcOptionsAnalysis_MultipleUseMvc()
{
// Arrange
var source = ReadSource("MvcOptions_UseMvcMultiple");
var source = Read("MvcOptions_UseMvcMultiple");
// Act
var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
// Assert
var mvcOptionsAnalysis = Assert.Single(Analyses.OfType<MvcOptionsAnalysis>());
Assert.Null(mvcOptionsAnalysis.EndpointRoutingEnabled);
var optionsAnalysis = Assert.Single(Analyses.OfType<OptionsAnalysis>());
Assert.False(OptionsFacts.IsEndpointRoutingExplicitlyDisabled(optionsAnalysis));
Assert.Collection(
diagnostics,
diagnostic =>
{
Assert.Same(StartupAnalzyer.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
Assert.Same(StartupAnalzyer.Diagnostics.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM1"], diagnostic.Location);
},
diagnostic =>
{
Assert.Same(StartupAnalzyer.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
Assert.Same(StartupAnalzyer.Diagnostics.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM2"], diagnostic.Location);
},
diagnostic =>
{
Assert.Same(StartupAnalzyer.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
Assert.Same(StartupAnalzyer.Diagnostics.UnsupportedUseMvcWithEndpointRouting, diagnostic.Descriptor);
AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM3"], diagnostic.Location);
});
}
[Fact]
public async Task StartupAnalyzer_ServicesAnalysis_CallBuildServiceProvider()
{
// Arrange
var source = ReadSource("ConfigureServices_BuildServiceProvider");
var source = Read("ConfigureServices_BuildServiceProvider");
// Act
var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
@ -224,13 +224,9 @@ namespace Microsoft.AspNetCore.Analyzers
Assert.Collection(diagnostics,
diagnostic =>
{
Assert.Same(StartupAnalzyer.BuildServiceProviderShouldNotCalledInConfigureServicesMethod, diagnostic.Descriptor);
Assert.Same(StartupAnalzyer.Diagnostics.BuildServiceProviderShouldNotCalledInConfigureServicesMethod, diagnostic.Descriptor);
AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM1"], diagnostic.Location);
});
}
private TestSource ReadSource(string fileName)
{
return MvcTestSource.Read(nameof(StartupAnalyzerTest), fileName);
}
}
}

View File

@ -1,254 +0,0 @@
// <auto-generated />
namespace Microsoft.AspNetCore.Antiforgery
{
using System.Globalization;
using System.Reflection;
using System.Resources;
internal static class Resources
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("Microsoft.AspNetCore.Antiforgery.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// The provided identity of type '{0}' is marked {1} = {2} but does not have a value for {3}. By default, the antiforgery system requires that all authenticated identities have a unique {3}. If it is not possible to provide a unique {3} for this identity, consider extending {4} by overriding the {5} or a custom type that can provide some form of unique identifier for the current user.
/// </summary>
internal static string AntiforgeryTokenValidator_AuthenticatedUserWithoutUsername
{
get => GetString("AntiforgeryTokenValidator_AuthenticatedUserWithoutUsername");
}
/// <summary>
/// The provided identity of type '{0}' is marked {1} = {2} but does not have a value for {3}. By default, the antiforgery system requires that all authenticated identities have a unique {3}. If it is not possible to provide a unique {3} for this identity, consider extending {4} by overriding the {5} or a custom type that can provide some form of unique identifier for the current user.
/// </summary>
internal static string FormatAntiforgeryTokenValidator_AuthenticatedUserWithoutUsername(object p0, object p1, object p2, object p3, object p4, object p5)
=> string.Format(CultureInfo.CurrentCulture, GetString("AntiforgeryTokenValidator_AuthenticatedUserWithoutUsername"), p0, p1, p2, p3, p4, p5);
/// <summary>
/// The provided antiforgery token failed a custom data check.
/// </summary>
internal static string AntiforgeryToken_AdditionalDataCheckFailed
{
get => GetString("AntiforgeryToken_AdditionalDataCheckFailed");
}
/// <summary>
/// The provided antiforgery token failed a custom data check.
/// </summary>
internal static string FormatAntiforgeryToken_AdditionalDataCheckFailed()
=> GetString("AntiforgeryToken_AdditionalDataCheckFailed");
/// <summary>
/// The provided antiforgery token was meant for a different claims-based user than the current user.
/// </summary>
internal static string AntiforgeryToken_ClaimUidMismatch
{
get => GetString("AntiforgeryToken_ClaimUidMismatch");
}
/// <summary>
/// The provided antiforgery token was meant for a different claims-based user than the current user.
/// </summary>
internal static string FormatAntiforgeryToken_ClaimUidMismatch()
=> GetString("AntiforgeryToken_ClaimUidMismatch");
/// <summary>
/// The antiforgery token could not be decrypted.
/// </summary>
internal static string AntiforgeryToken_DeserializationFailed
{
get => GetString("AntiforgeryToken_DeserializationFailed");
}
/// <summary>
/// The antiforgery token could not be decrypted.
/// </summary>
internal static string FormatAntiforgeryToken_DeserializationFailed()
=> GetString("AntiforgeryToken_DeserializationFailed");
/// <summary>
/// The antiforgery cookie token and request token do not match.
/// </summary>
internal static string AntiforgeryToken_SecurityTokenMismatch
{
get => GetString("AntiforgeryToken_SecurityTokenMismatch");
}
/// <summary>
/// The antiforgery cookie token and request token do not match.
/// </summary>
internal static string FormatAntiforgeryToken_SecurityTokenMismatch()
=> GetString("AntiforgeryToken_SecurityTokenMismatch");
/// <summary>
/// Validation of the provided antiforgery token failed. The cookie token and the request token were swapped.
/// </summary>
internal static string AntiforgeryToken_TokensSwapped
{
get => GetString("AntiforgeryToken_TokensSwapped");
}
/// <summary>
/// Validation of the provided antiforgery token failed. The cookie token and the request token were swapped.
/// </summary>
internal static string FormatAntiforgeryToken_TokensSwapped()
=> GetString("AntiforgeryToken_TokensSwapped");
/// <summary>
/// The provided antiforgery token was meant for user "{0}", but the current user is "{1}".
/// </summary>
internal static string AntiforgeryToken_UsernameMismatch
{
get => GetString("AntiforgeryToken_UsernameMismatch");
}
/// <summary>
/// The provided antiforgery token was meant for user "{0}", but the current user is "{1}".
/// </summary>
internal static string FormatAntiforgeryToken_UsernameMismatch(object p0, object p1)
=> string.Format(CultureInfo.CurrentCulture, GetString("AntiforgeryToken_UsernameMismatch"), p0, p1);
/// <summary>
/// The antiforgery cookie token is invalid.
/// </summary>
internal static string Antiforgery_CookieToken_IsInvalid
{
get => GetString("Antiforgery_CookieToken_IsInvalid");
}
/// <summary>
/// The antiforgery cookie token is invalid.
/// </summary>
internal static string FormatAntiforgery_CookieToken_IsInvalid()
=> GetString("Antiforgery_CookieToken_IsInvalid");
/// <summary>
/// The required antiforgery cookie "{0}" is not present.
/// </summary>
internal static string Antiforgery_CookieToken_MustBeProvided
{
get => GetString("Antiforgery_CookieToken_MustBeProvided");
}
/// <summary>
/// The required antiforgery cookie "{0}" is not present.
/// </summary>
internal static string FormatAntiforgery_CookieToken_MustBeProvided(object p0)
=> string.Format(CultureInfo.CurrentCulture, GetString("Antiforgery_CookieToken_MustBeProvided"), p0);
/// <summary>
/// The required antiforgery cookie token must be provided.
/// </summary>
internal static string Antiforgery_CookieToken_MustBeProvided_Generic
{
get => GetString("Antiforgery_CookieToken_MustBeProvided_Generic");
}
/// <summary>
/// The required antiforgery cookie token must be provided.
/// </summary>
internal static string FormatAntiforgery_CookieToken_MustBeProvided_Generic()
=> GetString("Antiforgery_CookieToken_MustBeProvided_Generic");
/// <summary>
/// The required antiforgery form field "{0}" is not present.
/// </summary>
internal static string Antiforgery_FormToken_MustBeProvided
{
get => GetString("Antiforgery_FormToken_MustBeProvided");
}
/// <summary>
/// The required antiforgery form field "{0}" is not present.
/// </summary>
internal static string FormatAntiforgery_FormToken_MustBeProvided(object p0)
=> string.Format(CultureInfo.CurrentCulture, GetString("Antiforgery_FormToken_MustBeProvided"), p0);
/// <summary>
/// The required antiforgery header value "{0}" is not present.
/// </summary>
internal static string Antiforgery_HeaderToken_MustBeProvided
{
get => GetString("Antiforgery_HeaderToken_MustBeProvided");
}
/// <summary>
/// The required antiforgery header value "{0}" is not present.
/// </summary>
internal static string FormatAntiforgery_HeaderToken_MustBeProvided(object p0)
=> string.Format(CultureInfo.CurrentCulture, GetString("Antiforgery_HeaderToken_MustBeProvided"), p0);
/// <summary>
/// The required antiforgery request token was not provided in either form field "{0}" or header value "{1}".
/// </summary>
internal static string Antiforgery_RequestToken_MustBeProvided
{
get => GetString("Antiforgery_RequestToken_MustBeProvided");
}
/// <summary>
/// The required antiforgery request token was not provided in either form field "{0}" or header value "{1}".
/// </summary>
internal static string FormatAntiforgery_RequestToken_MustBeProvided(object p0, object p1)
=> string.Format(CultureInfo.CurrentCulture, GetString("Antiforgery_RequestToken_MustBeProvided"), p0, p1);
/// <summary>
/// The required antiforgery request token must be provided.
/// </summary>
internal static string Antiforgery_RequestToken_MustBeProvided_Generic
{
get => GetString("Antiforgery_RequestToken_MustBeProvided_Generic");
}
/// <summary>
/// The required antiforgery request token must be provided.
/// </summary>
internal static string FormatAntiforgery_RequestToken_MustBeProvided_Generic()
=> GetString("Antiforgery_RequestToken_MustBeProvided_Generic");
/// <summary>
/// The antiforgery system has the configuration value {optionName} = {value}, but the current request is not an SSL request.
/// </summary>
internal static string Antiforgery_RequiresSSL
{
get => GetString("Antiforgery_RequiresSSL");
}
/// <summary>
/// The antiforgery system has the configuration value {optionName} = {value}, but the current request is not an SSL request.
/// </summary>
internal static string FormatAntiforgery_RequiresSSL(object optionName, object value)
=> string.Format(CultureInfo.CurrentCulture, GetString("Antiforgery_RequiresSSL", "optionName", "value"), optionName, value);
/// <summary>
/// Value cannot be null or empty.
/// </summary>
internal static string ArgumentCannotBeNullOrEmpty
{
get => GetString("ArgumentCannotBeNullOrEmpty");
}
/// <summary>
/// Value cannot be null or empty.
/// </summary>
internal static string FormatArgumentCannotBeNullOrEmpty()
=> GetString("ArgumentCannotBeNullOrEmpty");
private static string GetString(string name, params string[] formatterNames)
{
var value = _resourceManager.GetString(name);
System.Diagnostics.Debug.Assert(value != null);
if (formatterNames != null)
{
for (var i = 0; i < formatterNames.Length; i++)
{
value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
}
}
return value;
}
}
}

View File

@ -4,6 +4,7 @@
using System;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
namespace Microsoft.AspNetCore.Components.Analyzers
{
@ -85,5 +86,26 @@ namespace Microsoft.AspNetCore.Components.Analyzers
return property.GetAttributes().Any(a => a.AttributeClass == symbols.CascadingParameterAttribute);
}
public static bool IsComponent(ComponentSymbols symbols, Compilation compilation, INamedTypeSymbol type)
{
if (symbols is null)
{
throw new ArgumentNullException(nameof(symbols));
}
if (type is null)
{
throw new ArgumentNullException(nameof(type));
}
var conversion = compilation.ClassifyConversion(symbols.IComponentType, type);
if (!conversion.Exists || !conversion.IsExplicit)
{
return false;
}
return true;
}
}
}

View File

@ -0,0 +1,104 @@
// 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.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Operations;
namespace Microsoft.AspNetCore.Components.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ComponentParameterUsageAnalyzer : DiagnosticAnalyzer
{
public ComponentParameterUsageAnalyzer()
{
SupportedDiagnostics = ImmutableArray.Create(new[]
{
DiagnosticDescriptors.ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent,
});
}
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
public override void Initialize(AnalysisContext context)
{
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
context.RegisterCompilationStartAction(context =>
{
if (!ComponentSymbols.TryCreate(context.Compilation, out var symbols))
{
// Types we need are not defined.
return;
}
context.RegisterOperationBlockStartAction(startBlockContext =>
{
startBlockContext.RegisterOperationAction(context =>
{
var assignmentOperation = (IAssignmentOperation)context.Operation;
var leftHandSide = assignmentOperation.Target;
if (leftHandSide == null)
{
// Malformed assignment, no left hand side.
return;
}
if (leftHandSide.Kind != OperationKind.PropertyReference)
{
// We don't want to capture situations where a user does
// MyOtherProperty = aComponent.SomeParameter
return;
}
var propertyReference = (IPropertyReferenceOperation)leftHandSide;
var componentProperty = (IPropertySymbol)propertyReference.Member;
if (!ComponentFacts.IsParameter(symbols, componentProperty))
{
// This is not a property reference that we care about, it is not decorated with [Parameter].
return;
}
var propertyContainingType = componentProperty.ContainingType;
if (!ComponentFacts.IsComponent(symbols, context.Compilation, propertyContainingType))
{
// Someone referenced a property as [Parameter] inside something that is not a component.
return;
}
var assignmentContainingType = startBlockContext.OwningSymbol?.ContainingType;
if (assignmentContainingType == null)
{
// Assignment location has no containing type. Most likely we're operating on malformed code, don't try and validate.
return;
}
var conversion = context.Compilation.ClassifyConversion(propertyContainingType, assignmentContainingType);
if (conversion.Exists && conversion.IsIdentity)
{
// The assignment is taking place inside of the declaring component.
return;
}
if (conversion.Exists && conversion.IsExplicit)
{
// The assignment is taking place within the components type hierarchy. This means the user is setting this in a supported
// scenario.
return;
}
// At this point the user is referencing a component parameter outside of its declaring class.
context.ReportDiagnostic(Diagnostic.Create(
DiagnosticDescriptors.ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent,
propertyReference.Syntax.GetLocation(),
propertyReference.Member.Name));
}, OperationKind.SimpleAssignment, OperationKind.CompoundAssignment, OperationKind.CoalesceAssignment);
});
});
}
}
}

View File

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Components.Analyzers
@ -30,6 +29,13 @@ namespace Microsoft.AspNetCore.Components.Analyzers
return false;
}
var icomponentType = compilation.GetTypeByMetadataName(ComponentsApi.IComponent.MetadataName);
if (icomponentType == null)
{
symbols = null;
return false;
}
var dictionary = compilation.GetTypeByMetadataName("System.Collections.Generic.Dictionary`2");
var @string = compilation.GetSpecialType(SpecialType.System_String);
var @object = compilation.GetSpecialType(SpecialType.System_Object);
@ -41,18 +47,24 @@ namespace Microsoft.AspNetCore.Components.Analyzers
var parameterCaptureUnmatchedValuesRuntimeType = dictionary.Construct(@string, @object);
symbols = new ComponentSymbols(parameterAttribute, cascadingParameterAttribute, parameterCaptureUnmatchedValuesRuntimeType);
symbols = new ComponentSymbols(
parameterAttribute,
cascadingParameterAttribute,
parameterCaptureUnmatchedValuesRuntimeType,
icomponentType);
return true;
}
private ComponentSymbols(
INamedTypeSymbol parameterAttribute,
INamedTypeSymbol cascadingParameterAttribute,
INamedTypeSymbol parameterCaptureUnmatchedValuesRuntimeType)
INamedTypeSymbol parameterCaptureUnmatchedValuesRuntimeType,
INamedTypeSymbol icomponentType)
{
ParameterAttribute = parameterAttribute;
CascadingParameterAttribute = cascadingParameterAttribute;
ParameterCaptureUnmatchedValuesRuntimeType = parameterCaptureUnmatchedValuesRuntimeType;
IComponentType = icomponentType;
}
public INamedTypeSymbol ParameterAttribute { get; }
@ -61,5 +73,7 @@ namespace Microsoft.AspNetCore.Components.Analyzers
public INamedTypeSymbol ParameterCaptureUnmatchedValuesRuntimeType { get; }
public INamedTypeSymbol CascadingParameterAttribute { get; }
public INamedTypeSymbol IComponentType { get; }
}
}

View File

@ -22,5 +22,11 @@ namespace Microsoft.AspNetCore.Components.Analyzers
public static readonly string FullTypeName = "Microsoft.AspNetCore.Components.CascadingParameterAttribute";
public static readonly string MetadataName = FullTypeName;
}
public static class IComponent
{
public static readonly string FullTypeName = "Microsoft.AspNetCore.Components.IComponent";
public static readonly string MetadataName = FullTypeName;
}
}
}

View File

@ -46,5 +46,14 @@ namespace Microsoft.AspNetCore.Components.Analyzers
DiagnosticSeverity.Warning,
isEnabledByDefault: true,
description: new LocalizableResourceString(nameof(Resources.ComponentParametersShouldBePublic_Description), Resources.ResourceManager, typeof(Resources)));
public static readonly DiagnosticDescriptor ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent = new DiagnosticDescriptor(
"BL0005",
new LocalizableResourceString(nameof(Resources.ComponentParameterShouldNotBeSetOutsideOfTheirDeclaredComponent_Title), Resources.ResourceManager, typeof(Resources)),
new LocalizableResourceString(nameof(Resources.ComponentParameterShouldNotBeSetOutsideOfTheirDeclaredComponent_Format), Resources.ResourceManager, typeof(Resources)),
"Usage",
DiagnosticSeverity.Warning,
isEnabledByDefault: true,
description: new LocalizableResourceString(nameof(Resources.ComponentParameterShouldNotBeSetOutsideOfTheirDeclaredComponent_Description), Resources.ResourceManager, typeof(Resources)));
}
}

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
@ -20,17 +20,4 @@
<None Include="build/netstandard2.0/*" Pack="true" PackagePath="build/netstandard2.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<EmbeddedResource Update="Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@ -1,180 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.AspNetCore.Components.Analyzers {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.AspNetCore.Components.Analyzers.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Component parameters with CaptureUnmatchedValues must be a correct type..
/// </summary>
internal static string ComponentParameterCaptureUnmatchedValuesHasWrongType_Description {
get {
return ResourceManager.GetString("ComponentParameterCaptureUnmatchedValuesHasWrongType_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component parameter &apos;{0}&apos; defines CaptureUnmatchedValues but has an unsupported type &apos;{1}&apos;. Use a type assignable from &apos;{2}&apos;..
/// </summary>
internal static string ComponentParameterCaptureUnmatchedValuesHasWrongType_Format {
get {
return ResourceManager.GetString("ComponentParameterCaptureUnmatchedValuesHasWrongType_Format", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component parameter with CaptureUnmatchedValues has the wrong type.
/// </summary>
internal static string ComponentParameterCaptureUnmatchedValuesHasWrongType_Title {
get {
return ResourceManager.GetString("ComponentParameterCaptureUnmatchedValuesHasWrongType_Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Components may only define a single parameter with CaptureUnmatchedValues..
/// </summary>
internal static string ComponentParameterCaptureUnmatchedValuesMustBeUnique_Description {
get {
return ResourceManager.GetString("ComponentParameterCaptureUnmatchedValuesMustBeUnique_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component type &apos;{0}&apos; defines properties multiple parameters with CaptureUnmatchedValues. Properties: {1}{2}.
/// </summary>
internal static string ComponentParameterCaptureUnmatchedValuesMustBeUnique_Format {
get {
return ResourceManager.GetString("ComponentParameterCaptureUnmatchedValuesMustBeUnique_Format", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component has multiple CaptureUnmatchedValues parameters.
/// </summary>
internal static string ComponentParameterCaptureUnmatchedValuesMustBeUnique_Title {
get {
return ResourceManager.GetString("ComponentParameterCaptureUnmatchedValuesMustBeUnique_Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component parameters should have public setters..
/// </summary>
internal static string ComponentParameterSettersShouldBePublic_Description {
get {
return ResourceManager.GetString("ComponentParameterSettersShouldBePublic_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component parameter &apos;{0}&apos; should have a public setter..
/// </summary>
internal static string ComponentParameterSettersShouldBePublic_Format {
get {
return ResourceManager.GetString("ComponentParameterSettersShouldBePublic_Format", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component parameter should have public setters..
/// </summary>
internal static string ComponentParameterSettersShouldBePublic_Title {
get {
return ResourceManager.GetString("ComponentParameterSettersShouldBePublic_Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component parameter &apos;{0}&apos; should be public..
/// </summary>
internal static string ComponentParameterShouldBePublic_Format {
get {
return ResourceManager.GetString("ComponentParameterShouldBePublic_Format", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component parameter should be public..
/// </summary>
internal static string ComponentParameterShouldBePublic_Title {
get {
return ResourceManager.GetString("ComponentParameterShouldBePublic_Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Component parameters should be public..
/// </summary>
internal static string ComponentParametersShouldBePublic_Description {
get {
return ResourceManager.GetString("ComponentParametersShouldBePublic_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Make component parameters public..
/// </summary>
internal static string ComponentParametersShouldBePublic_FixTitle {
get {
return ResourceManager.GetString("ComponentParametersShouldBePublic_FixTitle", resourceCulture);
}
}
}
}

View File

@ -156,4 +156,13 @@
<data name="ComponentParametersShouldBePublic_FixTitle" xml:space="preserve">
<value>Make component parameters public.</value>
</data>
<data name="ComponentParameterShouldNotBeSetOutsideOfTheirDeclaredComponent_Description" xml:space="preserve">
<value>Component parameters should not be set outside of their declared component. Doing so may result in unexpected behavior at runtime.</value>
</data>
<data name="ComponentParameterShouldNotBeSetOutsideOfTheirDeclaredComponent_Format" xml:space="preserve">
<value>Component parameter '{0}' should not be set outside of its component.</value>
</data>
<data name="ComponentParameterShouldNotBeSetOutsideOfTheirDeclaredComponent_Title" xml:space="preserve">
<value>Component parameter should not be set outside of its component.</value>
</data>
</root>

View File

@ -0,0 +1,298 @@
// 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 Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using TestHelper;
using Xunit;
namespace Microsoft.AspNetCore.Components.Analyzers
{
public class ComponentParameterUsageAnalyzerTest : DiagnosticVerifier
{
public ComponentParameterUsageAnalyzerTest()
{
ComponentTestSource = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class TestComponent : IComponent
{{
[Parameter] public string TestProperty {{ get; set; }}
public string NonParameter {{ get; set; }}
}}
}}" + ComponentsTestDeclarations.Source;
}
private string ComponentTestSource { get; }
[Fact]
public void ComponentPropertySimpleAssignment_Warns()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class OtherComponent : IComponent
{{
private TestComponent _testComponent;
void Render()
{{
_testComponent = new TestComponent();
_testComponent.TestProperty = ""Hello World"";
}}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test,
new DiagnosticResult
{
Id = DiagnosticDescriptors.ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent.Id,
Message = "Component parameter 'TestProperty' should not be set outside of its component.",
Severity = DiagnosticSeverity.Warning,
Locations = new[]
{
new DiagnosticResultLocation("Test0.cs", 11, 17)
}
});
}
[Fact]
public void ComponentPropertyCoalesceAssignment__Warns()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class OtherComponent : IComponent
{{
private TestComponent _testComponent;
void Render()
{{
_testComponent = new TestComponent();
_testComponent.TestProperty ??= ""Hello World"";
}}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test,
new DiagnosticResult
{
Id = DiagnosticDescriptors.ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent.Id,
Message = "Component parameter 'TestProperty' should not be set outside of its component.",
Severity = DiagnosticSeverity.Warning,
Locations = new[]
{
new DiagnosticResultLocation("Test0.cs", 11, 17)
}
});
}
[Fact]
public void ComponentPropertyCompoundAssignment__Warns()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class OtherComponent : IComponent
{{
private TestComponent _testComponent;
void Render()
{{
_testComponent = new TestComponent();
_testComponent.TestProperty += ""Hello World"";
}}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test,
new DiagnosticResult
{
Id = DiagnosticDescriptors.ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent.Id,
Message = "Component parameter 'TestProperty' should not be set outside of its component.",
Severity = DiagnosticSeverity.Warning,
Locations = new[]
{
new DiagnosticResultLocation("Test0.cs", 11, 17)
}
});
}
[Fact]
public void ComponentPropertyExpression_Ignores()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class TypeName
{{
void Method()
{{
System.IO.Console.WriteLine(new TestComponent().TestProperty);
}}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test);
}
[Fact]
public void ComponentPropertyExpressionInStatement_Ignores()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class TypeName
{{
void Method()
{{
var testComponent = new TestComponent();
for (var i = 0; i < testComponent.TestProperty.Length; i++)
{{
}}
}}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test);
}
[Fact]
public void RetrievalOfComponentPropertyValueInAssignment_Ignores()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class TypeName
{{
void Method()
{{
var testComponent = new TestComponent();
AnotherProperty = testComponent.TestProperty;
}}
public string AnotherProperty {{ get; set; }}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test);
}
[Fact]
public void ShadowedComponentPropertyAssignment_Ignores()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class TypeName
{{
void Method()
{{
var testComponent = new InheritedComponent();
testComponent.TestProperty = ""Hello World"";
}}
}}
class InheritedComponent : TestComponent
{{
public new string TestProperty {{ get; set; }}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test);
}
[Fact]
public void InheritedImplicitComponentPropertyAssignment_Ignores()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class TypeName : TestComponent
{{
void Method()
{{
this.TestProperty = ""Hello World"";
}}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test);
}
[Fact]
public void ImplicitComponentPropertyAssignment_Ignores()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class TypeName : IComponent
{{
void Method()
{{
TestProperty = ""Hello World"";
}}
[Parameter] public string TestProperty {{ get; set; }}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test);
}
[Fact]
public void ComponentPropertyAssignment_NonParameter_Ignores()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class OtherComponent : IComponent
{{
private TestComponent _testComponent;
void Render()
{{
_testComponent = new TestComponent();
_testComponent.NonParameter = ""Hello World"";
}}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test);
}
[Fact]
public void NonComponentPropertyAssignment_Ignores()
{
var test = $@"
namespace ConsoleApplication1
{{
using {typeof(ParameterAttribute).Namespace};
class OtherComponent : IComponent
{{
private SomethingElse _testNonComponent;
void Render()
{{
_testNonComponent = new NotAComponent();
_testNonComponent.TestProperty = ""Hello World"";
}}
}}
class NotAComponent
{{
[Parameter] public string TestProperty {{ get; set; }}
}}
}}" + ComponentTestSource;
VerifyCSharpDiagnostic(test);
}
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() => new ComponentParameterUsageAnalyzer();
}
}

View File

@ -16,6 +16,10 @@ namespace Microsoft.AspNetCore.Components.Analyzers
public class {typeof(CascadingParameterAttribute).Name} : System.Attribute
{{
}}
public interface {typeof(IComponent).Name}
{{
}}
}}
";
}

View File

@ -62,7 +62,7 @@ namespace Microsoft.AspNetCore.Blazor.Rendering
public override Microsoft.AspNetCore.Components.Dispatcher Dispatcher { get { throw null; } }
public System.Threading.Tasks.Task AddComponentAsync(System.Type componentType, string domElementSelector) { throw null; }
public System.Threading.Tasks.Task AddComponentAsync<TComponent>(string domElementSelector) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
public override System.Threading.Tasks.Task DispatchEventAsync(int eventHandlerId, Microsoft.AspNetCore.Components.Rendering.EventFieldInfo eventFieldInfo, Microsoft.AspNetCore.Components.UIEventArgs eventArgs) { throw null; }
public override System.Threading.Tasks.Task DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.Rendering.EventFieldInfo eventFieldInfo, Microsoft.AspNetCore.Components.UIEventArgs eventArgs) { throw null; }
protected override void Dispose(bool disposing) { }
protected override void HandleException(System.Exception exception) { }
protected override System.Threading.Tasks.Task UpdateDisplayAsync(in Microsoft.AspNetCore.Components.Rendering.RenderBatch batch) { throw null; }

View File

@ -120,7 +120,7 @@ namespace Microsoft.AspNetCore.Blazor.Rendering
}
/// <inheritdoc />
public override Task DispatchEventAsync(int eventHandlerId, EventFieldInfo eventFieldInfo, UIEventArgs eventArgs)
public override Task DispatchEventAsync(ulong eventHandlerId, EventFieldInfo eventFieldInfo, UIEventArgs eventArgs)
{
// Be sure we only run one event handler at once. Although they couldn't run
// simultaneously anyway (there's only one thread), they could run nested on
@ -183,12 +183,12 @@ namespace Microsoft.AspNetCore.Blazor.Rendering
readonly struct IncomingEventInfo
{
public readonly int EventHandlerId;
public readonly ulong EventHandlerId;
public readonly EventFieldInfo EventFieldInfo;
public readonly UIEventArgs EventArgs;
public readonly TaskCompletionSource<object> TaskCompletionSource;
public IncomingEventInfo(int eventHandlerId, EventFieldInfo eventFieldInfo, UIEventArgs eventArgs)
public IncomingEventInfo(ulong eventHandlerId, EventFieldInfo eventFieldInfo, UIEventArgs eventArgs)
{
EventHandlerId = eventHandlerId;
EventFieldInfo = eventFieldInfo;

View File

@ -26,6 +26,9 @@
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<DeployProjectOutput Condition="'$(ContinuousIntegrationBuild)' == 'true'">false</DeployProjectOutput>
<DisablePackageReferenceRestrictions>true</DisablePackageReferenceRestrictions>
<!-- The Resources.resx is a embedded resource -->
<GenerateResxSource>false</GenerateResxSource>
</PropertyGroup>
<!--

View File

@ -31,10 +31,10 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
int Value { get; set; }
public int Value { get; set; }
[Parameter]
Action<int> ValueChanged { get; set; }
public Action<int> ValueChanged { get; set; }
}
}"));
@ -105,10 +105,10 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
int Value { get; set; }
public int Value { get; set; }
[Parameter]
Action<int> OnChanged { get; set; }
public Action<int> OnChanged { get; set; }
}
}"));

View File

@ -25,7 +25,7 @@ namespace Test
}
[Parameter]
RenderFragment ChildContent { get; set; }
public RenderFragment ChildContent { get; set; }
}
}
");
@ -43,10 +43,10 @@ namespace Test
}
[Parameter]
RenderFragment<string> ChildContent { get; set; }
public RenderFragment<string> ChildContent { get; set; }
[Parameter]
string Value { get; set; }
public string Value { get; set; }
}
}
");
@ -66,19 +66,19 @@ namespace Test
}
[Parameter]
string Name { get; set; }
public string Name { get; set; }
[Parameter]
RenderFragment<string> Header { get; set; }
public RenderFragment<string> Header { get; set; }
[Parameter]
RenderFragment<string> ChildContent { get; set; }
public RenderFragment<string> ChildContent { get; set; }
[Parameter]
RenderFragment Footer { get; set; }
public RenderFragment Footer { get; set; }
[Parameter]
string Value { get; set; }
public string Value { get; set; }
}
}
");

View File

@ -62,10 +62,10 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter] int IntProperty { get; set; }
[Parameter] bool BoolProperty { get; set; }
[Parameter] string StringProperty { get; set; }
[Parameter] SomeType ObjectProperty { get; set; }
[Parameter] public int IntProperty { get; set; }
[Parameter] public bool BoolProperty { get; set; }
[Parameter] public string StringProperty { get; set; }
[Parameter] public SomeType ObjectProperty { get; set; }
}
}
"));
@ -135,7 +135,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
string StringProperty { get; set; }
public string StringProperty { get; set; }
}
}
"));
@ -208,7 +208,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
Action<UIMouseEventArgs> OnClick { get; set; }
public Action<UIMouseEventArgs> OnClick { get; set; }
}
}
"));
@ -253,7 +253,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
Action<UIEventArgs> OnClick { get; set; }
public Action<UIEventArgs> OnClick { get; set; }
}
}
"));
@ -298,7 +298,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
bool BoolProperty { get; set; }
public bool BoolProperty { get; set; }
}
}"));
@ -326,10 +326,10 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
string MyAttr { get; set; }
public string MyAttr { get; set; }
[Parameter]
RenderFragment ChildContent { get; set; }
public RenderFragment ChildContent { get; set; }
}
}
"));
@ -370,7 +370,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
RenderFragment ChildContent { get; set; }
public RenderFragment ChildContent { get; set; }
}
}
"));
@ -416,7 +416,7 @@ namespace Test
{
public class SurveyPrompt : ComponentBase
{
[Parameter] private string Title { get; set; }
[Parameter] public string Title { get; set; }
}
}
"));
@ -508,7 +508,7 @@ namespace Test
public class MyComponent : ComponentBase
{
[Parameter]
RenderFragment ChildContent { get; set; }
public RenderFragment ChildContent { get; set; }
}
}
"));
@ -571,9 +571,9 @@ namespace Test
{
public class Repeater : ComponentBase
{
[Parameter] int Count { get; set; }
[Parameter] RenderFragment<string> Template { get; set; }
[Parameter] string Value { get; set; }
[Parameter] public int Count { get; set; }
[Parameter] public RenderFragment<string> Template { get; set; }
[Parameter] public string Value { get; set; }
protected override void BuildRenderTree(RenderTreeBuilder builder)
{

View File

@ -132,8 +132,8 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
var serviceProvider = new TestServiceProvider();
serviceProvider.AddService<IMyService1>(new MyService1Impl());
serviceProvider.AddService<IMyService2>(new MyService2Impl());
var componentFactory = new ComponentFactory(serviceProvider);
var component = componentFactory.InstantiateComponent(componentType);
var componentFactory = new ComponentFactory();
var component = componentFactory.InstantiateComponent(serviceProvider, componentType);
var frames = GetRenderTree(component);
// Assert 2: Rendered component behaves correctly
@ -147,9 +147,9 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
public class TestLayout : IComponent
{
[Parameter]
RenderFragment Body { get; set; }
public RenderFragment Body { get; set; }
public void Configure(RenderHandle renderHandle)
public void Attach(RenderHandle renderHandle)
{
}

View File

@ -41,10 +41,10 @@ namespace Test
}
[Parameter]
List<TItem> Items { get; set; }
public List<TItem> Items { get; set; }
[Parameter]
RenderFragment<Context> ChildContent { get; set; }
public RenderFragment<Context> ChildContent { get; set; }
public class Context
{
@ -70,13 +70,13 @@ namespace Test
}
[Parameter]
TItem1 Item1 { get; set; }
public TItem1 Item1 { get; set; }
[Parameter]
TItem2 Item2 { get; set; }
public TItem2 Item2 { get; set; }
[Parameter]
TItem3 Item3 { get; set; }
public TItem3 Item3 { get; set; }
}
}
");
@ -224,7 +224,7 @@ namespace Test
<GenericContext Items=""@MyItems"" @ref=""_my"" @ref:suppressField />
@code {
[Parameter] List<TItem> MyItems { get; set; }
[Parameter] public List<TItem> MyItems { get; set; }
GenericContext<TItem> _my;
void Foo() { GC.KeepAlive(_my); }
}");

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
{
public class RuntimeDependenciesResolverTest
{
[ConditionalFact]
[ConditionalFact(Skip = " https://github.com/aspnet/AspNetCore/issues/12059")]
[SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/10426")]
public void FindsReferenceAssemblyGraph_ForStandaloneApp()
{
@ -73,6 +73,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
"StandaloneApp.dll",
"StandaloneApp.pdb",
"System.dll",
"System.Buffers.dll",
"System.Collections.Concurrent.dll",
"System.Collections.dll",
"System.ComponentModel.Composition.dll",

View File

@ -33,7 +33,7 @@ namespace Microsoft.AspNetCore.Blazor.DevServer.Server
options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[]
{
MediaTypeNames.Application.Octet,
WasmMediaTypeNames.Application.Wasm
"application/wasm",
});
});
}

View File

@ -13,7 +13,6 @@
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="$(TemplateBlazorPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="$(TemplateBlazorPackageVersion)" PrivateAssets="all" />
</ItemGroup>
</ItemGroup>
<!--#if Hosted -->
<ItemGroup>
<ProjectReference Include="..\Shared\BlazorWasm-CSharp.Shared.csproj" />

View File

@ -11,5 +11,5 @@
@code {
// Demonstrates how a parent component can supply parameters
[Parameter] string Title { get; set; }
[Parameter] public string Title { get; set; }
}

View File

@ -44,7 +44,7 @@ else
}
@code {
[Parameter] DateTime StartDate { get; set; }
[Parameter] public DateTime StartDate { get; set; }
WeatherForecast[] forecasts;

View File

@ -99,7 +99,7 @@ namespace Microsoft.AspNetCore.Components
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public T Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
}
@ -114,7 +114,7 @@ namespace Microsoft.AspNetCore.Components
public System.Type Page { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public System.Collections.Generic.IDictionary<string, object> PageParameters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
}
}
@ -255,7 +255,7 @@ namespace Microsoft.AspNetCore.Components.Routing
public RenderFragment ChildContent { get; set; }
[Microsoft.AspNetCore.Components.ParameterAttribute]
public Microsoft.AspNetCore.Components.Routing.NavLinkMatch Match { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public void Dispose() { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }
}
@ -271,7 +271,7 @@ namespace Microsoft.AspNetCore.Components.Routing
public Microsoft.AspNetCore.Components.RenderFragment<AuthenticationState> NotAuthorizedContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
[Microsoft.AspNetCore.Components.ParameterAttribute]
public Microsoft.AspNetCore.Components.RenderFragment AuthorizingContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; }}
public void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public void Dispose() { }
protected virtual void Render(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder, System.Type handler, System.Collections.Generic.IDictionary<string, object> parameters) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters) { throw null; }

View File

@ -25,6 +25,53 @@ namespace Microsoft.AspNetCore.Components
public static partial class BindAttributes
{
}
public static partial class BindConverter
{
public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(System.DateTime value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(System.DateTime value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(System.DateTimeOffset value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(System.DateTimeOffset value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(decimal value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(double value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(int value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(long value, System.Globalization.CultureInfo culture = null) { throw null; }
public static bool? FormatValue(bool? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(System.DateTimeOffset? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(System.DateTimeOffset? value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(System.DateTime? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(System.DateTime? value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(decimal? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(double? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(int? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(long? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(float? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(float value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(string value, System.Globalization.CultureInfo culture = null) { throw null; }
public static object FormatValue<T>(T value, System.Globalization.CultureInfo culture = null) { throw null; }
public static bool TryConvertToBool(object obj, System.Globalization.CultureInfo culture, out bool value) { throw null; }
public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime value) { throw null; }
public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime value) { throw null; }
public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset value) { throw null; }
public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset value) { throw null; }
public static bool TryConvertToDecimal(object obj, System.Globalization.CultureInfo culture, out decimal value) { throw null; }
public static bool TryConvertToDouble(object obj, System.Globalization.CultureInfo culture, out double value) { throw null; }
public static bool TryConvertToFloat(object obj, System.Globalization.CultureInfo culture, out float value) { throw null; }
public static bool TryConvertToInt(object obj, System.Globalization.CultureInfo culture, out int value) { throw null; }
public static bool TryConvertToLong(object obj, System.Globalization.CultureInfo culture, out long value) { throw null; }
public static bool TryConvertToNullableBool(object obj, System.Globalization.CultureInfo culture, out bool? value) { throw null; }
public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime? value) { throw null; }
public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime? value) { throw null; }
public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset? value) { throw null; }
public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset? value) { throw null; }
public static bool TryConvertToNullableDecimal(object obj, System.Globalization.CultureInfo culture, out decimal? value) { throw null; }
public static bool TryConvertToNullableDouble(object obj, System.Globalization.CultureInfo culture, out double? value) { throw null; }
public static bool TryConvertToNullableFloat(object obj, System.Globalization.CultureInfo culture, out float? value) { throw null; }
public static bool TryConvertToNullableInt(object obj, System.Globalization.CultureInfo culture, out int? value) { throw null; }
public static bool TryConvertToNullableLong(object obj, System.Globalization.CultureInfo culture, out long? value) { throw null; }
public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; }
public static bool TryConvertTo<T>(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed partial class BindElementAttribute : System.Attribute
{
@ -63,7 +110,7 @@ namespace Microsoft.AspNetCore.Components
protected virtual void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
protected System.Threading.Tasks.Task InvokeAsync(System.Action workItem) { throw null; }
protected System.Threading.Tasks.Task InvokeAsync(System.Func<System.Threading.Tasks.Task> workItem) { throw null; }
void Microsoft.AspNetCore.Components.IComponent.Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
void Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; }
System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) { throw null; }
protected virtual void OnAfterRender() { }
@ -104,6 +151,11 @@ namespace Microsoft.AspNetCore.Components
public string __internalId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ElementReference
{
private readonly object _dummy;
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct EventCallback
{
private readonly object _dummy;
@ -307,7 +359,7 @@ namespace Microsoft.AspNetCore.Components
}
public partial interface IComponent
{
void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle);
void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle);
System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters);
}
public partial interface IComponentContext
@ -347,7 +399,7 @@ namespace Microsoft.AspNetCore.Components
{
protected LayoutComponentBase() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
protected Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct MarkupString
@ -672,7 +724,7 @@ namespace Microsoft.AspNetCore.Components.Rendering
{
private readonly object _dummy;
public Microsoft.AspNetCore.Components.RenderTree.ArrayRange<int> DisposedComponentIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public Microsoft.AspNetCore.Components.RenderTree.ArrayRange<int> DisposedEventHandlerIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public Microsoft.AspNetCore.Components.RenderTree.ArrayRange<ulong> DisposedEventHandlerIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public Microsoft.AspNetCore.Components.RenderTree.ArrayRange<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame> ReferenceFrames { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public Microsoft.AspNetCore.Components.RenderTree.ArrayRange<Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiff> UpdatedComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
}
@ -683,7 +735,7 @@ namespace Microsoft.AspNetCore.Components.Rendering
public event System.UnhandledExceptionEventHandler UnhandledSynchronizationException { add { } remove { } }
protected internal virtual void AddToRenderQueue(int componentId, Microsoft.AspNetCore.Components.RenderFragment renderFragment) { }
protected internal int AssignRootComponentId(Microsoft.AspNetCore.Components.IComponent component) { throw null; }
public virtual System.Threading.Tasks.Task DispatchEventAsync(int eventHandlerId, Microsoft.AspNetCore.Components.Rendering.EventFieldInfo fieldInfo, Microsoft.AspNetCore.Components.UIEventArgs eventArgs) { throw null; }
public virtual System.Threading.Tasks.Task DispatchEventAsync(ulong eventHandlerId, Microsoft.AspNetCore.Components.Rendering.EventFieldInfo fieldInfo, Microsoft.AspNetCore.Components.UIEventArgs eventArgs) { throw null; }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
protected abstract void HandleException(System.Exception exception);
@ -716,7 +768,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree
public ArrayRange(T[] array, int count) { throw null; }
public Microsoft.AspNetCore.Components.RenderTree.ArrayRange<T> Clone() { throw null; }
}
public partial class RenderTreeBuilder
public partial class RenderTreeBuilder : System.IDisposable
{
public const string ChildContent = "ChildContent";
public RenderTreeBuilder(Microsoft.AspNetCore.Components.Rendering.Renderer renderer) { }
@ -747,6 +799,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree
public void OpenElement(int sequence, string elementName) { }
public void SetKey(object value) { }
public void SetUpdatesAttributeName(string updatesAttributeName) { }
void System.IDisposable.Dispose() { }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct RenderTreeDiff
@ -781,17 +834,17 @@ namespace Microsoft.AspNetCore.Components.RenderTree
PermutationListEntry = 9,
PermutationListEnd = 10,
}
public enum RenderTreeFrameType
public enum RenderTreeFrameType : short
{
None = 0,
Element = 1,
Text = 2,
Attribute = 3,
Component = 4,
Region = 5,
ElementReferenceCapture = 6,
ComponentReferenceCapture = 7,
Markup = 8,
None = (short)0,
Element = (short)1,
Text = (short)2,
Attribute = (short)3,
Component = (short)4,
Region = (short)5,
ElementReferenceCapture = (short)6,
ComponentReferenceCapture = (short)7,
Markup = (short)8,
}
}
namespace Microsoft.AspNetCore.Components.Routing

View File

@ -102,10 +102,27 @@ namespace Microsoft.AspNetCore.Components
private async Task<bool> IsAuthorizedAsync(ClaimsPrincipal user)
{
var authorizeData = GetAuthorizeData();
EnsureNoAuthenticationSchemeSpecified(authorizeData);
var policy = await AuthorizationPolicy.CombineAsync(
AuthorizationPolicyProvider, authorizeData);
var result = await AuthorizationService.AuthorizeAsync(user, Resource, policy);
return result.Succeeded;
}
private static void EnsureNoAuthenticationSchemeSpecified(IAuthorizeData[] authorizeData)
{
// It's not meaningful to specify a nonempty scheme, since by the time Components
// authorization runs, we already have a specific ClaimsPrincipal (we're stateful).
// To avoid any confusion, ensure the developer isn't trying to specify a scheme.
for (var i = 0; i < authorizeData.Length; i++)
{
var entry = authorizeData[i];
if (!string.IsNullOrEmpty(entry.AuthenticationSchemes))
{
throw new NotSupportedException($"The authorization data specifies an authentication scheme with value '{entry.AuthenticationSchemes}'. Authentication schemes cannot be specified for components.");
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Components
bool ICascadingValueComponent.CurrentValueIsFixed => IsFixed;
/// <inheritdoc />
public void Configure(RenderHandle renderHandle)
public void Attach(RenderHandle renderHandle)
{
_renderHandle = renderHandle;
}

View File

@ -158,7 +158,7 @@ namespace Microsoft.AspNetCore.Components
protected Task InvokeAsync(Func<Task> workItem)
=> _renderHandle.Dispatcher.InvokeAsync(workItem);
void IComponent.Configure(RenderHandle renderHandle)
void IComponent.Attach(RenderHandle renderHandle)
{
// This implicitly means a ComponentBase can only be associated with a single
// renderer. That's the only use case we have right now. If there was ever a need,

View File

@ -1,44 +1,41 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Components.Reflection;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Microsoft.AspNetCore.Components.Reflection;
namespace Microsoft.AspNetCore.Components
{
/// <remarks>
/// The <see cref="Instance"/> property on this type is used as a static global cache. Ensure any changes to this type
/// are thread safe and can be safely cached statically.
/// </remarks>
internal class ComponentFactory
{
private readonly static BindingFlags _injectablePropertyBindingFlags
private static readonly BindingFlags _injectablePropertyBindingFlags
= BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
private readonly IServiceProvider _serviceProvider;
private readonly IDictionary<Type, Action<IComponent>> _cachedInitializers
= new ConcurrentDictionary<Type, Action<IComponent>>();
private readonly ConcurrentDictionary<Type, Action<IServiceProvider, IComponent>> _cachedInitializers
= new ConcurrentDictionary<Type, Action<IServiceProvider, IComponent>>();
public ComponentFactory(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider
?? throw new ArgumentNullException(nameof(serviceProvider));
}
public static readonly ComponentFactory Instance = new ComponentFactory();
public IComponent InstantiateComponent(Type componentType)
public IComponent InstantiateComponent(IServiceProvider serviceProvider, Type componentType)
{
if (!typeof(IComponent).IsAssignableFrom(componentType))
var instance = Activator.CreateInstance(componentType);
if (!(instance is IComponent component))
{
throw new ArgumentException($"The type {componentType.FullName} does not " +
$"implement {nameof(IComponent)}.", nameof(componentType));
throw new ArgumentException($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", nameof(componentType));
}
var instance = (IComponent)Activator.CreateInstance(componentType);
PerformPropertyInjection(instance);
return instance;
PerformPropertyInjection(serviceProvider, component);
return component;
}
private void PerformPropertyInjection(IComponent instance)
private void PerformPropertyInjection(IServiceProvider serviceProvider, IComponent instance)
{
// This is thread-safe because _cachedInitializers is a ConcurrentDictionary.
// We might generate the initializer more than once for a given type, but would
@ -47,18 +44,19 @@ namespace Microsoft.AspNetCore.Components
if (!_cachedInitializers.TryGetValue(instanceType, out var initializer))
{
initializer = CreateInitializer(instanceType);
_cachedInitializers[instanceType] = initializer;
_cachedInitializers.TryAdd(instanceType, initializer);
}
initializer(instance);
initializer(serviceProvider, instance);
}
private Action<IComponent> CreateInitializer(Type type)
private Action<IServiceProvider, IComponent> CreateInitializer(Type type)
{
// Do all the reflection up front
var injectableProperties =
MemberAssignment.GetPropertiesIncludingInherited(type, _injectablePropertyBindingFlags)
.Where(p => p.GetCustomAttribute<InjectAttribute>() != null);
.Where(p => p.IsDefined(typeof(InjectAttribute)));
var injectables = injectableProperties.Select(property =>
(
propertyName: property.Name,
@ -66,23 +64,25 @@ namespace Microsoft.AspNetCore.Components
setter: MemberAssignment.CreatePropertySetter(type, property)
)).ToArray();
return Initialize;
// Return an action whose closure can write all the injected properties
// without any further reflection calls (just typecasts)
return instance =>
void Initialize(IServiceProvider serviceProvider, IComponent component)
{
foreach (var injectable in injectables)
foreach (var (propertyName, propertyType, setter) in injectables)
{
var serviceInstance = _serviceProvider.GetService(injectable.propertyType);
var serviceInstance = serviceProvider.GetService(propertyType);
if (serviceInstance == null)
{
throw new InvalidOperationException($"Cannot provide a value for property " +
$"'{injectable.propertyName}' on type '{type.FullName}'. There is no " +
$"registered service of type '{injectable.propertyType}'.");
$"'{propertyName}' on type '{type.FullName}'. There is no " +
$"registered service of type '{propertyType}'.");
}
injectable.setter.SetValue(instance, serviceInstance);
setter.SetValue(component, serviceInstance);
}
};
}
}
}
}

View File

@ -1,73 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Microsoft.AspNetCore.Components
{
/// <summary>
/// Resolves components for an application.
/// </summary>
internal static class ComponentResolver
{
/// <summary>
/// Lists all the types
/// </summary>
/// <param name="appAssembly"></param>
/// <returns></returns>
public static IEnumerable<Type> ResolveComponents(Assembly appAssembly)
{
var componentsAssembly = typeof(IComponent).Assembly;
return EnumerateAssemblies(appAssembly.GetName(), componentsAssembly, new HashSet<Assembly>(new AssemblyComparer()))
.SelectMany(a => a.ExportedTypes)
.Where(t => typeof(IComponent).IsAssignableFrom(t));
}
private static IEnumerable<Assembly> EnumerateAssemblies(
AssemblyName assemblyName,
Assembly componentAssembly,
HashSet<Assembly> visited)
{
var assembly = Assembly.Load(assemblyName);
if (visited.Contains(assembly))
{
// Avoid traversing visited assemblies.
yield break;
}
visited.Add(assembly);
var references = assembly.GetReferencedAssemblies();
if (!references.Any(r => string.Equals(r.FullName, componentAssembly.FullName, StringComparison.Ordinal)))
{
// Avoid traversing references that don't point to Components (like netstandard2.0)
yield break;
}
else
{
yield return assembly;
// Look at the list of transitive dependencies for more components.
foreach (var reference in references.SelectMany(r => EnumerateAssemblies(r, componentAssembly, visited)))
{
yield return reference;
}
}
}
private class AssemblyComparer : IEqualityComparer<Assembly>
{
public bool Equals(Assembly x, Assembly y)
{
return string.Equals(x?.FullName, y?.FullName, StringComparison.Ordinal);
}
public int GetHashCode(Assembly obj)
{
return obj.FullName.GetHashCode();
}
}
}
}

View File

@ -0,0 +1,101 @@
// 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.Globalization;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
namespace Microsoft.AspNetCore.Components
{
/// <summary>
/// Represents a reference to a rendered element.
/// </summary>
[JsonConverter(typeof(ElementReferenceConverter))]
public readonly struct ElementReference
{
private static long _nextIdForWebAssemblyOnly = 1;
/// <summary>
/// Gets a unique identifier for <see cref="ElementReference" />.
/// </summary>
/// <remarks>
/// The Id is unique at least within the scope of a given user/circuit.
/// This property is public to support Json serialization and should not be used by user code.
/// </remarks>
internal string Id { get; }
private ElementReference(string id)
{
Id = id;
}
internal static ElementReference CreateWithUniqueId()
=> new ElementReference(CreateUniqueId());
private static string CreateUniqueId()
{
if (PlatformInfo.IsWebAssembly)
{
// On WebAssembly there's only one user, so it's fine to expose the number
// of IDs that have been assigned, and this is cheaper than creating a GUID.
// It's unfortunate that this still involves a heap allocation. If that becomes
// a problem we could extend RenderTreeFrame to have both "string" and "long"
// fields for ElementRefCaptureId, of which only one would be in use depending
// on the platform.
var id = Interlocked.Increment(ref _nextIdForWebAssemblyOnly);
return id.ToString(CultureInfo.InvariantCulture);
}
else
{
// For remote rendering, it's important not to disclose any cross-user state,
// such as the number of IDs that have been assigned.
return Guid.NewGuid().ToString("D", CultureInfo.InvariantCulture);
}
}
private sealed class ElementReferenceConverter : JsonConverter<ElementReference>
{
private static readonly JsonEncodedText IdProperty = JsonEncodedText.Encode("__internalId");
public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
string id = null;
while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
{
if (reader.TokenType == JsonTokenType.PropertyName)
{
if (reader.ValueTextEquals(IdProperty.EncodedUtf8Bytes))
{
reader.Read();
id = reader.GetString();
}
else
{
throw new JsonException($"Unexpected JSON property '{reader.GetString()}'.");
}
}
else
{
throw new JsonException($"Unexcepted JSON Token {reader.TokenType}.");
}
}
if (id is null)
{
throw new JsonException("__internalId is required.");
}
return new ElementReference(id);
}
public override void Write(Utf8JsonWriter writer, ElementReference value, JsonSerializerOptions options)
{
writer.WriteStartObject();
writer.WriteString(IdProperty, value.Id);
writer.WriteEndObject();
}
}
}
}

View File

@ -2,10 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Concurrent;
using System.ComponentModel;
using System.Globalization;
using System.Reflection;
using static Microsoft.AspNetCore.Components.BindConverter;
namespace Microsoft.AspNetCore.Components
{
@ -24,406 +22,6 @@ namespace Microsoft.AspNetCore.Components
// For now we're not necessarily handling this correctly since we parse the same way for number and text.
public static class EventCallbackFactoryBinderExtensions
{
private delegate bool BindConverter<T>(object obj, CultureInfo culture, out T value);
private delegate bool BindConverterWithFormat<T>(object obj, CultureInfo culture, string format, out T value);
// Perf: conversion delegates are written as static funcs so we can prevent
// allocations for these simple cases.
private readonly static BindConverter<string> ConvertToString = ConvertToStringCore;
private static bool ConvertToStringCore(object obj, CultureInfo culture, out string value)
{
// We expect the input to already be a string.
value = (string)obj;
return true;
}
private static BindConverter<bool> ConvertToBool = ConvertToBoolCore;
private static BindConverter<bool?> ConvertToNullableBool = ConvertToNullableBoolCore;
private static bool ConvertToBoolCore(object obj, CultureInfo culture, out bool value)
{
// We expect the input to already be a bool.
value = (bool)obj;
return true;
}
private static bool ConvertToNullableBoolCore(object obj, CultureInfo culture, out bool? value)
{
// We expect the input to already be a bool.
value = (bool?)obj;
return true;
}
private static BindConverter<int> ConvertToInt = ConvertToIntCore;
private static BindConverter<int?> ConvertToNullableInt = ConvertToNullableIntCore;
private static bool ConvertToIntCore(object obj, CultureInfo culture, out int value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return false;
}
if (!int.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static bool ConvertToNullableIntCore(object obj, CultureInfo culture, out int? value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
if (!int.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static BindConverter<long> ConvertToLong = ConvertToLongCore;
private static BindConverter<long?> ConvertToNullableLong = ConvertToNullableLongCore;
private static bool ConvertToLongCore(object obj, CultureInfo culture, out long value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return false;
}
if (!long.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static bool ConvertToNullableLongCore(object obj, CultureInfo culture, out long? value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
if (!long.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static BindConverter<float> ConvertToFloat = ConvertToFloatCore;
private static BindConverter<float?> ConvertToNullableFloat = ConvertToNullableFloatCore;
private static bool ConvertToFloatCore(object obj, CultureInfo culture, out float value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return false;
}
if (!float.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static bool ConvertToNullableFloatCore(object obj, CultureInfo culture, out float? value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
if (!float.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static BindConverter<double> ConvertToDouble = ConvertToDoubleCore;
private static BindConverter<double?> ConvertToNullableDouble = ConvertToNullableDoubleCore;
private static bool ConvertToDoubleCore(object obj, CultureInfo culture, out double value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return false;
}
if (!double.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static bool ConvertToNullableDoubleCore(object obj, CultureInfo culture, out double? value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
if (!double.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static BindConverter<decimal> ConvertToDecimal = ConvertToDecimalCore;
private static BindConverter<decimal?> ConvertToNullableDecimal = ConvertToNullableDecimalCore;
private static bool ConvertToDecimalCore(object obj, CultureInfo culture, out decimal value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return false;
}
if (!decimal.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static bool ConvertToNullableDecimalCore(object obj, CultureInfo culture, out decimal? value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
if (!decimal.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static BindConverter<DateTime> ConvertToDateTime = ConvertToDateTimeCore;
private static BindConverterWithFormat<DateTime> ConvertToDateTimeWithFormat = ConvertToDateTimeCore;
private static BindConverter<DateTime?> ConvertToNullableDateTime = ConvertToNullableDateTimeCore;
private static BindConverterWithFormat<DateTime?> ConvertToNullableDateTimeWithFormat = ConvertToNullableDateTimeCore;
private static bool ConvertToDateTimeCore(object obj, CultureInfo culture, out DateTime value)
{
return ConvertToDateTimeCore(obj, culture, format: null, out value);
}
private static bool ConvertToDateTimeCore(object obj, CultureInfo culture, string format, out DateTime value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return false;
}
if (format != null && DateTime.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
{
value = converted;
return true;
}
else if (format == null && DateTime.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
{
value = converted;
return true;
}
value = default;
return false;
}
private static bool ConvertToNullableDateTimeCore(object obj, CultureInfo culture, out DateTime? value)
{
return ConvertToNullableDateTimeCore(obj, culture, format: null, out value);
}
private static bool ConvertToNullableDateTimeCore(object obj, CultureInfo culture, string format, out DateTime? value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
if (format != null && DateTime.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
{
value = converted;
return true;
}
else if (format == null && DateTime.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
{
value = converted;
return true;
}
value = default;
return false;
}
private static BindConverter<DateTimeOffset> ConvertToDateTimeOffset = ConvertToDateTimeOffsetCore;
private static BindConverterWithFormat<DateTimeOffset> ConvertToDateTimeOffsetWithFormat = ConvertToDateTimeOffsetCore;
private static BindConverter<DateTimeOffset?> ConvertToNullableDateTimeOffset = ConvertToNullableDateTimeOffsetCore;
private static BindConverterWithFormat<DateTimeOffset?> ConvertToNullableDateTimeOffsetWithFormat = ConvertToNullableDateTimeOffsetCore;
private static bool ConvertToDateTimeOffsetCore(object obj, CultureInfo culture, out DateTimeOffset value)
{
return ConvertToDateTimeOffsetCore(obj, culture, format: null, out value);
}
private static bool ConvertToDateTimeOffsetCore(object obj, CultureInfo culture, string format, out DateTimeOffset value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return false;
}
if (format != null && DateTimeOffset.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
{
value = converted;
return true;
}
else if (format == null && DateTimeOffset.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
{
value = converted;
return true;
}
value = default;
return false;
}
private static bool ConvertToNullableDateTimeOffsetCore(object obj, CultureInfo culture, out DateTimeOffset? value)
{
return ConvertToNullableDateTimeOffsetCore(obj, culture, format: null, out value);
}
private static bool ConvertToNullableDateTimeOffsetCore(object obj, CultureInfo culture, string format, out DateTimeOffset? value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
if (format != null && DateTimeOffset.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
{
value = converted;
return true;
}
else if (format == null && DateTimeOffset.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
{
value = converted;
return true;
}
value = default;
return false;
}
private static bool ConvertToEnum<T>(object obj, CultureInfo culture, out T value) where T : struct, Enum
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
if (!Enum.TryParse<T>(text, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
private static bool ConvertToNullableEnum<T>(object obj, CultureInfo culture, out T? value) where T : struct, Enum
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
if (!Enum.TryParse<T>(text, out var converted))
{
value = default;
return false;
}
value = converted;
return true;
}
/// <summary>
/// For internal use only.
/// </summary>
@ -611,7 +209,7 @@ namespace Microsoft.AspNetCore.Components
double existingValue,
CultureInfo culture = null)
{
return CreateBinderCore<double>(factory, receiver, setter, culture, ConvertToDouble);
return CreateBinderCore<double>(factory, receiver, setter, culture, ConvertToDoubleDelegate);
}
/// <summary>
@ -630,7 +228,7 @@ namespace Microsoft.AspNetCore.Components
double? existingValue,
CultureInfo culture = null)
{
return CreateBinderCore<double?>(factory, receiver, setter, culture, ConvertToNullableDouble);
return CreateBinderCore<double?>(factory, receiver, setter, culture, ConvertToNullableDoubleDelegate);
}
/// <summary>
@ -687,7 +285,7 @@ namespace Microsoft.AspNetCore.Components
DateTime existingValue,
CultureInfo culture = null)
{
return CreateBinderCore<DateTime>(factory, receiver, setter, culture, format: null, ConvertToDateTimeWithFormat);
return CreateBinderCore<DateTime>(factory, receiver, setter, culture, ConvertToDateTime);
}
/// <summary>
@ -727,7 +325,7 @@ namespace Microsoft.AspNetCore.Components
DateTime? existingValue,
CultureInfo culture = null)
{
return CreateBinderCore<DateTime?>(factory, receiver, setter, culture, format: null, ConvertToNullableDateTimeWithFormat);
return CreateBinderCore<DateTime?>(factory, receiver, setter, culture, ConvertToNullableDateTime);
}
/// <summary>
@ -767,7 +365,7 @@ namespace Microsoft.AspNetCore.Components
DateTimeOffset existingValue,
CultureInfo culture = null)
{
return CreateBinderCore<DateTimeOffset>(factory, receiver, setter, culture, format: null, ConvertToDateTimeOffsetWithFormat);
return CreateBinderCore<DateTimeOffset>(factory, receiver, setter, culture, ConvertToDateTimeOffset);
}
/// <summary>
@ -807,7 +405,7 @@ namespace Microsoft.AspNetCore.Components
DateTimeOffset? existingValue,
CultureInfo culture = null)
{
return CreateBinderCore<DateTimeOffset?>(factory, receiver, setter, culture, format: null, ConvertToNullableDateTimeOffsetWithFormat);
return CreateBinderCore<DateTimeOffset?>(factory, receiver, setter, culture, ConvertToNullableDateTimeOffset);
}
/// <summary>
@ -848,7 +446,7 @@ namespace Microsoft.AspNetCore.Components
T existingValue,
CultureInfo culture = null)
{
return CreateBinderCore<T>(factory, receiver, setter, culture, BinderConverterCache.Get<T>());
return CreateBinderCore<T>(factory, receiver, setter, culture, ParserDelegateCache.Get<T>());
}
private static EventCallback<UIChangeEventArgs> CreateBinderCore<T>(
@ -856,7 +454,7 @@ namespace Microsoft.AspNetCore.Components
object receiver,
Action<T> setter,
CultureInfo culture,
BindConverter<T> converter)
BindConverter.BindParser<T> converter)
{
Action<UIChangeEventArgs> callback = e =>
{
@ -900,7 +498,7 @@ namespace Microsoft.AspNetCore.Components
Action<T> setter,
CultureInfo culture,
string format,
BindConverterWithFormat<T> converter)
BindConverter.BindParserWithFormat<T> converter)
{
Action<UIChangeEventArgs> callback = e =>
{
@ -937,147 +535,5 @@ namespace Microsoft.AspNetCore.Components
};
return factory.Create<UIChangeEventArgs>(receiver, callback);
}
// We can't rely on generics + static to cache here unfortunately. That would require us to overload
// CreateBinder on T : struct AND T : class, which is not allowed.
private static class BinderConverterCache
{
private readonly static ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>();
private static MethodInfo _convertToEnum;
private static MethodInfo _convertToNullableEnum;
public static BindConverter<T> Get<T>()
{
if (!_cache.TryGetValue(typeof(T), out var converter))
{
// 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))
{
converter = ConvertToString;
}
else if (typeof(T) == typeof(bool))
{
converter = ConvertToBool;
}
else if (typeof(T) == typeof(bool?))
{
converter = ConvertToNullableBool;
}
else if (typeof(T) == typeof(int))
{
converter = ConvertToInt;
}
else if (typeof(T) == typeof(int?))
{
converter = ConvertToNullableInt;
}
else if (typeof(T) == typeof(long))
{
converter = ConvertToLong;
}
else if (typeof(T) == typeof(long?))
{
converter = ConvertToNullableLong;
}
else if (typeof(T) == typeof(float))
{
converter = ConvertToFloat;
}
else if (typeof(T) == typeof(float?))
{
converter = ConvertToNullableFloat;
}
else if (typeof(T) == typeof(double))
{
converter = ConvertToDouble;
}
else if (typeof(T) == typeof(double?))
{
converter = ConvertToNullableDouble;
}
else if (typeof(T) == typeof(decimal))
{
converter = ConvertToDecimal;
}
else if (typeof(T) == typeof(decimal?))
{
converter = ConvertToNullableDecimal;
}
else if (typeof(T) == typeof(DateTime))
{
converter = ConvertToDateTime;
}
else if (typeof(T) == typeof(DateTime?))
{
converter = ConvertToNullableDateTime;
}
else if (typeof(T) == typeof(DateTimeOffset))
{
converter = ConvertToDateTimeOffset;
}
else if (typeof(T) == typeof(DateTimeOffset?))
{
converter = ConvertToNullableDateTimeOffset;
}
else if (typeof(T).IsEnum)
{
// We have to deal invoke this dynamically to work around the type constraint on Enum.TryParse.
var method = _convertToEnum ??= typeof(EventCallbackFactoryBinderExtensions).GetMethod(nameof(ConvertToEnum), BindingFlags.NonPublic | BindingFlags.Static);
converter = method.MakeGenericMethod(typeof(T)).CreateDelegate(typeof(BindConverter<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 = _convertToNullableEnum ??= typeof(EventCallbackFactoryBinderExtensions).GetMethod(nameof(ConvertToNullableEnum), BindingFlags.NonPublic | BindingFlags.Static);
converter = method.MakeGenericMethod(innerType).CreateDelegate(typeof(BindConverter<T>), target: null);
}
else
{
converter = MakeTypeConverterConverter<T>();
}
_cache.TryAdd(typeof(T), converter);
}
return (BindConverter<T>)converter;
}
private static BindConverter<T> MakeTypeConverterConverter<T>()
{
var typeConverter = TypeDescriptor.GetConverter(typeof(T));
if (typeConverter == null || !typeConverter.CanConvertFrom(typeof(string)))
{
throw new InvalidOperationException(
$"The type '{typeof(T).FullName}' does not have an associated {typeof(TypeConverter).Name} that supports " +
$"conversion from a string. " +
$"Apply '{typeof(TypeConverterAttribute).Name}' to the type to register a converter.");
}
return ConvertWithTypeConverter;
bool ConvertWithTypeConverter(object obj, CultureInfo culture, out T value)
{
var text = (string)obj;
if (string.IsNullOrEmpty(text))
{
value = default;
return true;
}
// We intentionally close-over the TypeConverter to cache it. The TypeDescriptor infrastructure is slow.
var converted = typeConverter.ConvertFromString(context: null, culture ?? CultureInfo.CurrentCulture, text);
if (converted == null)
{
value = default;
return false;
}
value = (T)converted;
return true;
}
}
}
}
}

View File

@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Components.Forms
builder.AddMultipleAttributes(1, AdditionalAttributes);
builder.AddAttribute(2, "type", "checkbox");
builder.AddAttribute(3, "class", CssClass);
builder.AddAttribute(4, "checked", BindMethods.GetValue(CurrentValue));
builder.AddAttribute(4, "checked", BindConverter.FormatValue(CurrentValue));
builder.AddAttribute(5, "onchange", EventCallback.Factory.CreateBinder<bool>(this, __value => CurrentValue = __value, CurrentValue));
builder.CloseElement();
}

View File

@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Components.Forms
builder.AddMultipleAttributes(1, AdditionalAttributes);
builder.AddAttribute(2, "type", "date");
builder.AddAttribute(3, "class", CssClass);
builder.AddAttribute(4, "value", BindMethods.GetValue(CurrentValueAsString));
builder.AddAttribute(4, "value", BindConverter.FormatValue(CurrentValueAsString));
builder.AddAttribute(5, "onchange", EventCallback.Factory.CreateBinder<string>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
builder.CloseElement();
}
@ -38,9 +38,9 @@ namespace Microsoft.AspNetCore.Components.Forms
switch (value)
{
case DateTime dateTimeValue:
return dateTimeValue.ToString(DateFormat, CultureInfo.InvariantCulture);
return BindConverter.FormatValue(dateTimeValue, DateFormat, CultureInfo.InvariantCulture);
case DateTimeOffset dateTimeOffsetValue:
return dateTimeOffsetValue.ToString(DateFormat, CultureInfo.InvariantCulture);
return BindConverter.FormatValue(dateTimeOffsetValue, DateFormat, CultureInfo.InvariantCulture);
default:
return string.Empty; // Handles null for Nullable<DateTime>, etc.
}
@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Components.Forms
static bool TryParseDateTime(string value, out T result)
{
var success = DateTime.TryParseExact(value, DateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out var parsedValue);
var success = BindConverter.TryConvertToDateTime(value, CultureInfo.InvariantCulture, DateFormat, out var parsedValue);
if (success)
{
result = (T)(object)parsedValue;
@ -96,7 +96,7 @@ namespace Microsoft.AspNetCore.Components.Forms
static bool TryParseDateTimeOffset(string value, out T result)
{
var success = DateTimeOffset.TryParseExact(value, DateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out var parsedValue);
var success = BindConverter.TryConvertToDateTimeOffset(value, CultureInfo.InvariantCulture, DateFormat, out var parsedValue);
if (success)
{
result = (T)(object)parsedValue;

View File

@ -13,38 +13,18 @@ namespace Microsoft.AspNetCore.Components.Forms
/// </summary>
public class InputNumber<T> : InputBase<T>
{
delegate bool Parser(string value, out T result);
private static Parser _parser;
private static string _stepAttributeValue; // Null by default, so only allows whole numbers as per HTML spec
// Determine the parsing logic once per T and cache it, so we don't have to consider all the possible types on each parse
static InputNumber()
{
// Unwrap Nullable<T>, because InputBase already deals with the Nullable aspect
// of it for us. We will only get asked to parse the T for nonempty inputs.
var targetType = Nullable.GetUnderlyingType(typeof(T)) ?? typeof(T);
if (targetType == typeof(int))
if (targetType == typeof(int) ||
targetType == typeof(float) ||
targetType == typeof(double) ||
targetType == typeof(decimal))
{
_parser = TryParseInt;
}
else if (targetType == typeof(long))
{
_parser = TryParseLong;
}
else if (targetType == typeof(float))
{
_parser = TryParseFloat;
_stepAttributeValue = "any";
}
else if (targetType == typeof(double))
{
_parser = TryParseDouble;
_stepAttributeValue = "any";
}
else if (targetType == typeof(decimal))
{
_parser = TryParseDecimal;
_stepAttributeValue = "any";
}
else
@ -62,11 +42,11 @@ namespace Microsoft.AspNetCore.Components.Forms
protected override void BuildRenderTree(RenderTreeBuilder builder)
{
builder.OpenElement(0, "input");
builder.AddAttribute(1, "step", _stepAttributeValue); // Before the splat so the user can override
builder.AddAttribute(1, "step", _stepAttributeValue);
builder.AddMultipleAttributes(2, AdditionalAttributes);
builder.AddAttribute(3, "type", "number");
builder.AddAttribute(4, "class", CssClass);
builder.AddAttribute(5, "value", BindMethods.GetValue(CurrentValueAsString));
builder.AddAttribute(5, "value", BindConverter.FormatValue(CurrentValueAsString));
builder.AddAttribute(6, "onchange", EventCallback.Factory.CreateBinder<string>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
builder.CloseElement();
}
@ -74,7 +54,7 @@ namespace Microsoft.AspNetCore.Components.Forms
/// <inheritdoc />
protected override bool TryParseValueFromString(string value, out T result, out string validationErrorMessage)
{
if (_parser(value, out result))
if (BindConverter.TryConvertTo<T>(value, CultureInfo.InvariantCulture, out result))
{
validationErrorMessage = null;
return true;
@ -100,98 +80,23 @@ namespace Microsoft.AspNetCore.Components.Forms
return null;
case int @int:
return @int.ToString(CultureInfo.InvariantCulture);
return BindConverter.FormatValue(@int, CultureInfo.InvariantCulture);
case long @long:
return @long.ToString(CultureInfo.InvariantCulture);
return BindConverter.FormatValue(@long, CultureInfo.InvariantCulture);
case float @float:
return @float.ToString(CultureInfo.InvariantCulture);
return BindConverter.FormatValue(@float, CultureInfo.InvariantCulture);
case double @double:
return @double.ToString(CultureInfo.InvariantCulture);
return BindConverter.FormatValue(@double, CultureInfo.InvariantCulture);
case decimal @decimal:
return @decimal.ToString(CultureInfo.InvariantCulture);
return BindConverter.FormatValue(@decimal, CultureInfo.InvariantCulture);
default:
throw new InvalidOperationException($"Unsupported type {value.GetType()}");
}
}
static bool TryParseInt(string value, out T result)
{
var success = int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var parsedValue);
if (success)
{
result = (T)(object)parsedValue;
return true;
}
else
{
result = default;
return false;
}
}
static bool TryParseLong(string value, out T result)
{
var success = long.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var parsedValue);
if (success)
{
result = (T)(object)parsedValue;
return true;
}
else
{
result = default;
return false;
}
}
static bool TryParseFloat(string value, out T result)
{
var success = float.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out var parsedValue);
if (success && !float.IsInfinity(parsedValue))
{
result = (T)(object)parsedValue;
return true;
}
else
{
result = default;
return false;
}
}
static bool TryParseDouble(string value, out T result)
{
var success = double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out var parsedValue);
if (success && !double.IsInfinity(parsedValue))
{
result = (T)(object)parsedValue;
return true;
}
else
{
result = default;
return false;
}
}
static bool TryParseDecimal(string value, out T result)
{
var success = decimal.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out var parsedValue);
if (success)
{
result = (T)(object)parsedValue;
return true;
}
else
{
result = default;
return false;
}
}
}
}

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Globalization;
using Microsoft.AspNetCore.Components.RenderTree;
namespace Microsoft.AspNetCore.Components.Forms
@ -22,7 +23,7 @@ namespace Microsoft.AspNetCore.Components.Forms
builder.OpenElement(0, "select");
builder.AddMultipleAttributes(1, AdditionalAttributes);
builder.AddAttribute(2, "class", CssClass);
builder.AddAttribute(3, "value", BindMethods.GetValue(CurrentValueAsString));
builder.AddAttribute(3, "value", BindConverter.FormatValue(CurrentValueAsString));
builder.AddAttribute(4, "onchange", EventCallback.Factory.CreateBinder<string>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
builder.AddContent(5, ChildContent);
builder.CloseElement();
@ -39,14 +40,14 @@ namespace Microsoft.AspNetCore.Components.Forms
}
else if (typeof(T).IsEnum)
{
// There's no non-generic Enum.TryParse (https://github.com/dotnet/corefx/issues/692)
try
var success = BindConverter.TryConvertTo<T>(value, CultureInfo.CurrentCulture, out var parsedValue);
if (success)
{
result = (T)Enum.Parse(typeof(T), value);
result = parsedValue;
validationErrorMessage = null;
return true;
}
catch (ArgumentException)
else
{
result = default;
validationErrorMessage = $"The {FieldIdentifier.FieldName} field is not valid.";

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Components.Forms
builder.OpenElement(0, "input");
builder.AddMultipleAttributes(1, AdditionalAttributes);
builder.AddAttribute(2, "class", CssClass);
builder.AddAttribute(3, "value", BindMethods.GetValue(CurrentValue));
builder.AddAttribute(3, "value", BindConverter.FormatValue(CurrentValue));
builder.AddAttribute(4, "onchange", EventCallback.Factory.CreateBinder<string>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
builder.CloseElement();
}

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Components.Forms
builder.OpenElement(0, "textarea");
builder.AddMultipleAttributes(1, AdditionalAttributes);
builder.AddAttribute(2, "class", CssClass);
builder.AddAttribute(3, "value", BindMethods.GetValue(CurrentValue));
builder.AddAttribute(3, "value", BindConverter.FormatValue(CurrentValue));
builder.AddAttribute(4, "onchange", EventCallback.Factory.CreateBinder<string>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
builder.CloseElement();
}

View File

@ -11,10 +11,10 @@ namespace Microsoft.AspNetCore.Components
public interface IComponent
{
/// <summary>
/// Initializes the component.
/// Attaches the component to a <see cref="RenderHandle" />.
/// </summary>
/// <param name="renderHandle">A <see cref="RenderHandle"/> that allows the component to be rendered.</param>
void Configure(RenderHandle renderHandle);
void Attach(RenderHandle renderHandle);
/// <summary>
/// Sets parameters supplied by the component's parent in the render tree.

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