Merge branch 'master' into merge/release/5.0-preview6-to-master

This commit is contained in:
Stephen Halter 2020-06-04 19:48:43 -07:00 committed by GitHub
commit b454da498c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
157 changed files with 1871 additions and 620 deletions

View File

@ -35,7 +35,7 @@ variables:
- name: _UseHelixOpenQueues
value: 'true'
- name: _BuildArgs
value: ''
value: '/p:SkipTestBuild=true'
- name: _PublishArgs
value: ''
- name: _SignType
@ -66,6 +66,7 @@ variables:
- name: _BuildArgs
value: /p:TeamName=$(_TeamName)
/p:OfficialBuildId=$(Build.BuildNumber)
/p:SkipTestBuild=true
- name: _SignType
value: real
@ -81,7 +82,7 @@ variables:
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- name: _BuildArgs
value: ''
value: '/p:SkipTestBuild=true'
- name: _SignType
value: test
- name: _PublishArgs
@ -503,16 +504,6 @@ stages:
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema
afterBuild:
- powershell: "& ./build.ps1 -CI -nobl -NoBuild -Test /p:RunQuarantinedTests=true"
displayName: Run Quarantined Tests
continueOnError: true
- task: PublishTestResults@2
displayName: Publish Quarantined Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
artifacts:
- name: Windows_Test_Dumps
path: artifacts/dumps/
@ -566,20 +557,6 @@ stages:
beforeBuild:
- bash: "./eng/scripts/install-nginx-mac.sh"
displayName: Installing Nginx
afterBuild:
- bash: ./build.sh --ci --nobl --pack --no-build --no-restore --no-build-deps
displayName: Pack Packages (for Template tests)
- bash: ./src/ProjectTemplates/build.sh --ci --nobl --pack --no-restore --no-build-deps
displayName: Pack Templates (for Template tests)
- bash: ./build.sh --no-build --ci --nobl --test -p:RunQuarantinedTests=true
displayName: Run Quarantined Tests
continueOnError: true
- task: PublishTestResults@2
displayName: Publish Quarantined Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
artifacts:
- name: MacOS_Test_Logs
path: artifacts/log/
@ -604,20 +581,6 @@ stages:
displayName: Installing Nginx
- bash: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p"
displayName: Increase inotify limit
afterBuild:
- bash: ./build.sh --ci --nobl --pack --no-build --no-restore --no-build-deps
displayName: Pack Packages (for Template tests)
- bash: ./src/ProjectTemplates/build.sh --ci --nobl --pack --no-restore --no-build-deps
displayName: Pack Templates (for Template tests)
- bash: ./build.sh --no-build --ci --nobl --test -p:RunQuarantinedTests=true
displayName: Run Quarantined Tests
continueOnError: true
- task: PublishTestResults@2
displayName: Publish Quarantined Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
artifacts:
- name: Linux_Test_Logs
path: artifacts/log/

View File

@ -30,7 +30,7 @@ jobs:
displayName: Build shared fx
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -projects src/Grpc/**/*.csproj
displayName: Restore interop projects
- script: .\build.cmd -ci -nobl -noBuildRepoTasks -NoRestore -test -all -projects eng\helix\helix.proj
- script: .\build.cmd -ci -nobl -noBuildRepoTasks -NoRestore -test -all -noBuildNative -projects eng\helix\helix.proj
/p:IsHelixDaily=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true
/p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Run build.cmd helix target

View File

@ -25,10 +25,10 @@ variables:
jobs:
- template: jobs/default-build.yml
parameters:
jobName: Helix_quarantine_x64
jobDisplayName: 'Tests: Helix Quarantine x64'
jobName: Helix_quarantined_x64
jobDisplayName: 'Tests: Helix'
agentOs: Windows
timeoutInMinutes: 240
timeoutInMinutes: 180
steps:
# Build the shared framework
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
@ -46,3 +46,101 @@ jobs:
- name: Helix_logs
path: artifacts/log/
publishOnError: true
- template: jobs/default-build.yml
parameters:
jobName: Windows_Quarantined_x64
jobDisplayName: 'Tests: Windows x64'
agentOs: Windows
timeoutInMinutes: 180
isTestingJob: true
steps:
- powershell: "& ./build.ps1 -CI -nobl -all -pack -NoBuildJava"
displayName: Build
# The templates part can be removed when the Blazor Templates run on Helix
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -pack -NoRestore -NoBuilddeps "/p:RunTemplateTests=true"
displayName: Pack Templates
- script: ./build.cmd -ci -nobl -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true /p:RunQuarantinedTests=true /p:SkipHelixReadyTests=true"
displayName: Run Quarantined Tests
condition: always()
- task: PublishTestResults@2
displayName: Publish Quarantined Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
condition: always()
artifacts:
- name: Windows_Quarantined_Test_Logs
path: artifacts/log/
publishOnError: true
includeForks: true
- name: Windows_Quarantined_Test_Results
path: artifacts/TestResults/
publishOnError: true
includeForks: true
- template: jobs/default-build.yml
parameters:
jobName: MacOS_Quarantined_Test
jobDisplayName: "Tests: macOS 10.14"
agentOs: macOS
timeoutInMinutes: 180
isTestingJob: true
steps:
- bash: ./build.sh --all --pack --ci --nobl --no-build-java
displayName: Build
# The templates part can be removed when the Blazor Templates run on Helix
- bash: ./src/ProjectTemplates/build.sh --ci --nobl --pack --no-restore --no-build-deps
displayName: Pack Templates (for Template tests)
- bash: ./build.sh --no-build --ci --nobl --test -p:RunTemplateTests=true -p:RunQuarantinedTests=true -p:SkipHelixReadyTests=true
displayName: Run Quarantined Tests
- task: PublishTestResults@2
displayName: Publish Quarantined Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
condition: always()
artifacts:
- name: MacOS_Quarantined_Test_Logs
path: artifacts/log/
publishOnError: true
includeForks: true
- name: MacOS_Quarantined_Test_Results
path: artifacts/TestResults/
publishOnError: true
includeForks: true
- template: jobs/default-build.yml
parameters:
jobName: Linux_Quarantined_Test
jobDisplayName: "Tests: Ubuntu 16.04 x64"
agentOs: Linux
timeoutInMinutes: 180
isTestingJob: true
useHostedUbuntu: false
steps:
- bash: ./build.sh --all --pack --ci --nobl --no-build-java
displayName: Build
# The templates part can be removed when the Blazor Templates run on Helix
- bash: ./src/ProjectTemplates/build.sh --ci --nobl --pack --no-restore --no-build-deps
displayName: Pack Templates (for Template tests)
- bash: ./build.sh --no-build --ci --nobl --test -p:RunTemplateTests=true -p:RunQuarantinedTests=true -p:SkipHelixReadyTests=true
displayName: Run Quarantined Tests
- task: PublishTestResults@2
displayName: Publish Quarantined Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
condition: always()
artifacts:
- name: Linux_Quarantined_Test_Logs
path: artifacts/log/
publishOnError: true
includeForks: true
- name: Linux_Quarantined_Test_Results
path: artifacts/TestResults/
publishOnError: true
includeForks: true

View File

@ -1,5 +1,5 @@
---
name: Bug report
name: 🐞 Bug report
about: Create a report about something that is not working
---
@ -7,7 +7,7 @@ about: Create a report about something that is not working
More information on our issue management policies can be found here: https://aka.ms/aspnet/issue-policies
Please keep in mind that the GitHub issue tracker is not intended as a general support forum, but for reporting non-security bugs and feature requests.
Please keep in mind that the GitHub issue tracker is not intended as a general support forum, but for reporting **non-security** bugs and feature requests.
If you believe you have an issue that affects the SECURITY of the platform, please do NOT create an issue and instead email your issue details to secure@microsoft.com. Your report may be eligible for our [bug bounty](https://www.microsoft.com/en-us/msrc/bounty-dot-net-core) but ONLY if it is reported through email.
For other types of questions, consider using [StackOverflow](https://stackoverflow.com).
@ -19,15 +19,17 @@ A clear and concise description of what the bug is.
### To Reproduce
<!--
What steps can we follow to reproduce the issue?
We ❤ code! Point us to a minimalistic repro project hosted in a GitHub repo.
For a repro project, create a new ASP.NET Core project using the template of your your choice, apply the minimum required code to result in the issue you're observing.
We ❤ code! Include a complete code listing or point us to a minimalistic GitHub repo.
We will close this issue if:
- the repro project you share with us is complex. We can't investigate custom projects, so don't point us to such, please.
- if we will not be able to repro the behavior you're reporting
-->
``` C#
Console.WriteLine("Hello, World!");
```
Got Exceptions? Include both the message and the stack trace
### Exceptions (if any)
<!--
Include the exception you get when facing this issue
-->
### Further technical details

View File

@ -1,5 +1,5 @@
---
name: Feature request
name: 💡 Feature request
about: Suggest an idea for this project
---

View File

@ -1,6 +1,6 @@
{
"recommendations": [
"ms-vscode.csharp",
"ms-dotnettools.csharp",
"ms-vscode.PowerShell",
"EditorConfig.EditorConfig"
]

View File

@ -36,6 +36,42 @@
<!-- Workaround issue with ComponentsAnalyzer throwing for interfaces -->
<DisableImplicitComponentsAnalyzers>true</DisableImplicitComponentsAnalyzers>
</PropertyGroup>
<!-- Disable logging of some task parameters or metadata to reduce binlog size.
Reenable logging of any particular item by changing the value of the property below to 'false'
The format is as follows:
DisableLogTaskParameter_[task name]_[parameter name] - Disable logging of a particular parameter
DisableLogTaskParameterItemMetadata_[task name]_[parameter name] - Disable logging of item metadata of the parameter
-->
<PropertyGroup>
<TrimTaskParameters Condition=" '$(TrimTaskParameters)' == '' ">true</TrimTaskParameters>
<!-- ItemsToHash is used for incremental building and hashes input properties to a file
This is not generally useful for day-to-day build debugging. -->
<DisableLogTaskParameter_Hash_ItemsToHash>$(TrimTaskParameters)</DisableLogTaskParameter_Hash_ItemsToHash>
<!-- JoinItems takes input ItemGroups. The output ItemGroup is logged. -->
<DisableLogTaskParameter_JoinItems_Right>$(TrimTaskParameters)</DisableLogTaskParameter_JoinItems_Right>
<DisableLogTaskParameter_JoinItems_Left>$(TrimTaskParameters)</DisableLogTaskParameter_JoinItems_Left>
<!-- ConvertToAbsolutePaths - The output parameter (AbsolutePaths) is interesting
while the input Path is not generally useful. The output itemgroup's metadata
is not altered by the task. -->
<DisableLogTaskParameter_ConvertToAbsolutePath_Paths>$(TrimTaskParameters)</DisableLogTaskParameter_ConvertToAbsolutePath_Paths>
<DisableLogTaskParameterItemMetadata_ConvertToAbsolutePath_Paths>$(TrimTaskParameters)</DisableLogTaskParameterItemMetadata_ConvertToAbsolutePath_Paths>
<!-- The standard msbuild Copy task does not use Metadata and thus the input/outputs
item metadata is not relevant -->
<DisableLogTaskParameterItemMetadata_Copy_SourceFiles>$(TrimTaskParameters)</DisableLogTaskParameterItemMetadata_Copy_SourceFiles>
<DisableLogTaskParameterItemMetadata_Copy_DestinationFiles>$(TrimTaskParameters)</DisableLogTaskParameterItemMetadata_Copy_DestinationFiles>
<!-- Reference metadata for GenerateDepsFile, Csc, RAR, etc. are sometimes useful, but extraordinarily large
when building against a shared framework where the number of input assemblies is very large.
Avoid logging these by default. -->
<DisableLogTaskParameterItemMetadata_GenerateDepsFile_ReferenceAssemblies>$(TrimTaskParameters)</DisableLogTaskParameterItemMetadata_GenerateDepsFile_ReferenceAssemblies>
<DisableLogTaskParameterItemMetadata_GenerateDepsFile_ReferencePaths>$(TrimTaskParameters)</DisableLogTaskParameterItemMetadata_GenerateDepsFile_ReferencePaths>
<DisableLogTaskParameterItemMetadata_ResolveAssemblyReference_Assemblies>$(TrimTaskParameters)</DisableLogTaskParameterItemMetadata_ResolveAssemblyReference_Assemblies>
<DisableLogTaskParameterItemMetadata_Csc_References>$(TrimTaskParameters)</DisableLogTaskParameterItemMetadata_Csc_References>
</PropertyGroup>
<Import Project="eng\QuarantinedTests.BeforeArcade.props" />
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

View File

@ -5,6 +5,16 @@
<!-- Analyzer package are needed in source build for WebSDK -->
<ExcludeFromSourceBuild
Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(IsReferenceAssemblyProject)' != 'true' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
<!-- If the user has specified that they want to skip building any test related projects with SkipTestBuild,
suppress all targets for TestProjects using ExcludeFromBuild. -->
<ExcludeFromBuild Condition="'$(SkipTestBuild)' == 'true' and
('$(IsTestProject)' == 'true' or
'$(IsUnitTestProject)' == 'true' or
'$(IsTestAssetProject)' == 'true' or
'$(IsBenchmarkProject)' == 'true' or
'$(IsSampleProject)' == 'true' or
'$(IsSpecificationTestProject)' == 'true')">true</ExcludeFromBuild>
</PropertyGroup>
<PropertyGroup Label="Resx settings">

View File

@ -1,5 +1,4 @@
Helix testing in ASP.NET Core
==============================
# Helix testing in ASP.NET Core
Helix is the distributed test platform that we use to run tests. We build a helix payload that contains the publish directory of every test project that we want to test
send a job with with this payload to a set of queues for the various combinations of OS that we want to test
@ -11,16 +10,17 @@ For more info about helix see: [SDK](https://github.com/dotnet/arcade/blob/maste
To run Helix tests for one particular test project:
```
``` powershell
.\eng\scripts\RunHelix.ps1 -Project path\mytestproject.csproj
```
This will restore, and then publish all the test project including some bootstrapping scripts that will install the correct dotnet runtime/sdk before running the test assembly on the helix machine(s), and upload the job to helix.
## How do I look at the results of a helix run on Azure Pipelines?
There's a link embedded in the build.cmd log of the helix target on Azure Pipelines, near the bottom right that will look something like this:
```
``` text
2019-02-07T21:55:48.1516089Z Results will be available from https://mc.dot.net/#/user/aspnetcore/pr~2Faspnet~2Faspnetcore/ci/20190207.34
2019-02-07T21:56:43.2209607Z Job 0dedeef6-210e-4815-89f9-fd07513179fe is completed with 108 finished work items.
2019-02-07T21:56:43.5091018Z Job 4c45a464-9464-4321-906c-2503320066b0 is completed with 108 finished work items.
@ -36,11 +36,13 @@ There's a link embedded in the build.cmd log of the helix target on Azure Pipeli
The link will take you to an overview of all the tests with clickable links to the logs and each run broken down by queue.
All of the helix runs for aspnetcore can be found here https://mc.dot.net/#/user/aspnetcore/builds
All of the helix runs for aspnetcore can be found here <https://mc.dot.net/#/user/aspnetcore/builds>.
## What do I do if a test fails?
You can simulate how most tests run locally:
```
``` powershell
dotnet publish
cd <the publish directory>
dotnet vstest My.Tests.dll
@ -49,11 +51,12 @@ dotnet vstest My.Tests.dll
If that doesn't help, you can try the Get Repro environment link from mission control and try to debug that way.
## Differences from running tests locally
Most tests that don't just work on helix automatically are ones that depend on the source code being accessible. The helix payloads only contain whatever is in the publish directories, so any thing else that test depends on will need to be included to the payload.
This can be accomplished by using the `HelixContent` property like so.
```
``` msbuild
<ItemGroup>
<HelixContent Include="$(RepoRoot)src\KeepMe.js"/>
<HelixContent Include="$(RepoRoot)src\Project\**"/>
@ -62,7 +65,7 @@ This can be accomplished by using the `HelixContent` property like so.
By default, these files will be included in the root directory. To include these files in a different directory, you can use either the `Link` or `LinkBase` attributes to set the included path.
```
``` msbuild
<ItemGroup>
<HelixContent Include="$(RepoRoot)src\KeepMe.js" Link="$(MSBuildThisFileDirectory)\myassets\KeepMe.js"/>
<HelixContent Include="$(RepoRoot)src\Project\**" LinkBase="$(MSBuildThisFileDirectory)\myassets"/>
@ -70,8 +73,10 @@ By default, these files will be included in the root directory. To include these
```
## How to skip tests on helix
There are two main ways to opt out of helix
- Skipping the entire test project via `<BuildHelixPayload>false</BuildHelixPayload>` in csproj (the default value for this is IsTestProject).
- Skipping an individual test via `[SkipOnHelix("url to github issue")]` which might require including a compile reference to: `<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />`
- Skipping an individual test via `[SkipOnHelix("url to github issue")]`.
Make sure to file an issue for any skipped tests and include that in a comment next to either of these

View File

@ -1,12 +1,10 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(GenerateChecksums)' == 'true'" />
<PropertyGroup Condition="'$(GenerateChecksums)' == 'true'">
<!-- The one use of ArtifactsDir in Publish.proj adds an additional slash, confusing itself. -->
<ArtifactsDir Condition=" HasTrailingSlash('$(ArtifactsDir)') ">$(ArtifactsDir.Substring(0, $([MSBuild]::Subtract($(ArtifactsDir.Length), 1))))</ArtifactsDir>
<!-- $(InstallersOutputPath) is not defined. Root Directory.Build.props is not imported. -->
<InstallersOutputPath>$(ArtifactsDir)\installers\</InstallersOutputPath>
<_SuppressSdkImports>false</_SuppressSdkImports>
</PropertyGroup>
<Target Name="PopulateGenerateChecksumItems"

View File

@ -13,284 +13,284 @@
<Uri>https://github.com/dotnet/blazor</Uri>
<Sha>cc449601d638ffaab58ae9487f0fd010bb178a12</Sha>
</Dependency>
<Dependency Name="dotnet-ef" Version="5.0.0-preview.6.20303.5">
<Dependency Name="dotnet-ef" Version="5.0.0-preview.7.20304.1">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>dc978035b47dc25334ad8ecc59b15115c8ef261f</Sha>
<Sha>a5efd9a8d8ef0c4315a52cdf6aa9bf98c898d53a</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0-preview.6.20303.5">
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0-preview.7.20304.1">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>dc978035b47dc25334ad8ecc59b15115c8ef261f</Sha>
<Sha>a5efd9a8d8ef0c4315a52cdf6aa9bf98c898d53a</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0-preview.6.20303.5">
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0-preview.7.20304.1">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>dc978035b47dc25334ad8ecc59b15115c8ef261f</Sha>
<Sha>a5efd9a8d8ef0c4315a52cdf6aa9bf98c898d53a</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-preview.6.20303.5">
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-preview.7.20304.1">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>dc978035b47dc25334ad8ecc59b15115c8ef261f</Sha>
<Sha>a5efd9a8d8ef0c4315a52cdf6aa9bf98c898d53a</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-preview.6.20303.5">
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-preview.7.20304.1">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>dc978035b47dc25334ad8ecc59b15115c8ef261f</Sha>
<Sha>a5efd9a8d8ef0c4315a52cdf6aa9bf98c898d53a</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-preview.6.20303.5">
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-preview.7.20304.1">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>dc978035b47dc25334ad8ecc59b15115c8ef261f</Sha>
<Sha>a5efd9a8d8ef0c4315a52cdf6aa9bf98c898d53a</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore" Version="5.0.0-preview.6.20303.5">
<Dependency Name="Microsoft.EntityFrameworkCore" Version="5.0.0-preview.7.20304.1">
<Uri>https://github.com/dotnet/efcore</Uri>
<Sha>dc978035b47dc25334ad8ecc59b15115c8ef261f</Sha>
<Sha>a5efd9a8d8ef0c4315a52cdf6aa9bf98c898d53a</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Configuration" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Hosting" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Hosting" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Http" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Http" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Logging" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Options" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Options" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Primitives" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Primitives" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Internal.Transport" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.Internal.Transport" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Win32.SystemEvents" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Win32.SystemEvents" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.ComponentModel.Annotations" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.ComponentModel.Annotations" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Diagnostics.EventLog" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Diagnostics.EventLog" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Drawing.Common" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Drawing.Common" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.IO.Pipelines" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.IO.Pipelines" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Net.Http.Json" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Net.Http.Json" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Net.Http.WinHttpHandler" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Net.Http.WinHttpHandler" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Reflection.Metadata" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Reflection.Metadata" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Cng" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Security.Cryptography.Cng" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Pkcs" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Security.Cryptography.Pkcs" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Security.Permissions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Security.Permissions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Security.Principal.Windows" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Security.Principal.Windows" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.ServiceProcess.ServiceController" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.ServiceProcess.ServiceController" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Text.Encodings.Web" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Text.Encodings.Web" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Text.Json" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Threading.Channels" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Threading.Channels" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="System.Windows.Extensions" Version="5.0.0-preview.6.20302.5">
<Dependency Name="System.Windows.Extensions" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<!--
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
All Runtime.$rid packages should have the same version.
-->
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Internal" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.NETCore.App.Internal" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-preview.6.20302.5">
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-preview.7.20303.11">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f332f8c82d7b981b98d2089fdaa37cdb8b3688a9</Sha>
<Sha>4a4e347b964a2c8d2216ec382e4fb481965bb2fc</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20278.4">
<Uri>https://github.com/dotnet/arcade</Uri>

View File

@ -9,7 +9,7 @@
<AspNetCoreMajorVersion>5</AspNetCoreMajorVersion>
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
<PreReleaseVersionIteration>6</PreReleaseVersionIteration>
<PreReleaseVersionIteration>7</PreReleaseVersionIteration>
<!--
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
-->
@ -66,78 +66,78 @@
<!-- Packages from dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>3.7.0-3.20271.4</MicrosoftNetCompilersToolsetPackageVersion>
<!-- Packages from dotnet/runtime -->
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppInternalPackageVersion>5.0.0-preview.6.20302.5</MicrosoftNETCoreAppInternalPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-preview.6.20302.5</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-preview.6.20302.5</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftWin32RegistryPackageVersion>5.0.0-preview.6.20302.5</MicrosoftWin32RegistryPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftWin32SystemEventsPackageVersion>
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsCachingAbstractionsPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationIniPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationIniPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsConfigurationXmlPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
<MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsFileProvidersCompositePackageVersion>
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsHostingPackageVersion>
<MicrosoftExtensionsHttpPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsHttpPackageVersion>
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingEventSourcePackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsLoggingEventSourcePackageVersion>
<MicrosoftExtensionsLoggingEventLogPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsLoggingEventLogPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsPrimitivesPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsPrimitivesPackageVersion>
<MicrosoftExtensionsInternalTransportPackageVersion>5.0.0-preview.6.20302.5</MicrosoftExtensionsInternalTransportPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>5.0.0-preview.6.20302.5</SystemComponentModelAnnotationsPackageVersion>
<SystemDiagnosticsDiagnosticSourcePackageVersion>5.0.0-preview.6.20302.5</SystemDiagnosticsDiagnosticSourcePackageVersion>
<SystemDiagnosticsEventLogPackageVersion>5.0.0-preview.6.20302.5</SystemDiagnosticsEventLogPackageVersion>
<SystemDrawingCommonPackageVersion>5.0.0-preview.6.20302.5</SystemDrawingCommonPackageVersion>
<SystemIOPipelinesPackageVersion>5.0.0-preview.6.20302.5</SystemIOPipelinesPackageVersion>
<SystemNetHttpJsonPackageVersion>5.0.0-preview.6.20302.5</SystemNetHttpJsonPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>5.0.0-preview.6.20302.5</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0-preview.6.20302.5</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemReflectionMetadataPackageVersion>5.0.0-preview.6.20302.5</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0-preview.6.20302.5</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityCryptographyCngPackageVersion>5.0.0-preview.6.20302.5</SystemSecurityCryptographyCngPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>5.0.0-preview.6.20302.5</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-preview.6.20302.5</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>5.0.0-preview.6.20302.5</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-preview.6.20302.5</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>5.0.0-preview.6.20302.5</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>5.0.0-preview.6.20302.5</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>5.0.0-preview.6.20302.5</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>5.0.0-preview.6.20302.5</SystemThreadingChannelsPackageVersion>
<SystemWindowsExtensionsPackageVersion>5.0.0-preview.6.20302.5</SystemWindowsExtensionsPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppInternalPackageVersion>5.0.0-preview.7.20303.11</MicrosoftNETCoreAppInternalPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-preview.7.20303.11</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-preview.7.20303.11</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftWin32RegistryPackageVersion>5.0.0-preview.7.20303.11</MicrosoftWin32RegistryPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftWin32SystemEventsPackageVersion>
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsCachingAbstractionsPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationIniPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationIniPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsConfigurationXmlPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
<MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsFileProvidersCompositePackageVersion>
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsHostingPackageVersion>
<MicrosoftExtensionsHttpPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsHttpPackageVersion>
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingEventSourcePackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsLoggingEventSourcePackageVersion>
<MicrosoftExtensionsLoggingEventLogPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsLoggingEventLogPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsPrimitivesPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsPrimitivesPackageVersion>
<MicrosoftExtensionsInternalTransportPackageVersion>5.0.0-preview.7.20303.11</MicrosoftExtensionsInternalTransportPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>5.0.0-preview.7.20303.11</SystemComponentModelAnnotationsPackageVersion>
<SystemDiagnosticsDiagnosticSourcePackageVersion>5.0.0-preview.7.20303.11</SystemDiagnosticsDiagnosticSourcePackageVersion>
<SystemDiagnosticsEventLogPackageVersion>5.0.0-preview.7.20303.11</SystemDiagnosticsEventLogPackageVersion>
<SystemDrawingCommonPackageVersion>5.0.0-preview.7.20303.11</SystemDrawingCommonPackageVersion>
<SystemIOPipelinesPackageVersion>5.0.0-preview.7.20303.11</SystemIOPipelinesPackageVersion>
<SystemNetHttpJsonPackageVersion>5.0.0-preview.7.20303.11</SystemNetHttpJsonPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>5.0.0-preview.7.20303.11</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0-preview.7.20303.11</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemReflectionMetadataPackageVersion>5.0.0-preview.7.20303.11</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0-preview.7.20303.11</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityCryptographyCngPackageVersion>5.0.0-preview.7.20303.11</SystemSecurityCryptographyCngPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>5.0.0-preview.7.20303.11</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-preview.7.20303.11</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>5.0.0-preview.7.20303.11</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-preview.7.20303.11</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>5.0.0-preview.7.20303.11</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>5.0.0-preview.7.20303.11</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>5.0.0-preview.7.20303.11</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>5.0.0-preview.7.20303.11</SystemThreadingChannelsPackageVersion>
<SystemWindowsExtensionsPackageVersion>5.0.0-preview.7.20303.11</SystemWindowsExtensionsPackageVersion>
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-preview.6.20302.5</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-preview.7.20303.11</MicrosoftNETCorePlatformsPackageVersion>
<!-- Packages from dotnet/blazor -->
<MicrosoftAspNetCoreComponentsWebAssemblyRuntimePackageVersion>3.2.0</MicrosoftAspNetCoreComponentsWebAssemblyRuntimePackageVersion>
<!-- Packages from dotnet/efcore -->
<dotnetefPackageVersion>5.0.0-preview.6.20303.5</dotnetefPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-preview.6.20303.5</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>5.0.0-preview.6.20303.5</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>5.0.0-preview.6.20303.5</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>5.0.0-preview.6.20303.5</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>5.0.0-preview.6.20303.5</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>5.0.0-preview.6.20303.5</MicrosoftEntityFrameworkCorePackageVersion>
<dotnetefPackageVersion>5.0.0-preview.7.20304.1</dotnetefPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-preview.7.20304.1</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>5.0.0-preview.7.20304.1</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>5.0.0-preview.7.20304.1</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>5.0.0-preview.7.20304.1</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>5.0.0-preview.7.20304.1</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>5.0.0-preview.7.20304.1</MicrosoftEntityFrameworkCorePackageVersion>
</PropertyGroup>
<!--

0
eng/common/SetupNugetSources.sh Normal file → Executable file
View File

View File

@ -272,7 +272,7 @@ namespace RunTests
// Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
var result = await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
commonTestArgs + " --TestCaseFilter:\"Quarantined!=true\"",
commonTestArgs + " --TestCaseFilter:\"Quarantined!=true|Quarantined=false\"",
environmentVariables: EnvironmentVariables,
outputDataReceived: Console.WriteLine,
errorDataReceived: Console.Error.WriteLine,

View File

@ -92,4 +92,8 @@ echo "Running tests: $DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj
$DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9 --helixTimeout ${10}
exit_code=$?
echo "Finished tests...exit_code=$exit_code"
# dotnet-install.sh leaves the temporary SDK archive on the helix machine which slowly fills the disk, we'll be nice and clean it until the script fixes the issue
rm -r -f ${TMPDIR:-/tmp}/dotnet.*
exit $exit_code

View File

@ -20,9 +20,13 @@
<HelixBuild>private-$(USERNAME)</HelixBuild>
<HelixBuild Condition=" '$(USERNAME)' == '' ">private-$(USER)</HelixBuild>
<IsExternal>true</IsExternal>
<SkipInvalidConfigurations>true</SkipInvalidConfigurations>
<MaxRetryCount Condition="'$(MaxRetryCount)' == ''">2</MaxRetryCount>
<HelixAccessToken Condition="'$(_UseHelixOpenQueues)' != 'true'">$(HelixApiAccessToken)</HelixAccessToken>
<!-- Copied from Microsoft.NET.DefaultOutputPaths.targets in the .NET SDK. The Helix SDK contains nothing similar. -->
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">bin\</BaseOutputPath>
<OutputPath Condition="'$(OutputPath)' == '' and '$(PlatformName)' == 'AnyCPU'">$(BaseOutputPath)$(Configuration)\</OutputPath>
<OutputPath Condition="'$(OutputPath)' == '' and '$(PlatformName)' != 'AnyCPU'">$(BaseOutputPath)$(PlatformName)\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(ContinuousIntegrationBuild)' == 'true' ">

View File

@ -42,6 +42,7 @@
<Reference Include="Microsoft.AspNetCore.Testing" />
<Reference Include="Moq" />
<Reference Include="NETStandard.Library" />
<Compile Include="$(SharedSourceRoot)test\SuccessfulTests.cs" LinkBase="SharedTests" />
</ItemGroup>
<Import Project="$(RepoRoot)src\Testing\src\build\Microsoft.AspNetCore.Testing.props" Condition=" '$(IsTestProject)' == 'true' " />

View File

@ -28,6 +28,17 @@
</ItemGroup>
</Target>
<Choose>
<When Condition="'$(Nullable)' != '' AND ('$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFrameworkIdentifier)' == '.NETFramework')">
<PropertyGroup>
<DefineConstants>$(DefineConstants),INTERNAL_NULLABLE_ATTRIBUTES</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(SharedSourceRoot)Nullable\NullableAttributes.cs" />
</ItemGroup>
</When>
</Choose>
<Import Project="Packaging.targets" />
<Import Project="ResolveReferences.targets" />

View File

@ -30,6 +30,7 @@
<HelixAvailableTargetQueue Include="Windows.7.Amd64.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Windows.81.Amd64.Open" Platform="Windows" />
<HelixAvailableTargetQueue Include="Ubuntu.1804.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="Ubuntu.2004.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="Centos.7.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="Debian.8.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="Debian.9.Amd64.Open" Platform="Linux" />

View File

@ -26,11 +26,12 @@
<_TargetFrameworkOverride />
<_TargetFrameworkOverride
Condition=" @(_ResultTargetFramework->Count()) > 1 ">%0A &lt;TargetFrameworks Condition="'%24(DotNetBuildFromSource)' == 'true'"&gt;%24(DefaultNetCoreTargetFramework)&lt;/TargetFrameworks&gt;</_TargetFrameworkOverride>
<_NullableProperty Condition="'$(Nullable)' != ''">%0A &lt;Nullable&gt;annotations&lt;/Nullable&gt;</_NullableProperty>
<ProjectListContentLines><![CDATA[
<!-- This file is automatically generated. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>@(_ResultTargetFramework)</TargetFrameworks>$(_TargetFrameworkOverride)
<TargetFrameworks>@(_ResultTargetFramework)</TargetFrameworks>$(_TargetFrameworkOverride)$(_NullableProperty)
</PropertyGroup>
@(ProjectListContentItem->'%(Identity)', '%0A')
</Project>

View File

@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Content Include="TestFiles\**\*.*" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

View File

@ -34,6 +34,7 @@ namespace A.Internal.Namespace
[Theory]
[MemberData(nameof(PublicMemberDefinitions))]
[QuarantinedTest]
public async Task PublicExposureOfPubternalTypeProducesPUB0001(string member)
{
var code = GetSourceFromNamespaceDeclaration($@"

View File

@ -16,7 +16,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Content Include="TestFiles\**\*.*" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>
</Project>

View File

@ -12,7 +12,6 @@
<ItemGroup>
<Compile Include="$(ComponentsSharedSourceRoot)test\**\*.cs" LinkBase="Helpers" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,27 @@
using System;
using Xunit;
namespace Microsoft.AspNetCore.Blazor.Rendering
{
public class RenderRegistryTest
{
[Fact]
public void RendererRegistry_Find_ThrowsErrorOnNonWASM()
{
// Act
Exception ex = Assert.Throws<ArgumentException>(() => RendererRegistry.Find(123));
// Assert
Assert.Equal("There is no renderer with ID 123.", ex.Message);
}
[Fact]
public void RendererRegistry_Remove_DoesNothingOnNonWASM()
{
// Act
var result = RendererRegistry.TryRemove(123);
// Assert
Assert.False(result);
}
}
}

View File

@ -537,8 +537,8 @@ namespace Microsoft.AspNetCore.Components
return ConvertToNullableBoolCore(obj, culture, out value);
}
internal static BindParser<bool> ConvertToBool = ConvertToBoolCore;
internal static BindParser<bool?> ConvertToNullableBool = ConvertToNullableBoolCore;
internal readonly static BindParser<bool> ConvertToBool = ConvertToBoolCore;
internal readonly static BindParser<bool?> ConvertToNullableBool = ConvertToNullableBoolCore;
private static bool ConvertToBoolCore(object obj, CultureInfo culture, out bool value)
{

View File

@ -12,7 +12,6 @@
<ItemGroup>
<Compile Include="$(ComponentsSharedSourceRoot)test\**\*.cs" LinkBase="Helpers" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
</ItemGroup>
</Project>

View File

@ -11,7 +11,6 @@
<ItemGroup>
<Compile Include="$(ComponentsSharedSourceRoot)test\**\*.cs" LinkBase="Helpers" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
</ItemGroup>
</Project>

View File

@ -11,5 +11,7 @@ namespace Ignitor
{
_componentId = componentId;
}
public int ComponentId => _componentId;
}
}

View File

@ -3,11 +3,16 @@
#nullable enable
using System.Diagnostics;
namespace Ignitor
{
[DebuggerDisplay("{SerializedValue}")]
public abstract class Node
{
public virtual ContainerNode? Parent { get; set; }
public string SerializedValue => NodeSerializer.Serialize(this);
}
}

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.Collections.Generic;
using System.IO;
#nullable enable
@ -20,11 +21,22 @@ namespace Ignitor
}
}
public static string Serialize(Node node)
{
using (var writer = new StringWriter())
{
var serializer = new Serializer(writer);
serializer.Serialize(node);
return writer.ToString();
}
}
private class Serializer
{
private readonly TextWriter _writer;
private int _depth;
private bool _atStartOfLine;
private HashSet<Node> _visited = new HashSet<Node>();
public Serializer(TextWriter writer)
{
@ -35,14 +47,25 @@ namespace Ignitor
{
foreach (var kvp in hive.Components)
{
SerializeComponent(kvp.Key, kvp.Value);
Serialize(kvp.Value);
}
}
private void Serialize(Node node)
public void Serialize(Node node)
{
if (!_visited.Add(node))
{
// This is a child component of a previously seen component. Don't repeat it
return;
}
switch (node)
{
case ComponentNode componentNode:
{
SerializeComponent(componentNode);
break;
}
case ElementNode elementNode:
{
SerializeElement(elementNode);
@ -155,10 +178,10 @@ namespace Ignitor
}
}
private void SerializeComponent(int id, ComponentNode component)
private void SerializeComponent(ComponentNode component)
{
Write("[Component ( ");
Write(id.ToString());
Write(component.ComponentId.ToString());
WriteLine(" )]");
_depth++;
SerializeChildren(component);

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Components.Forms
/// </summary>
public class InputNumber<TValue> : InputBase<TValue>
{
private static string _stepAttributeValue; // Null by default, so only allows whole numbers as per HTML spec
private readonly static string _stepAttributeValue; // Null by default, so only allows whole numbers as per HTML spec
static InputNumber()
{

View File

@ -13,7 +13,6 @@
<ItemGroup>
<Compile Include="$(ComponentsSharedSourceRoot)test\**\*.cs" LinkBase="Helpers" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
</ItemGroup>
</Project>

View File

@ -17,7 +17,7 @@
<_BlazorToolsDir>$(MSBuildThisFileDirectory)bin\$(BlazorBuildConfiguration)\tools\</_BlazorToolsDir>
</PropertyGroup>
<Target Name="Check_BlazorJSFiles" BeforeTargets="Build">
<Target Name="Check_BlazorJSFiles" BeforeTargets="Build" Condition="'$(ExcludeFromBuild)' != 'true'">
<Error Text="blazor.webassembly.js file could not be found at $(_BlazorJsPath)" Condition="!Exists($(_BlazorJsPath))" />
</Target>

View File

@ -4,6 +4,7 @@
using System.IO;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing;
using Xunit;
using static Microsoft.AspNetCore.Components.WebAssembly.Build.WebAssemblyRuntimePackage;
@ -203,6 +204,7 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Build
}
[Fact]
[QuarantinedTest]
public async Task Build_SatelliteAssembliesAreCopiedToBuildOutput()
{
// Arrange

View File

@ -8,6 +8,7 @@ using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Blazor.Build;
using Microsoft.AspNetCore.Testing;
using Xunit;
using ResourceHashesByNameDictionary = System.Collections.Generic.Dictionary<string, string>;
using static Microsoft.AspNetCore.Components.WebAssembly.Build.WebAssemblyRuntimePackage;
@ -284,6 +285,7 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Build
}
[Fact]
[QuarantinedTest]
public async Task Publish_HostedApp_WithLinkOnBuildTrue_Works()
{
// Arrange

View File

@ -34,7 +34,6 @@
<ItemGroup>
<ProjectReference Include="..\..\testassets\StandaloneApp\StandaloneApp.csproj" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />
</ItemGroup>

View File

@ -7,7 +7,7 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.AspNetCore.Testing;
using Xunit;
namespace Microsoft.AspNetCore.Components.WebAssembly.Build

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace Microsoft.AspNetCore.Components.WebAssembly.Rendering
{
@ -14,27 +15,36 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Rendering
// them even though we might still receive incoming events from JS.
private static int _nextId;
private static Dictionary<int, WebAssemblyRenderer> _renderers = new Dictionary<int, WebAssemblyRenderer>();
private static Dictionary<int, WebAssemblyRenderer> _renderers;
static RendererRegistry()
{
bool _isWebAssembly = RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
if (_isWebAssembly)
{
_renderers = new Dictionary<int, WebAssemblyRenderer>();
}
}
internal static WebAssemblyRenderer Find(int rendererId)
{
return _renderers.ContainsKey(rendererId)
? _renderers[rendererId]
return _renderers != null && _renderers.ContainsKey(rendererId)
? _renderers?[rendererId]
: throw new ArgumentException($"There is no renderer with ID {rendererId}.");
}
public static int Add(WebAssemblyRenderer renderer)
{
var id = _nextId++;
_renderers.Add(id, renderer);
_renderers?.Add(id, renderer);
return id;
}
public static bool TryRemove(int rendererId)
{
if (_renderers.ContainsKey(rendererId))
if (_renderers != null && _renderers.ContainsKey(rendererId))
{
_renderers.Remove(rendererId);
_renderers?.Remove(rendererId);
return true;
}
else

View File

@ -11,11 +11,11 @@
"blazorwasmbenchmark": {
"source": {
"repository": "https://github.com/dotnet/AspNetCore.git",
"branchOrCommit": "blazor-wasm",
"branchOrCommit": "master",
"dockerfile": "src/Components/benchmarkapps/Wasm.Performance/dockerfile"
},
"buildArguments": [
"gitBranch=blazor-wasm"
"gitBranch=master"
],
"waitForExit": true,
"readyStateText": "Application started."

View File

@ -12,7 +12,7 @@ RUN apt-get update \
nodejs \
git
ARG gitBranch=blazor-wasm
ARG gitBranch=master
WORKDIR /src
ADD https://api.github.com/repos/dotnet/aspnetcore/git/ref/heads/${gitBranch} /aspnetcore.commit

View File

@ -42,6 +42,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
}
[Fact]
[QuarantinedTest]
public void CanRenderTextOnlyComponent()
{
var appElement = Browser.MountTestComponent<TextOnlyComponent>();

View File

@ -7,7 +7,6 @@
<ItemGroup>
<Compile Include="..\..\shared\test\*.cs" />
<Content Include="TestFiles\**\*" CopyToOutputDirectory="PreserveNewest" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -5,7 +5,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Compile Include="$(SharedSourceRoot)EventSource.Testing\TestEventListener.cs" />
<Compile Include="$(SharedSourceRoot)EventSource.Testing\TestCounterListener.cs" />
<Content Include="testroot\**\*" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />

View File

@ -2,6 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<Nullable>annotations</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
<Compile Include="Microsoft.AspNetCore.Html.Abstractions.netcoreapp.cs" />

View File

@ -3,15 +3,16 @@
namespace Microsoft.AspNetCore.Html
{
[System.Diagnostics.DebuggerDisplayAttribute("{DebuggerToString()}")]
public partial class HtmlContentBuilder : Microsoft.AspNetCore.Html.IHtmlContent, Microsoft.AspNetCore.Html.IHtmlContentBuilder, Microsoft.AspNetCore.Html.IHtmlContentContainer
{
public HtmlContentBuilder() { }
public HtmlContentBuilder(System.Collections.Generic.IList<object> entries) { }
public HtmlContentBuilder(int capacity) { }
public int Count { get { throw null; } }
public Microsoft.AspNetCore.Html.IHtmlContentBuilder Append(string unencoded) { throw null; }
public Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendHtml(Microsoft.AspNetCore.Html.IHtmlContent htmlContent) { throw null; }
public Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendHtml(string encoded) { throw null; }
public Microsoft.AspNetCore.Html.IHtmlContentBuilder Append(string? unencoded) { throw null; }
public Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendHtml(Microsoft.AspNetCore.Html.IHtmlContent? htmlContent) { throw null; }
public Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendHtml(string? encoded) { throw null; }
public Microsoft.AspNetCore.Html.IHtmlContentBuilder Clear() { throw null; }
public void CopyTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) { }
public void MoveTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) { }
@ -32,7 +33,7 @@ namespace Microsoft.AspNetCore.Html
[System.Diagnostics.DebuggerDisplayAttribute("{DebuggerToString()}")]
public partial class HtmlFormattableString : Microsoft.AspNetCore.Html.IHtmlContent
{
public HtmlFormattableString(System.IFormatProvider formatProvider, string format, params object[] args) { }
public HtmlFormattableString(System.IFormatProvider? formatProvider, string format, params object[] args) { }
public HtmlFormattableString(string format, params object[] args) { }
public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) { }
}
@ -40,8 +41,8 @@ namespace Microsoft.AspNetCore.Html
{
public static readonly Microsoft.AspNetCore.Html.HtmlString Empty;
public static readonly Microsoft.AspNetCore.Html.HtmlString NewLine;
public HtmlString(string value) { }
public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public HtmlString(string? value) { }
public string? Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public override string ToString() { throw null; }
public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) { }
}

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text.Encodings.Web;
@ -11,6 +12,7 @@ namespace Microsoft.AspNetCore.Html
/// <summary>
/// An <see cref="IHtmlContentBuilder"/> implementation using an in memory list.
/// </summary>
[DebuggerDisplay("{DebuggerToString()}")]
public class HtmlContentBuilder : IHtmlContentBuilder
{
/// <summary>
@ -61,7 +63,7 @@ namespace Microsoft.AspNetCore.Html
internal IList<object> Entries { get; }
/// <inheritdoc />
public IHtmlContentBuilder Append(string unencoded)
public IHtmlContentBuilder Append(string? unencoded)
{
if (!string.IsNullOrEmpty(unencoded))
{
@ -72,7 +74,7 @@ namespace Microsoft.AspNetCore.Html
}
/// <inheritdoc />
public IHtmlContentBuilder AppendHtml(IHtmlContent htmlContent)
public IHtmlContentBuilder AppendHtml(IHtmlContent? htmlContent)
{
if (htmlContent == null)
{
@ -84,7 +86,7 @@ namespace Microsoft.AspNetCore.Html
}
/// <inheritdoc />
public IHtmlContentBuilder AppendHtml(string encoded)
public IHtmlContentBuilder AppendHtml(string? encoded)
{
if (!string.IsNullOrEmpty(encoded))
{
@ -113,13 +115,11 @@ namespace Microsoft.AspNetCore.Html
{
var entry = Entries[i];
string entryAsString;
IHtmlContentContainer entryAsContainer;
if ((entryAsString = entry as string) != null)
if (entry is string entryAsString)
{
destination.Append(entryAsString);
}
else if ((entryAsContainer = entry as IHtmlContentContainer) != null)
else if (entry is IHtmlContentContainer entryAsContainer)
{
// Since we're copying, do a deep flatten.
entryAsContainer.CopyTo(destination);
@ -144,13 +144,11 @@ namespace Microsoft.AspNetCore.Html
{
var entry = Entries[i];
string entryAsString;
IHtmlContentContainer entryAsContainer;
if ((entryAsString = entry as string) != null)
if (entry is string entryAsString)
{
destination.Append(entryAsString);
}
else if ((entryAsContainer = entry as IHtmlContentContainer) != null)
else if (entry is IHtmlContentContainer entryAsContainer)
{
// Since we're moving, do a deep flatten.
entryAsContainer.MoveTo(destination);
@ -197,11 +195,9 @@ namespace Microsoft.AspNetCore.Html
private string DebuggerToString()
{
using (var writer = new StringWriter())
{
WriteTo(writer, HtmlEncoder.Default);
return writer.ToString();
}
using var writer = new StringWriter();
WriteTo(writer, HtmlEncoder.Default);
return writer.ToString();
}
}
}

View File

@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
@ -39,7 +39,7 @@ namespace Microsoft.AspNetCore.Html
/// <param name="formatProvider">An object that provides culture-specific formatting information.</param>
/// <param name="format">A composite format string.</param>
/// <param name="args">An array that contains objects to format.</param>
public HtmlFormattableString(IFormatProvider formatProvider, string format, params object[] args)
public HtmlFormattableString(IFormatProvider? formatProvider, string format, params object[] args)
{
if (format == null)
{
@ -94,7 +94,7 @@ namespace Microsoft.AspNetCore.Html
private readonly HtmlEncoder _encoder;
private readonly IFormatProvider _formatProvider;
private StringWriter _writer;
private StringWriter? _writer;
public EncodingFormatProvider(IFormatProvider formatProvider, HtmlEncoder encoder)
{
@ -105,7 +105,7 @@ namespace Microsoft.AspNetCore.Html
_encoder = encoder;
}
public string Format(string format, object arg, IFormatProvider formatProvider)
public string Format(string? format, object? arg, IFormatProvider? formatProvider)
{
// These are the cases we need to special case. We trust the HtmlString or IHtmlContent instance
// to do the right thing with encoding.
@ -118,7 +118,7 @@ namespace Microsoft.AspNetCore.Html
var htmlContent = arg as IHtmlContent;
if (htmlContent != null)
{
_writer = _writer ?? new StringWriter();
_writer ??= new StringWriter();
htmlContent.WriteTo(_writer, _encoder);
@ -133,7 +133,7 @@ namespace Microsoft.AspNetCore.Html
//
// First check for an ICustomFormatter - if the IFormatProvider is a CultureInfo, then it's likely
// that ICustomFormatter will be null.
var customFormatter = (ICustomFormatter)_formatProvider.GetFormat(typeof(ICustomFormatter));
var customFormatter = (ICustomFormatter?)_formatProvider.GetFormat(typeof(ICustomFormatter));
if (customFormatter != null)
{
var result = customFormatter.Format(format, arg, _formatProvider);
@ -170,7 +170,7 @@ namespace Microsoft.AspNetCore.Html
return string.Empty;
}
public object GetFormat(Type formatType)
public object? GetFormat(Type? formatType)
{
if (formatType == typeof(ICustomFormatter))
{

View File

@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Html
/// Creates a new <see cref="HtmlString"/>.
/// </summary>
/// <param name="value">The HTML encoded value.</param>
public HtmlString(string value)
public HtmlString(string? value)
{
Value = value;
}
@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Html
/// <summary>
/// Gets the HTML encoded value.
/// </summary>
public string Value { get; }
public string? Value { get; }
/// <inheritdoc />
public void WriteTo(TextWriter writer, HtmlEncoder encoder)

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>ASP.NET Core HTML abstractions used for building HTML content.
@ -11,6 +11,7 @@ Microsoft.AspNetCore.Html.IHtmlContent</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore</PackageTags>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -256,7 +256,7 @@ namespace Microsoft.Extensions.Internal
return _content.GetHashCode();
}
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
var other = obj as TestHtmlContent;
if (other != null)
@ -267,9 +267,9 @@ namespace Microsoft.Extensions.Internal
return base.Equals(obj);
}
public bool Equals(TestHtmlContent other)
public bool Equals(TestHtmlContent? other)
{
return string.Equals(_content, other._content);
return other != null && string.Equals(_content, other._content);
}
}
}

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>

View File

@ -2,11 +2,9 @@
// 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.Text;
using Microsoft.AspNetCore.Testing;
using Microsoft.AspNetCore.Testing.xunit;
using Xunit;
namespace Microsoft.AspNetCore.Http.Tests
{
public class BindingAddressTests

View File

@ -12,7 +12,6 @@
<FrameworkReference Remove="Microsoft.AspNetCore.App" />
<Reference Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -296,12 +296,12 @@ namespace Microsoft.AspNetCore.Identity
}
/// <summary>
/// Validates the security stamp for the specified <paramref name="user"/>. Will always return false
/// if the userManager does not support security stamps.
/// Validates the security stamp for the specified <paramref name="user"/>. If no user is specified, or if the store
/// does not support security stamps, validation is considered successful.
/// </summary>
/// <param name="user">The user whose stamp should be validated.</param>
/// <param name="securityStamp">The expected security stamp value.</param>
/// <returns>True if the stamp matches the persisted value, otherwise it will return false.</returns>
/// <returns>The result of the validation.</returns>
public virtual async Task<bool> ValidateSecurityStampAsync(TUser user, string securityStamp)
=> user != null &&
// Only validate the security stamp if the store supports it

View File

@ -6,5 +6,16 @@
<header>
<h1>@ViewData["Title"]</h1>
<p>You have successfully logged out of the application.</p>
@{
if (User.Identity.IsAuthenticated)
{
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/", new { area = "" })" method="post">
<button type="submit" class="nav-link btn btn-link text-dark">Click here to Logout</button>
</form>
}
else
{
<p>You have successfully logged out of the application.</p>
}
}
</header>

View File

@ -6,5 +6,16 @@
<header>
<h1>@ViewData["Title"]</h1>
<p>You have successfully logged out of the application.</p>
@{
if (User.Identity.IsAuthenticated)
{
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/", new { area = "" })" method="post">
<button type="submit" class="nav-link btn btn-link text-dark">Click here to Logout</button>
</form>
}
else
{
<p>You have successfully logged out of the application.</p>
}
}
</header>

View File

@ -6,7 +6,6 @@
<ItemGroup>
<Compile Include="$(IdentityTestSharedSourceRoot)**\*.cs" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<Nullable>annotations</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Compile Include="Microsoft.Extensions.Localization.Abstractions.netstandard2.0.cs" />

View File

@ -21,10 +21,10 @@ namespace Microsoft.Extensions.Localization
{
public LocalizedString(string name, string value) { }
public LocalizedString(string name, string value, bool resourceNotFound) { }
public LocalizedString(string name, string value, bool resourceNotFound, string searchedLocation) { }
public LocalizedString(string name, string value, bool resourceNotFound, string? searchedLocation) { }
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public string? SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public static implicit operator string (Microsoft.Extensions.Localization.LocalizedString localizedString) { throw null; }
public override string ToString() { throw null; }

View File

@ -21,10 +21,10 @@ namespace Microsoft.Extensions.Localization
{
public LocalizedString(string name, string value) { }
public LocalizedString(string name, string value, bool resourceNotFound) { }
public LocalizedString(string name, string value, bool resourceNotFound, string searchedLocation) { }
public LocalizedString(string name, string value, bool resourceNotFound, string? searchedLocation) { }
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public bool ResourceNotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public string SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public string? SearchedLocation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public static implicit operator string (Microsoft.Extensions.Localization.LocalizedString localizedString) { throw null; }
public override string ToString() { throw null; }

View File

@ -38,7 +38,7 @@ namespace Microsoft.Extensions.Localization
/// <param name="value">The actual string.</param>
/// <param name="resourceNotFound">Whether the string was not found in a resource. Set this to <c>true</c> to indicate an alternate string value was used.</param>
/// <param name="searchedLocation">The location which was searched for a localization value.</param>
public LocalizedString(string name, string value, bool resourceNotFound, string searchedLocation)
public LocalizedString(string name, string value, bool resourceNotFound, string? searchedLocation)
{
if (name == null)
{
@ -60,7 +60,7 @@ namespace Microsoft.Extensions.Localization
/// Implicitly converts the <see cref="LocalizedString"/> to a <see cref="string"/>.
/// </summary>
/// <param name="localizedString">The string to be implicitly converted.</param>
public static implicit operator string(LocalizedString localizedString)
public static implicit operator string?(LocalizedString localizedString)
{
return localizedString?.Value;
}
@ -83,7 +83,7 @@ namespace Microsoft.Extensions.Localization
/// <summary>
/// The location which was searched for a localization value.
/// </summary>
public string SearchedLocation { get; }
public string? SearchedLocation { get; }
/// <summary>
/// Returns the actual string.

View File

@ -13,6 +13,7 @@ Microsoft.Extensions.Localization.IStringLocalizer&lt;T&gt;</Description>
<PackageTags>localization</PackageTags>
<IsPackable>true</IsPackable>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<Nullable>annotations</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Compile Include="Microsoft.Extensions.Localization.netstandard2.0.cs" />

View File

@ -13,7 +13,7 @@ namespace Microsoft.Extensions.Localization
{
public partial interface IResourceNamesCache
{
System.Collections.Generic.IList<string> GetOrAdd(string name, System.Func<string, System.Collections.Generic.IList<string>> valueFactory);
System.Collections.Generic.IList<string>? GetOrAdd(string name, System.Func<string, System.Collections.Generic.IList<string>?> valueFactory);
}
public partial class LocalizationOptions
{
@ -35,7 +35,7 @@ namespace Microsoft.Extensions.Localization
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } }
public virtual System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures) { throw null; }
protected System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures, System.Globalization.CultureInfo culture) { throw null; }
protected string GetStringSafely(string name, System.Globalization.CultureInfo culture) { throw null; }
protected string? GetStringSafely(string name, System.Globalization.CultureInfo? culture) { throw null; }
}
public partial class ResourceManagerStringLocalizerFactory : Microsoft.Extensions.Localization.IStringLocalizerFactory
{
@ -43,17 +43,17 @@ namespace Microsoft.Extensions.Localization
public Microsoft.Extensions.Localization.IStringLocalizer Create(string baseName, string location) { throw null; }
public Microsoft.Extensions.Localization.IStringLocalizer Create(System.Type resourceSource) { throw null; }
protected virtual Microsoft.Extensions.Localization.ResourceManagerStringLocalizer CreateResourceManagerStringLocalizer(System.Reflection.Assembly assembly, string baseName) { throw null; }
protected virtual Microsoft.Extensions.Localization.ResourceLocationAttribute GetResourceLocationAttribute(System.Reflection.Assembly assembly) { throw null; }
protected virtual Microsoft.Extensions.Localization.ResourceLocationAttribute? GetResourceLocationAttribute(System.Reflection.Assembly assembly) { throw null; }
protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo) { throw null; }
protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo, string baseNamespace, string resourcesRelativePath) { throw null; }
protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo, string? baseNamespace, string? resourcesRelativePath) { throw null; }
protected virtual string GetResourcePrefix(string baseResourceName, string baseNamespace) { throw null; }
protected virtual string GetResourcePrefix(string location, string baseName, string resourceLocation) { throw null; }
protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute GetRootNamespaceAttribute(System.Reflection.Assembly assembly) { throw null; }
protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute? GetRootNamespaceAttribute(System.Reflection.Assembly assembly) { throw null; }
}
public partial class ResourceNamesCache : Microsoft.Extensions.Localization.IResourceNamesCache
{
public ResourceNamesCache() { }
public System.Collections.Generic.IList<string> GetOrAdd(string name, System.Func<string, System.Collections.Generic.IList<string>> valueFactory) { throw null; }
public System.Collections.Generic.IList<string>? GetOrAdd(string name, System.Func<string, System.Collections.Generic.IList<string>?> valueFactory) { throw null; }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
public partial class RootNamespaceAttribute : System.Attribute
@ -69,15 +69,15 @@ namespace Microsoft.Extensions.Localization.Internal
public AssemblyWrapper(System.Reflection.Assembly assembly) { }
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public virtual string FullName { get { throw null; } }
public virtual System.IO.Stream GetManifestResourceStream(string name) { throw null; }
public virtual System.IO.Stream? GetManifestResourceStream(string name) { throw null; }
}
public partial interface IResourceStringProvider
{
System.Collections.Generic.IList<string> GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing);
System.Collections.Generic.IList<string>? GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing);
}
public partial class ResourceManagerStringProvider : Microsoft.Extensions.Localization.Internal.IResourceStringProvider
{
public ResourceManagerStringProvider(Microsoft.Extensions.Localization.IResourceNamesCache resourceCache, System.Resources.ResourceManager resourceManager, System.Reflection.Assembly assembly, string baseName) { }
public System.Collections.Generic.IList<string> GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing) { throw null; }
public System.Collections.Generic.IList<string>? GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing) { throw null; }
}
}

View File

@ -13,7 +13,7 @@ namespace Microsoft.Extensions.Localization
{
public partial interface IResourceNamesCache
{
System.Collections.Generic.IList<string> GetOrAdd(string name, System.Func<string, System.Collections.Generic.IList<string>> valueFactory);
System.Collections.Generic.IList<string>? GetOrAdd(string name, System.Func<string, System.Collections.Generic.IList<string>?> valueFactory);
}
public partial class LocalizationOptions
{
@ -35,7 +35,7 @@ namespace Microsoft.Extensions.Localization
public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get { throw null; } }
public virtual System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures) { throw null; }
protected System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> GetAllStrings(bool includeParentCultures, System.Globalization.CultureInfo culture) { throw null; }
protected string GetStringSafely(string name, System.Globalization.CultureInfo culture) { throw null; }
protected string? GetStringSafely(string name, System.Globalization.CultureInfo? culture) { throw null; }
}
public partial class ResourceManagerStringLocalizerFactory : Microsoft.Extensions.Localization.IStringLocalizerFactory
{
@ -43,17 +43,17 @@ namespace Microsoft.Extensions.Localization
public Microsoft.Extensions.Localization.IStringLocalizer Create(string baseName, string location) { throw null; }
public Microsoft.Extensions.Localization.IStringLocalizer Create(System.Type resourceSource) { throw null; }
protected virtual Microsoft.Extensions.Localization.ResourceManagerStringLocalizer CreateResourceManagerStringLocalizer(System.Reflection.Assembly assembly, string baseName) { throw null; }
protected virtual Microsoft.Extensions.Localization.ResourceLocationAttribute GetResourceLocationAttribute(System.Reflection.Assembly assembly) { throw null; }
protected virtual Microsoft.Extensions.Localization.ResourceLocationAttribute? GetResourceLocationAttribute(System.Reflection.Assembly assembly) { throw null; }
protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo) { throw null; }
protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo, string baseNamespace, string resourcesRelativePath) { throw null; }
protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo, string? baseNamespace, string? resourcesRelativePath) { throw null; }
protected virtual string GetResourcePrefix(string baseResourceName, string baseNamespace) { throw null; }
protected virtual string GetResourcePrefix(string location, string baseName, string resourceLocation) { throw null; }
protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute GetRootNamespaceAttribute(System.Reflection.Assembly assembly) { throw null; }
protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute? GetRootNamespaceAttribute(System.Reflection.Assembly assembly) { throw null; }
}
public partial class ResourceNamesCache : Microsoft.Extensions.Localization.IResourceNamesCache
{
public ResourceNamesCache() { }
public System.Collections.Generic.IList<string> GetOrAdd(string name, System.Func<string, System.Collections.Generic.IList<string>> valueFactory) { throw null; }
public System.Collections.Generic.IList<string>? GetOrAdd(string name, System.Func<string, System.Collections.Generic.IList<string>?> valueFactory) { throw null; }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
public partial class RootNamespaceAttribute : System.Attribute
@ -69,15 +69,15 @@ namespace Microsoft.Extensions.Localization.Internal
public AssemblyWrapper(System.Reflection.Assembly assembly) { }
public System.Reflection.Assembly Assembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public virtual string FullName { get { throw null; } }
public virtual System.IO.Stream GetManifestResourceStream(string name) { throw null; }
public virtual System.IO.Stream? GetManifestResourceStream(string name) { throw null; }
}
public partial interface IResourceStringProvider
{
System.Collections.Generic.IList<string> GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing);
System.Collections.Generic.IList<string>? GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing);
}
public partial class ResourceManagerStringProvider : Microsoft.Extensions.Localization.Internal.IResourceStringProvider
{
public ResourceManagerStringProvider(Microsoft.Extensions.Localization.IResourceNamesCache resourceCache, System.Resources.ResourceManager resourceManager, System.Reflection.Assembly assembly, string baseName) { }
public System.Collections.Generic.IList<string> GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing) { throw null; }
public System.Collections.Generic.IList<string>? GetAllResourceStrings(System.Globalization.CultureInfo culture, bool throwOnMissing) { throw null; }
}
}

View File

@ -17,6 +17,6 @@ namespace Microsoft.Extensions.Localization
/// <param name="name">The resource name to add string names for.</param>
/// <param name="valueFactory">The function used to generate the string names for the resource.</param>
/// <returns>The string names for the resource.</returns>
IList<string> GetOrAdd(string name, Func<string, IList<string>> valueFactory);
IList<string>? GetOrAdd(string name, Func<string, IList<string>?> valueFactory);
}
}

View File

@ -25,8 +25,8 @@ namespace Microsoft.Extensions.Localization.Internal
public Assembly Assembly { get; }
public virtual string FullName => Assembly.FullName;
public virtual string FullName => Assembly.FullName!;
public virtual Stream GetManifestResourceStream(string name) => Assembly.GetManifestResourceStream(name);
public virtual Stream? GetManifestResourceStream(string name) => Assembly.GetManifestResourceStream(name);
}
}

View File

@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
@ -12,6 +12,6 @@ namespace Microsoft.Extensions.Localization.Internal
/// </summary>
public interface IResourceStringProvider
{
IList<string> GetAllResourceStrings(CultureInfo culture, bool throwOnMissing);
IList<string>? GetAllResourceStrings(CultureInfo culture, bool throwOnMissing);
}
}

View File

@ -1,5 +1,5 @@
// 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.
// 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;
@ -9,7 +9,7 @@ namespace Microsoft.Extensions.Localization.Internal
{
internal static class ResourceManagerStringLocalizerLoggerExtensions
{
private static readonly Action<ILogger, string, string, CultureInfo, Exception> _searchedLocation;
private static readonly Action<ILogger, string, string, CultureInfo, Exception?> _searchedLocation;
static ResourceManagerStringLocalizerLoggerExtensions()
{

View File

@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections;
@ -51,7 +51,7 @@ namespace Microsoft.Extensions.Localization.Internal
return resourceStreamName;
}
public IList<string> GetAllResourceStrings(CultureInfo culture, bool throwOnMissing)
public IList<string>? GetAllResourceStrings(CultureInfo culture, bool throwOnMissing)
{
var cacheKey = GetResourceCacheKey(culture);
@ -72,9 +72,12 @@ namespace Microsoft.Extensions.Localization.Internal
}
var names = new List<string>();
foreach (DictionaryEntry entry in resourceSet)
foreach (DictionaryEntry? entry in resourceSet)
{
names.Add((string)entry.Key);
if (entry?.Key is string key)
{
names.Add(key);
}
}
return names;

View File

@ -10,6 +10,7 @@
<PackageTags>localization</PackageTags>
<IsPackable>true</IsPackable>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Resources;
using Microsoft.Extensions.Localization.Internal;
@ -19,7 +20,7 @@ namespace Microsoft.Extensions.Localization
/// <remarks>This type is thread-safe.</remarks>
public class ResourceManagerStringLocalizer : IStringLocalizer
{
private readonly ConcurrentDictionary<string, object> _missingManifestCache = new ConcurrentDictionary<string, object>();
private readonly ConcurrentDictionary<string, object?> _missingManifestCache = new ConcurrentDictionary<string, object?>();
private readonly IResourceNamesCache _resourceNamesCache;
private readonly ResourceManager _resourceManager;
private readonly IResourceStringProvider _resourceStringProvider;
@ -171,7 +172,7 @@ namespace Microsoft.Extensions.Localization
? GetResourceNamesFromCultureHierarchy(culture)
: _resourceStringProvider.GetAllResourceStrings(culture, true);
foreach (var name in resourceNames)
foreach (var name in resourceNames ?? Enumerable.Empty<string>())
{
var value = GetStringSafely(name, culture);
yield return new LocalizedString(name, value ?? name, resourceNotFound: value == null, searchedLocation: _resourceBaseName);
@ -185,7 +186,7 @@ namespace Microsoft.Extensions.Localization
/// <param name="name">The name of the string resource.</param>
/// <param name="culture">The <see cref="CultureInfo"/> to get the string for.</param>
/// <returns>The resource string, or <c>null</c> if none was found.</returns>
protected string GetStringSafely(string name, CultureInfo culture)
protected string? GetStringSafely(string name, CultureInfo? culture)
{
if (name == null)
{

View File

@ -82,7 +82,7 @@ namespace Microsoft.Extensions.Localization
/// For the type "Sample.Controllers.Home" if there's a resourceRelativePath return
/// "Sample.Resourcepath.Controllers.Home" if there isn't one then it would return "Sample.Controllers.Home".
/// </remarks>
protected virtual string GetResourcePrefix(TypeInfo typeInfo, string baseNamespace, string resourcesRelativePath)
protected virtual string GetResourcePrefix(TypeInfo typeInfo, string? baseNamespace, string? resourcesRelativePath)
{
if (typeInfo == null)
{
@ -94,6 +94,11 @@ namespace Microsoft.Extensions.Localization
throw new ArgumentNullException(nameof(baseNamespace));
}
if (string.IsNullOrEmpty(typeInfo.FullName))
{
throw new ArgumentException(Resources.FormatLocalization_TypeMustHaveTypeName(typeInfo));
}
if (string.IsNullOrEmpty(resourcesRelativePath))
{
return typeInfo.FullName;
@ -219,7 +224,7 @@ namespace Microsoft.Extensions.Localization
/// <param name="assembly">The assembly to get a <see cref="ResourceLocationAttribute"/> from.</param>
/// <returns>The <see cref="ResourceLocationAttribute"/> associated with the given <see cref="Assembly"/>.</returns>
/// <remarks>This method is protected and virtual for testing purposes only.</remarks>
protected virtual ResourceLocationAttribute GetResourceLocationAttribute(Assembly assembly)
protected virtual ResourceLocationAttribute? GetResourceLocationAttribute(Assembly assembly)
{
return assembly.GetCustomAttribute<ResourceLocationAttribute>();
}
@ -228,17 +233,21 @@ namespace Microsoft.Extensions.Localization
/// <param name="assembly">The assembly to get a <see cref="RootNamespaceAttribute"/> from.</param>
/// <returns>The <see cref="RootNamespaceAttribute"/> associated with the given <see cref="Assembly"/>.</returns>
/// <remarks>This method is protected and virtual for testing purposes only.</remarks>
protected virtual RootNamespaceAttribute GetRootNamespaceAttribute(Assembly assembly)
protected virtual RootNamespaceAttribute? GetRootNamespaceAttribute(Assembly assembly)
{
return assembly.GetCustomAttribute<RootNamespaceAttribute>();
}
private string GetRootNamespace(Assembly assembly)
private string? GetRootNamespace(Assembly assembly)
{
var rootNamespaceAttribute = GetRootNamespaceAttribute(assembly);
return rootNamespaceAttribute?.RootNamespace ??
new AssemblyName(assembly.FullName).Name;
if (rootNamespaceAttribute != null)
{
return rootNamespaceAttribute.RootNamespace;
}
return assembly.GetName().Name;
}
private string GetResourcePath(Assembly assembly)
@ -256,7 +265,7 @@ namespace Microsoft.Extensions.Localization
return resourceLocation;
}
private static string TrimPrefix(string name, string prefix)
private static string? TrimPrefix(string name, string prefix)
{
if (name.StartsWith(prefix, StringComparison.Ordinal))
{

View File

@ -12,7 +12,7 @@ namespace Microsoft.Extensions.Localization
/// </summary>
public class ResourceNamesCache : IResourceNamesCache
{
private readonly ConcurrentDictionary<string, IList<string>> _cache = new ConcurrentDictionary<string, IList<string>>();
private readonly ConcurrentDictionary<string, IList<string>?> _cache = new ConcurrentDictionary<string, IList<string>?>();
/// <summary>
/// Creates a new <see cref="ResourceNamesCache" />
@ -22,7 +22,7 @@ namespace Microsoft.Extensions.Localization
}
/// <inheritdoc />
public IList<string> GetOrAdd(string name, Func<string, IList<string>> valueFactory)
public IList<string>? GetOrAdd(string name, Func<string, IList<string>?> valueFactory)
{
return _cache.GetOrAdd(name, valueFactory);
}

View File

@ -123,4 +123,7 @@
<data name="Localization_MissingManifest_Parent" xml:space="preserve">
<value>No manifests exist for the current culture.</value>
</data>
<data name="Localization_TypeMustHaveTypeName" xml:space="preserve">
<value>Type '{0}' must have a non-null type name.</value>
</data>
</root>

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFrameworks>$(DefaultNetCoreTargetFramework);net472</TargetFrameworks>
<RootNamespace>LocalizationTest.Abc</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Remove="NewFolder\**" />

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFrameworks>$(DefaultNetCoreTargetFramework);net472</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>

View File

@ -1,6 +1,7 @@
// 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.
#nullable disable
using System;
using System.IO;
using System.Reflection;
@ -84,7 +85,7 @@ namespace Microsoft.Extensions.Localization.Tests
// Assert
Assert.Equal(typeFactory.BaseName, stringFactory.BaseName);
Assert.Equal(typeFactory.Assembly.FullName, stringFactory.Assembly.FullName);
Assert.Equal(typeFactory.Assembly!.FullName, stringFactory.Assembly!.FullName);
}
[Fact]
@ -293,7 +294,7 @@ namespace Microsoft.Extensions.Localization.Tests
var factory = new ResourceManagerStringLocalizerFactory(localizationOptions: options.Object, loggerFactory: loggerFactory);
// Act & Assert
Assert.Throws<ArgumentNullException>(() => factory.Create("baseName", location: null));
Assert.Throws<ArgumentNullException>(() => factory.Create("baseName", location: null!));
}
}
}

View File

@ -249,9 +249,9 @@ namespace Microsoft.Extensions.Localization
_assemblyWrapper = assemblyWrapper;
}
public override string GetString(string name, CultureInfo culture) => null;
public override string? GetString(string name, CultureInfo? culture) => null;
public override ResourceSet GetResourceSet(CultureInfo culture, bool createIfNotExists, bool tryParents)
public override ResourceSet? GetResourceSet(CultureInfo culture, bool createIfNotExists, bool tryParents)
{
var resourceStream = _assemblyWrapper.GetManifestResourceStream(BaseName);
@ -287,7 +287,7 @@ namespace Microsoft.Extensions.Localization
public int ManifestResourceStreamCallCount { get; private set; }
public override Stream GetManifestResourceStream(string name)
public override Stream? GetManifestResourceStream(string name)
{
ManifestResourceStreamCallCount++;

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.Globalization;
using Moq;
using Xunit;
@ -15,7 +14,7 @@ namespace Microsoft.Extensions.Localization
{
// Arrange, act and assert
var exception = Assert.Throws<ArgumentNullException>(
() => new StringLocalizer<object>(factory: null));
() => new StringLocalizer<object>(factory: null!));
Assert.Equal("factory", exception.ParamName);
}
@ -45,7 +44,7 @@ namespace Microsoft.Extensions.Localization
var localizer = new StringLocalizer<object>(factory.Object);
// Act and assert
var exception = Assert.Throws<ArgumentNullException>(() => localizer[name: null]);
var exception = Assert.Throws<ArgumentNullException>(() => localizer[name: null!]);
Assert.Equal("name", exception.ParamName);
}
@ -80,7 +79,7 @@ namespace Microsoft.Extensions.Localization
var localizer = new StringLocalizer<object>(factory.Object);
// Act and assert
var exception = Assert.Throws<ArgumentNullException>(() => localizer[name: null]);
var exception = Assert.Throws<ArgumentNullException>(() => localizer[name: null!]);
Assert.Equal("name", exception.ParamName);
}

View File

@ -15,8 +15,6 @@
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<Reference Include="Microsoft.Extensions.Logging.Abstractions" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
</ItemGroup>
</Project>

View File

@ -8,7 +8,6 @@
<ItemGroup>
<Reference Include="Microsoft.AspNetCore.NodeServices" />
<Reference Include="Microsoft.AspNetCore.TestHost" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Content Include="js\**\*" />
</ItemGroup>

View File

@ -8,7 +8,6 @@
<ItemGroup>
<None Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Compile Remove="TestFiles\TagHelpersInCodeBlocksAnalyzerTest\*.*" />
<Content Include="TestFiles\**\*.*" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>

View File

@ -8,7 +8,6 @@
<ItemGroup>
<Compile Include="..\..\Mvc.Analyzers\test\Infrastructure\MvcDiagnosticAnalyzerRunner.cs" Link="Infrastructure\MvcDiagnosticAnalyzerRunner.cs" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Content Include="TestFiles\**\*.*" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>

View File

@ -2685,13 +2685,15 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor GetValidationVisitor(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider validatorProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidatorCache validatorCache, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState);
public virtual void Validate(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model) { }
public virtual void Validate(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) { }
public virtual void Validate(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object container) { }
}
public partial class ParameterBinder
{
public ParameterBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderFactory modelBinderFactory, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator validator, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.MvcOptions> mvcOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { }
protected Microsoft.Extensions.Logging.ILogger Logger { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
[System.Diagnostics.DebuggerStepThroughAttribute]
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder modelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object value) { throw null; }
[System.Diagnostics.DebuggerStepThroughAttribute]
public virtual System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder modelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object value, object container) { throw null; }
}
public partial class PrefixContainer
{
@ -3246,6 +3248,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
protected virtual void SuppressValidation(string key) { }
public bool Validate(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model) { throw null; }
public virtual bool Validate(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model, bool alwaysValidateAtTopLevel) { throw null; }
public virtual bool Validate(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model, bool alwaysValidateAtTopLevel, object container) { throw null; }
protected virtual bool ValidateNode() { throw null; }
protected virtual bool Visit(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model) { throw null; }
protected virtual bool VisitChildren(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IValidationStrategy strategy) { throw null; }

View File

@ -84,7 +84,8 @@ namespace Microsoft.AspNetCore.Mvc.Controllers
valueProvider,
parameter,
modelMetadata,
value: null);
value: null,
container: null); // Parameters do not have containers.
if (result.IsModelSet)
{
@ -110,7 +111,8 @@ namespace Microsoft.AspNetCore.Mvc.Controllers
valueProvider,
property,
modelMetadata,
value: null);
value: null,
container: controller);
if (result.IsModelSet)
{

View File

@ -6,19 +6,33 @@ using System;
namespace Microsoft.AspNetCore.Mvc.Infrastructure
{
/// <summary>
/// Attribute annoted on ActionResult constructor, helper method parameters, and properties to indicate
/// Attribute annotated on ActionResult constructor, helper method parameters, and properties to indicate
/// that the parameter or property is used to set the "value" for ActionResult.
/// <para>
/// Analyzers match this parameter by type name. This allows users to annotate custom results \ custom helpers
/// with a user defined attribute without having to expose this type.
/// with a user-defined attribute without having to expose this type.
/// </para>
/// <para>
/// This attribute is intentionally marked Inherited=false since the analyzer does not walk the inheritance graph.
/// </para>
/// </summary>
/// <example>
/// BadObjectResult([ActionResultObjectValueAttribute] object value)
/// ObjectResult { [ActionResultObjectValueAttribute] public object Value { get; set; } }
/// Annotated constructor parameter:
/// <code>
/// public BadRequestObjectResult([ActionResultObjectValue] object error)
/// :base(error)
/// {
/// StatusCode = DefaultStatusCode;
/// }
/// </code>
/// Annotated property:
/// <code>
/// public class ObjectResult : ActionResult, IStatusCodeActionResult
/// {
/// [ActionResultObjectValue]
/// public object Value { get; set; }
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
public sealed class ActionResultObjectValueAttribute : Attribute

View File

@ -11,6 +11,10 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
/// </summary>
public class CancellationTokenModelBinderProvider : IModelBinderProvider
{
// CancellationTokenModelBinder does not have any state. Re-use the same instance for binding.
private readonly CancellationTokenModelBinder _modelBinder = new CancellationTokenModelBinder();
/// <inheritdoc />
public IModelBinder GetBinder(ModelBinderProviderContext context)
{
@ -21,7 +25,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
if (context.Metadata.ModelType == typeof(CancellationToken))
{
return new CancellationTokenModelBinder();
return _modelBinder;
}
return null;

View File

@ -10,6 +10,10 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
/// </summary>
public class ServicesModelBinderProvider : IModelBinderProvider
{
// ServicesModelBinder does not have any state. Re-use the same instance for binding.
private readonly ServicesModelBinder _modelBinder = new ServicesModelBinder();
/// <inheritdoc />
public IModelBinder GetBinder(ModelBinderProviderContext context)
{
@ -21,7 +25,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
if (context.BindingInfo.BindingSource != null &&
context.BindingInfo.BindingSource.CanAcceptDataFrom(BindingSource.Services))
{
return new ServicesModelBinder();
return _modelBinder;
}
return null;

View File

@ -77,6 +77,28 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
string prefix,
object model,
ModelMetadata metadata)
=> Validate(actionContext, validationState, prefix, model, metadata, container: null);
/// <summary>
/// Validates the provided object model.
/// If <paramref name="model"/> is <see langword="null"/> and the <paramref name="metadata"/>'s
/// <see cref="ModelMetadata.IsRequired"/> is <see langword="true"/>, will add one or more
/// model state errors that <see cref="Validate(ActionContext, ValidationStateDictionary, string, object)"/>
/// would not.
/// </summary>
/// <param name="actionContext">The <see cref="ActionContext"/>.</param>
/// <param name="validationState">The <see cref="ValidationStateDictionary"/>.</param>
/// <param name="prefix">The model prefix key.</param>
/// <param name="model">The model object.</param>
/// <param name="metadata">The <see cref="ModelMetadata"/>.</param>
/// <param name="container">The model container</param>
public virtual void Validate(
ActionContext actionContext,
ValidationStateDictionary validationState,
string prefix,
object model,
ModelMetadata metadata,
object container)
{
var visitor = GetValidationVisitor(
actionContext,
@ -85,7 +107,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
_modelMetadataProvider,
validationState);
visitor.Validate(metadata, prefix, model, alwaysValidateAtTopLevel: metadata.IsRequired);
visitor.Validate(metadata, prefix, model, alwaysValidateAtTopLevel: metadata.IsRequired, container);
}
/// <summary>

View File

@ -82,13 +82,34 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <param name="metadata">The <see cref="ModelMetadata"/>.</param>
/// <param name="value">The initial model value.</param>
/// <returns>The result of model binding.</returns>
public virtual async Task<ModelBindingResult> BindModelAsync(
public virtual Task<ModelBindingResult> BindModelAsync(
ActionContext actionContext,
IModelBinder modelBinder,
IValueProvider valueProvider,
ParameterDescriptor parameter,
ModelMetadata metadata,
object value)
=> BindModelAsync(actionContext, modelBinder, valueProvider, parameter, metadata, value, container: null).AsTask();
/// <summary>
/// Binds a model specified by <paramref name="parameter"/> using <paramref name="value"/> as the initial value.
/// </summary>
/// <param name="actionContext">The <see cref="ActionContext"/>.</param>
/// <param name="modelBinder">The <see cref="IModelBinder"/>.</param>
/// <param name="valueProvider">The <see cref="IValueProvider"/>.</param>
/// <param name="parameter">The <see cref="ParameterDescriptor"/></param>
/// <param name="metadata">The <see cref="ModelMetadata"/>.</param>
/// <param name="value">The initial model value.</param>
/// <param name="container">The container for the model.</param>
/// <returns>The result of model binding.</returns>
public virtual async ValueTask<ModelBindingResult> BindModelAsync(
ActionContext actionContext,
IModelBinder modelBinder,
IValueProvider valueProvider,
ParameterDescriptor parameter,
ModelMetadata metadata,
object value,
object container)
{
if (actionContext == null)
{
@ -164,7 +185,8 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
parameter,
metadata,
modelBindingContext,
modelBindingResult);
modelBindingResult,
container);
Logger.DoneAttemptingToValidateParameterOrProperty(parameter, metadata);
}
@ -192,7 +214,8 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
ParameterDescriptor parameter,
ModelMetadata metadata,
ModelBindingContext modelBindingContext,
ModelBindingResult modelBindingResult)
ModelBindingResult modelBindingResult,
object container)
{
RecalculateModelMetadata(parameter, modelBindingResult, ref metadata);
@ -211,7 +234,8 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
modelBindingContext.ValidationState,
modelBindingContext.ModelName,
modelBindingResult.Model,
metadata);
metadata,
container);
}
else if (metadata.IsRequired)
{
@ -240,7 +264,8 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
modelBindingContext.ValidationState,
modelName,
modelBindingResult.Model,
metadata);
metadata,
container);
}
}

View File

@ -133,7 +133,24 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
/// <param name="alwaysValidateAtTopLevel">If <c>true</c>, applies validation rules even if the top-level value is <c>null</c>.</param>
/// <returns><c>true</c> if the object is valid, otherwise <c>false</c>.</returns>
public virtual bool Validate(ModelMetadata metadata, string key, object model, bool alwaysValidateAtTopLevel)
=> Validate(metadata, key, model, alwaysValidateAtTopLevel, container: null);
/// <summary>
/// Validates a object.
/// </summary>
/// <param name="metadata">The <see cref="ModelMetadata"/> associated with the model.</param>
/// <param name="key">The model prefix key.</param>
/// <param name="model">The model object.</param>
/// <param name="alwaysValidateAtTopLevel">If <c>true</c>, applies validation rules even if the top-level value is <c>null</c>.</param>
/// <param name="container">The model container.</param>
/// <returns><c>true</c> if the object is valid, otherwise <c>false</c>.</returns>
public virtual bool Validate(ModelMetadata metadata, string key, object model, bool alwaysValidateAtTopLevel, object container)
{
if (container != null && metadata.MetadataKind != ModelMetadataKind.Property)
{
throw new ArgumentException(Resources.FormatValidationVisitor_ContainerCannotBeSpecified(metadata.MetadataKind));
}
if (model == null && key != null && !alwaysValidateAtTopLevel)
{
var entry = ModelState[key];
@ -148,6 +165,10 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
return true;
}
// Container is non-null only when validation top-level properties. Start off by treating "container" as the "Model" instance.
// Invoking StateManager.Recurse later in this invocation will result in it being correctly used as the container instance during the
// validation of "model".
Model = container;
return Visit(metadata, key, model);
}

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@ -516,4 +516,7 @@
<data name="FailedToReadRequestForm" xml:space="preserve">
<value>Failed to read the request form. {0}</value>
</data>
<data name="ValidationVisitor_ContainerCannotBeSpecified" xml:space="preserve">
<value>A container cannot be specified when the ModelMetada is of kind '{0}'.</value>
</data>
</root>

View File

@ -65,7 +65,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
throw new ArgumentNullException(nameof(candidates));
}
// We want to return a 415 iff we eliminated ALL of the currently valid endpoints due to content type
// We want to return a 415 if we eliminated ALL of the currently valid endpoints due to content type
// mismatch.
bool? needs415Endpoint = null;

View File

@ -1151,8 +1151,9 @@ namespace Microsoft.AspNetCore.Mvc.Controllers
It.IsAny<IValueProvider>(),
It.IsAny<ParameterDescriptor>(),
It.IsAny<ModelMetadata>(),
null,
null))
.Returns((ActionContext context, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor descriptor, ModelMetadata metadata, object v) =>
.Returns((ActionContext context, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor descriptor, ModelMetadata metadata, object v, object c) =>
{
ModelBindingResult result;
if (descriptor.Name == "accountId")
@ -1172,7 +1173,7 @@ namespace Microsoft.AspNetCore.Mvc.Controllers
result = ModelBindingResult.Failed();
}
return Task.FromResult(result);
return new ValueTask<ModelBindingResult>(result);
});
var controllerContext = GetControllerContext(actionDescriptor);

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
{
// Arrange
var formatter = GetOutputFormatter();
((SystemTextJsonOutputFormatter)formatter).SerializerOptions.ReferenceHandling = ReferenceHandling.Preserve;
((SystemTextJsonOutputFormatter)formatter).SerializerOptions.ReferenceHandler = ReferenceHandler.Preserve;
var expectedContent = "{\"$id\":\"1\",\"name\":\"Person\",\"child\":{\"$id\":\"2\",\"name\":\"Child\",\"child\":null,\"parent\":{\"$ref\":\"1\"}},\"parent\":null}";
var person = new Person
{

View File

@ -78,7 +78,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure
valueProvider,
property,
modelMetadata,
value: null);
value: null,
container: instance);
if (result.IsModelSet)
{
@ -159,7 +160,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure
valueProvider,
parameter,
modelMetadata,
value: null);
value: null,
container: null); // Parameters do not have containers.
if (result.IsModelSet)
{

View File

@ -827,22 +827,23 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure
public IList<ParameterDescriptor> Descriptors { get; } = new List<ParameterDescriptor>();
public override Task<ModelBindingResult> BindModelAsync(
public override ValueTask<ModelBindingResult> BindModelAsync(
ActionContext actionContext,
IModelBinder modelBinder,
IValueProvider valueProvider,
ParameterDescriptor parameter,
ModelMetadata metadata,
object value)
object value,
object container)
{
Descriptors.Add(parameter);
if (_args.TryGetValue(parameter.Name, out var result))
{
return Task.FromResult(ModelBindingResult.Success(result));
return new ValueTask<ModelBindingResult>(ModelBindingResult.Success(result));
}
return Task.FromResult(ModelBindingResult.Failed());
return new ValueTask<ModelBindingResult>(ModelBindingResult.Failed());
}
}

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