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

This commit is contained in:
Pranav K 2020-06-23 20:38:38 -07:00 committed by GitHub
commit 30472b113e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
111 changed files with 1619 additions and 1155 deletions

View File

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

View File

@ -9,7 +9,7 @@
<AspNetCoreMajorVersion>5</AspNetCoreMajorVersion> <AspNetCoreMajorVersion>5</AspNetCoreMajorVersion>
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion> <AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
<AspNetCorePatchVersion>0</AspNetCorePatchVersion> <AspNetCorePatchVersion>0</AspNetCorePatchVersion>
<PreReleaseVersionIteration>7</PreReleaseVersionIteration> <PreReleaseVersionIteration>8</PreReleaseVersionIteration>
<!-- <!--
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
--> -->
@ -66,79 +66,79 @@
<!-- Packages from dotnet/roslyn --> <!-- Packages from dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>3.7.0-4.20319.6</MicrosoftNetCompilersToolsetPackageVersion> <MicrosoftNetCompilersToolsetPackageVersion>3.7.0-4.20319.6</MicrosoftNetCompilersToolsetPackageVersion>
<!-- Packages from dotnet/runtime --> <!-- Packages from dotnet/runtime -->
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsDependencyModelPackageVersion> <MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftNETCoreAppInternalPackageVersion>5.0.0-preview.7.20323.4</MicrosoftNETCoreAppInternalPackageVersion> <MicrosoftNETCoreAppInternalPackageVersion>5.0.0-preview.7.20322.7</MicrosoftNETCoreAppInternalPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-preview.7.20323.4</MicrosoftNETCoreAppRefPackageVersion> <MicrosoftNETCoreAppRefPackageVersion>5.0.0-preview.7.20322.7</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-preview.7.20323.4</MicrosoftNETCoreAppRuntimewinx64PackageVersion> <MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-preview.7.20322.7</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftWin32RegistryPackageVersion>5.0.0-preview.7.20323.4</MicrosoftWin32RegistryPackageVersion> <MicrosoftWin32RegistryPackageVersion>5.0.0-preview.7.20322.7</MicrosoftWin32RegistryPackageVersion>
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftWin32SystemEventsPackageVersion> <MicrosoftWin32SystemEventsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftWin32SystemEventsPackageVersion>
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsCachingAbstractionsPackageVersion> <MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsCachingAbstractionsPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsCachingMemoryPackageVersion> <MicrosoftExtensionsCachingMemoryPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationAbstractionsPackageVersion> <MicrosoftExtensionsConfigurationAbstractionsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationBinderPackageVersion> <MicrosoftExtensionsConfigurationBinderPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationCommandLinePackageVersion> <MicrosoftExtensionsConfigurationCommandLinePackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion> <MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion> <MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
<MicrosoftExtensionsConfigurationIniPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationIniPackageVersion> <MicrosoftExtensionsConfigurationIniPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationIniPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationJsonPackageVersion> <MicrosoftExtensionsConfigurationJsonPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationPackageVersion> <MicrosoftExtensionsConfigurationPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationUserSecretsPackageVersion> <MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsConfigurationXmlPackageVersion> <MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsConfigurationXmlPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion> <MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsDependencyInjectionPackageVersion> <MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion> <MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
<MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsFileProvidersCompositePackageVersion> <MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsFileProvidersCompositePackageVersion>
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsFileProvidersPhysicalPackageVersion> <MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsFileSystemGlobbingPackageVersion> <MicrosoftExtensionsFileSystemGlobbingPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion> <MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsHostingAbstractionsPackageVersion> <MicrosoftExtensionsHostingAbstractionsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsHostingPackageVersion> <MicrosoftExtensionsHostingPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsHostingPackageVersion>
<MicrosoftExtensionsHttpPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsHttpPackageVersion> <MicrosoftExtensionsHttpPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsHttpPackageVersion>
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsLoggingAbstractionsPackageVersion> <MicrosoftExtensionsLoggingAbstractionsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
<MicrosoftExtensionsLoggingConfigurationPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsLoggingConfigurationPackageVersion> <MicrosoftExtensionsLoggingConfigurationPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsLoggingConfigurationPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsLoggingConsolePackageVersion> <MicrosoftExtensionsLoggingConsolePackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingDebugPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsLoggingDebugPackageVersion> <MicrosoftExtensionsLoggingDebugPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsLoggingDebugPackageVersion>
<MicrosoftExtensionsLoggingEventSourcePackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsLoggingEventSourcePackageVersion> <MicrosoftExtensionsLoggingEventSourcePackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsLoggingEventSourcePackageVersion>
<MicrosoftExtensionsLoggingEventLogPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsLoggingEventLogPackageVersion> <MicrosoftExtensionsLoggingEventLogPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsLoggingEventLogPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsLoggingPackageVersion> <MicrosoftExtensionsLoggingPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsLoggingTraceSourcePackageVersion> <MicrosoftExtensionsLoggingTraceSourcePackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion> <MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion> <MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
<MicrosoftExtensionsOptionsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsOptionsPackageVersion> <MicrosoftExtensionsOptionsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsOptionsPackageVersion>
<MicrosoftExtensionsPrimitivesPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsPrimitivesPackageVersion> <MicrosoftExtensionsPrimitivesPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsPrimitivesPackageVersion>
<MicrosoftExtensionsInternalTransportPackageVersion>5.0.0-preview.7.20323.4</MicrosoftExtensionsInternalTransportPackageVersion> <MicrosoftExtensionsInternalTransportPackageVersion>5.0.0-preview.7.20322.7</MicrosoftExtensionsInternalTransportPackageVersion>
<SystemComponentModelAnnotationsPackageVersion>5.0.0-preview.7.20323.4</SystemComponentModelAnnotationsPackageVersion> <SystemComponentModelAnnotationsPackageVersion>5.0.0-preview.7.20322.7</SystemComponentModelAnnotationsPackageVersion>
<SystemDiagnosticsDiagnosticSourcePackageVersion>5.0.0-preview.7.20323.4</SystemDiagnosticsDiagnosticSourcePackageVersion> <SystemDiagnosticsDiagnosticSourcePackageVersion>5.0.0-preview.7.20322.7</SystemDiagnosticsDiagnosticSourcePackageVersion>
<SystemDiagnosticsEventLogPackageVersion>5.0.0-preview.7.20323.4</SystemDiagnosticsEventLogPackageVersion> <SystemDiagnosticsEventLogPackageVersion>5.0.0-preview.7.20322.7</SystemDiagnosticsEventLogPackageVersion>
<SystemDrawingCommonPackageVersion>5.0.0-preview.7.20323.4</SystemDrawingCommonPackageVersion> <SystemDrawingCommonPackageVersion>5.0.0-preview.7.20322.7</SystemDrawingCommonPackageVersion>
<SystemIOPipelinesPackageVersion>5.0.0-preview.7.20323.4</SystemIOPipelinesPackageVersion> <SystemIOPipelinesPackageVersion>5.0.0-preview.7.20322.7</SystemIOPipelinesPackageVersion>
<SystemNetHttpJsonPackageVersion>5.0.0-preview.7.20323.4</SystemNetHttpJsonPackageVersion> <SystemNetHttpJsonPackageVersion>5.0.0-preview.7.20322.7</SystemNetHttpJsonPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>5.0.0-preview.7.20323.4</SystemNetHttpWinHttpHandlerPackageVersion> <SystemNetHttpWinHttpHandlerPackageVersion>5.0.0-preview.7.20322.7</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0-preview.7.20323.4</SystemNetWebSocketsWebSocketProtocolPackageVersion> <SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0-preview.7.20322.7</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemReflectionMetadataPackageVersion>5.0.0-preview.7.20323.4</SystemReflectionMetadataPackageVersion> <SystemReflectionMetadataPackageVersion>5.0.0-preview.7.20322.7</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0-preview.7.20323.4</SystemRuntimeCompilerServicesUnsafePackageVersion> <SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0-preview.7.20322.7</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityCryptographyCngPackageVersion>5.0.0-preview.7.20323.4</SystemSecurityCryptographyCngPackageVersion> <SystemSecurityCryptographyCngPackageVersion>5.0.0-preview.7.20322.7</SystemSecurityCryptographyCngPackageVersion>
<SystemSecurityCryptographyPkcsPackageVersion>5.0.0-preview.7.20323.4</SystemSecurityCryptographyPkcsPackageVersion> <SystemSecurityCryptographyPkcsPackageVersion>5.0.0-preview.7.20322.7</SystemSecurityCryptographyPkcsPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-preview.7.20323.4</SystemSecurityCryptographyXmlPackageVersion> <SystemSecurityCryptographyXmlPackageVersion>5.0.0-preview.7.20322.7</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>5.0.0-preview.7.20323.4</SystemSecurityPermissionsPackageVersion> <SystemSecurityPermissionsPackageVersion>5.0.0-preview.7.20322.7</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-preview.7.20323.4</SystemSecurityPrincipalWindowsPackageVersion> <SystemSecurityPrincipalWindowsPackageVersion>5.0.0-preview.7.20322.7</SystemSecurityPrincipalWindowsPackageVersion>
<SystemServiceProcessServiceControllerPackageVersion>5.0.0-preview.7.20323.4</SystemServiceProcessServiceControllerPackageVersion> <SystemServiceProcessServiceControllerPackageVersion>5.0.0-preview.7.20322.7</SystemServiceProcessServiceControllerPackageVersion>
<SystemTextEncodingsWebPackageVersion>5.0.0-preview.7.20323.4</SystemTextEncodingsWebPackageVersion> <SystemTextEncodingsWebPackageVersion>5.0.0-preview.7.20322.7</SystemTextEncodingsWebPackageVersion>
<SystemTextJsonPackageVersion>5.0.0-preview.7.20323.4</SystemTextJsonPackageVersion> <SystemTextJsonPackageVersion>5.0.0-preview.7.20322.7</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>5.0.0-preview.7.20323.4</SystemThreadingChannelsPackageVersion> <SystemThreadingChannelsPackageVersion>5.0.0-preview.7.20322.7</SystemThreadingChannelsPackageVersion>
<SystemWindowsExtensionsPackageVersion>5.0.0-preview.7.20323.4</SystemWindowsExtensionsPackageVersion> <SystemWindowsExtensionsPackageVersion>5.0.0-preview.7.20322.7</SystemWindowsExtensionsPackageVersion>
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 --> <!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-preview.7.20323.4</MicrosoftNETCorePlatformsPackageVersion> <MicrosoftNETCorePlatformsPackageVersion>5.0.0-preview.7.20322.7</MicrosoftNETCorePlatformsPackageVersion>
<!-- Packages from dotnet/blazor --> <!-- Packages from dotnet/blazor -->
<MicrosoftAspNetCoreComponentsWebAssemblyRuntimePackageVersion>3.2.0</MicrosoftAspNetCoreComponentsWebAssemblyRuntimePackageVersion> <MicrosoftAspNetCoreComponentsWebAssemblyRuntimePackageVersion>3.2.0</MicrosoftAspNetCoreComponentsWebAssemblyRuntimePackageVersion>
<!-- Packages from dotnet/efcore --> <!-- Packages from dotnet/efcore -->
<dotnetefPackageVersion>5.0.0-preview.7.20322.5</dotnetefPackageVersion> <dotnetefPackageVersion>5.0.0-preview.8.20323.2</dotnetefPackageVersion>
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-preview.7.20322.5</MicrosoftEntityFrameworkCoreInMemoryPackageVersion> <MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-preview.8.20323.2</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>5.0.0-preview.7.20322.5</MicrosoftEntityFrameworkCoreRelationalPackageVersion> <MicrosoftEntityFrameworkCoreRelationalPackageVersion>5.0.0-preview.8.20323.2</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>5.0.0-preview.7.20322.5</MicrosoftEntityFrameworkCoreSqlitePackageVersion> <MicrosoftEntityFrameworkCoreSqlitePackageVersion>5.0.0-preview.8.20323.2</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>5.0.0-preview.7.20322.5</MicrosoftEntityFrameworkCoreSqlServerPackageVersion> <MicrosoftEntityFrameworkCoreSqlServerPackageVersion>5.0.0-preview.8.20323.2</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>5.0.0-preview.7.20322.5</MicrosoftEntityFrameworkCoreToolsPackageVersion> <MicrosoftEntityFrameworkCoreToolsPackageVersion>5.0.0-preview.8.20323.2</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>5.0.0-preview.7.20322.5</MicrosoftEntityFrameworkCorePackageVersion> <MicrosoftEntityFrameworkCorePackageVersion>5.0.0-preview.8.20323.2</MicrosoftEntityFrameworkCorePackageVersion>
</PropertyGroup> </PropertyGroup>
<!-- <!--
@ -221,7 +221,7 @@
<IdentityServer4EntityFrameworkStoragePackageVersion>3.0.0</IdentityServer4EntityFrameworkStoragePackageVersion> <IdentityServer4EntityFrameworkStoragePackageVersion>3.0.0</IdentityServer4EntityFrameworkStoragePackageVersion>
<MessagePackPackageVersion>2.1.90</MessagePackPackageVersion> <MessagePackPackageVersion>2.1.90</MessagePackPackageVersion>
<MoqPackageVersion>4.10.0</MoqPackageVersion> <MoqPackageVersion>4.10.0</MoqPackageVersion>
<MonoCecilPackageVersion>0.10.1</MonoCecilPackageVersion> <MonoCecilPackageVersion>0.11.2</MonoCecilPackageVersion>
<NewtonsoftJsonBsonPackageVersion>1.0.2</NewtonsoftJsonBsonPackageVersion> <NewtonsoftJsonBsonPackageVersion>1.0.2</NewtonsoftJsonBsonPackageVersion>
<NewtonsoftJsonPackageVersion>12.0.2</NewtonsoftJsonPackageVersion> <NewtonsoftJsonPackageVersion>12.0.2</NewtonsoftJsonPackageVersion>
<!-- Begin: STOP!!! Razor need to reference the version of JSON that our HOSTS support. --> <!-- Begin: STOP!!! Razor need to reference the version of JSON that our HOSTS support. -->

View File

@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Components.Rendering
Thread capturedThread = null; Thread capturedThread = null;
var e = new ManualResetEventSlim(); var e = new ManualResetEventSlim();
// Act // Act
context.Post((_) => context.Post((_) =>
{ {
@ -766,7 +766,6 @@ namespace Microsoft.AspNetCore.Components.Rendering
} }
[Fact] [Fact]
[QuarantinedTest]
public async Task InvokeAsync_SyncWorkInAsyncTaskIsCompletedFirst() public async Task InvokeAsync_SyncWorkInAsyncTaskIsCompletedFirst()
{ {
// Simplified version of ServerComponentRenderingTest.CanDispatchAsyncWorkToSyncContext // Simplified version of ServerComponentRenderingTest.CanDispatchAsyncWorkToSyncContext

View File

@ -16,7 +16,7 @@
<Reference Include="Microsoft.Extensions.DependencyInjection" /> <Reference Include="Microsoft.Extensions.DependencyInjection" />
<Reference Include="Microsoft.Extensions.FileProviders.Physical" /> <Reference Include="Microsoft.Extensions.FileProviders.Physical" />
<Reference Include="Microsoft.Extensions.FileProviders.Composite" /> <Reference Include="Microsoft.Extensions.FileProviders.Composite" />
<Reference Include="Microsoft.Extensions.Hosting.Abstractions" /> <Reference Include="Microsoft.Extensions.Hosting" />
<Reference Include="Microsoft.Extensions.Logging" /> <Reference Include="Microsoft.Extensions.Logging" />
<Reference Include="Microsoft.Extensions.Options" /> <Reference Include="Microsoft.Extensions.Options" />
</ItemGroup> </ItemGroup>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<Description>ASP.NET Core hosting infrastructure and startup logic for web applications.</Description> <Description>ASP.NET Core hosting infrastructure and startup logic for web applications.</Description>
@ -26,7 +26,7 @@
<Reference Include="Microsoft.Extensions.DependencyInjection" /> <Reference Include="Microsoft.Extensions.DependencyInjection" />
<Reference Include="Microsoft.Extensions.FileProviders.Physical" /> <Reference Include="Microsoft.Extensions.FileProviders.Physical" />
<Reference Include="Microsoft.Extensions.FileProviders.Composite" /> <Reference Include="Microsoft.Extensions.FileProviders.Composite" />
<Reference Include="Microsoft.Extensions.Hosting.Abstractions" /> <Reference Include="Microsoft.Extensions.Hosting" />
<Reference Include="Microsoft.Extensions.Logging" /> <Reference Include="Microsoft.Extensions.Logging" />
<Reference Include="Microsoft.Extensions.Options" /> <Reference Include="Microsoft.Extensions.Options" />

View File

@ -1450,7 +1450,6 @@ namespace Microsoft.AspNetCore.Identity.Test
/// </summary> /// </summary>
/// <returns>Task</returns> /// <returns>Task</returns>
[Fact] [Fact]
[QuarantinedTest]
public async Task ChangePhoneNumberFailsWithWrongPhoneNumber() public async Task ChangePhoneNumberFailsWithWrongPhoneNumber()
{ {
var manager = CreateManager(); var manager = CreateManager();
@ -1471,7 +1470,6 @@ namespace Microsoft.AspNetCore.Identity.Test
/// </summary> /// </summary>
/// <returns>Task</returns> /// <returns>Task</returns>
[Fact] [Fact]
[QuarantinedTest]
public async Task CanVerifyPhoneNumber() public async Task CanVerifyPhoneNumber()
{ {
var manager = CreateManager(); var manager = CreateManager();
@ -1519,7 +1517,6 @@ namespace Microsoft.AspNetCore.Identity.Test
/// </summary> /// </summary>
/// <returns>Task</returns> /// <returns>Task</returns>
[Fact] [Fact]
[QuarantinedTest]
public async Task CanChangeEmailOnlyIfEmailSame() public async Task CanChangeEmailOnlyIfEmailSame()
{ {
var manager = CreateManager(); var manager = CreateManager();

View File

@ -18,9 +18,9 @@
"author": "Microsoft", "author": "Microsoft",
"license": "Apache-2.0", "license": "Apache-2.0",
"bugs": { "bugs": {
"url": "https://github.com/dotnet/extensions/issues" "url": "https://github.com/dotnet/aspnetcore/issues"
}, },
"homepage": "https://github.com/dotnet/extensions/tree/master/src/JSInterop#readme", "homepage": "https://github.com/dotnet/aspnetcore/tree/master/src/JSInterop",
"files": [ "files": [
"dist/**" "dist/**"
], ],

View File

@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.SpaServices.Extensions.Proxy
// Don't forward User-Agent/Accept because of https://github.com/aspnet/JavaScriptServices/issues/1469 // Don't forward User-Agent/Accept because of https://github.com/aspnet/JavaScriptServices/issues/1469
// Others just aren't applicable in proxy scenarios // Others just aren't applicable in proxy scenarios
private static readonly string[] NotForwardedWebSocketHeaders = new[] { "Accept", "Connection", "Host", "User-Agent", "Upgrade", "Sec-WebSocket-Key", "Sec-WebSocket-Version" }; private static readonly string[] NotForwardedWebSocketHeaders = new[] { "Accept", "Connection", "Host", "User-Agent", "Upgrade", "Sec-WebSocket-Key", "Sec-WebSocket-Protocol", "Sec-WebSocket-Version" };
public static HttpClient CreateHttpClientForProxy(TimeSpan requestTimeout) public static HttpClient CreateHttpClientForProxy(TimeSpan requestTimeout)
{ {
@ -209,6 +209,10 @@ namespace Microsoft.AspNetCore.SpaServices.Extensions.Proxy
using (var client = new ClientWebSocket()) using (var client = new ClientWebSocket())
{ {
foreach (var protocol in context.WebSockets.WebSocketRequestedProtocols)
{
client.Options.AddSubProtocol(protocol);
}
foreach (var headerEntry in context.Request.Headers) foreach (var headerEntry in context.Request.Headers)
{ {
if (!NotForwardedWebSocketHeaders.Contains(headerEntry.Key, StringComparer.OrdinalIgnoreCase)) if (!NotForwardedWebSocketHeaders.Contains(headerEntry.Key, StringComparer.OrdinalIgnoreCase))

View File

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

View File

@ -33,10 +33,10 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions
public partial class ActionDescriptor public partial class ActionDescriptor
{ {
public ActionDescriptor() { } public ActionDescriptor() { }
public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata> ActionConstraints { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata>? ActionConstraints { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo AttributeRouteInfo { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo? AttributeRouteInfo { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor> BoundProperties { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor> BoundProperties { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual string DisplayName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual string? DisplayName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public System.Collections.Generic.IList<object> EndpointMetadata { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Collections.Generic.IList<object> EndpointMetadata { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.FilterDescriptor> FilterDescriptors { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.FilterDescriptor> FilterDescriptors { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions
{ {
public ActionInvokerProviderContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext) { } public ActionInvokerProviderContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext) { }
public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public Microsoft.AspNetCore.Mvc.Abstractions.IActionInvoker Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.Abstractions.IActionInvoker? Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public partial interface IActionDescriptorProvider public partial interface IActionDescriptorProvider
{ {
@ -143,8 +143,8 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
{ {
public ApiDescription() { } public ApiDescription() { }
public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string GroupName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? GroupName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string HttpMethod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? HttpMethod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription> ParameterDescriptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription> ParameterDescriptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public System.Collections.Generic.IDictionary<object, object> Properties { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.Collections.Generic.IDictionary<object, object> Properties { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public string RelativePath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string RelativePath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
@ -160,21 +160,21 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
public partial class ApiParameterDescription public partial class ApiParameterDescription
{ {
public ApiParameterDescription() { } public ApiParameterDescription() { }
public Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo BindingInfo { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo? BindingInfo { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public object DefaultValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public object? DefaultValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public bool IsRequired { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public bool IsRequired { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor ParameterDescriptor { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor ParameterDescriptor { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterRouteInfo RouteInfo { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterRouteInfo? RouteInfo { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Source { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Source { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public System.Type Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Type Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public partial class ApiParameterRouteInfo public partial class ApiParameterRouteInfo
{ {
public ApiParameterRouteInfo() { } public ApiParameterRouteInfo() { }
public System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.IRouteConstraint> Constraints { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.IRouteConstraint>? Constraints { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public object DefaultValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public object? DefaultValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public bool IsOptional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public bool IsOptional { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public partial class ApiRequestFormat public partial class ApiRequestFormat
@ -194,9 +194,9 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
public ApiResponseType() { } public ApiResponseType() { }
public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ApiExplorer.ApiResponseFormat> ApiResponseFormats { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ApiExplorer.ApiResponseFormat> ApiResponseFormats { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public bool IsDefaultResponse { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public bool IsDefaultResponse { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata? ModelMetadata { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public int StatusCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public int StatusCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public System.Type Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Type? Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public partial interface IApiDescriptionProvider public partial interface IApiDescriptionProvider
{ {
@ -218,8 +218,8 @@ namespace Microsoft.AspNetCore.Mvc.Filters
public ActionExecutedContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters, object controller) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { } public ActionExecutedContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters, object controller) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { }
public virtual bool Canceled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual bool Canceled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual object Controller { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public virtual object Controller { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public virtual System.Exception Exception { get { throw null; } set { } } public virtual System.Exception? Exception { get { throw null; } set { } }
public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo ExceptionDispatchInfo { get { throw null; } set { } } public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo? ExceptionDispatchInfo { get { throw null; } set { } }
public virtual bool ExceptionHandled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual bool ExceptionHandled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
@ -228,26 +228,27 @@ namespace Microsoft.AspNetCore.Mvc.Filters
public ActionExecutingContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters, System.Collections.Generic.IDictionary<string, object> actionArguments, object controller) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { } public ActionExecutingContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters, System.Collections.Generic.IDictionary<string, object> actionArguments, object controller) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { }
public virtual System.Collections.Generic.IDictionary<string, object> ActionArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public virtual System.Collections.Generic.IDictionary<string, object> ActionArguments { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public virtual object Controller { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public virtual object Controller { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual Microsoft.AspNetCore.Mvc.IActionResult? Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public delegate System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext> ActionExecutionDelegate(); public delegate System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext> ActionExecutionDelegate();
public partial class AuthorizationFilterContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext public partial class AuthorizationFilterContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext
{ {
public AuthorizationFilterContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { } public AuthorizationFilterContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { }
public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual Microsoft.AspNetCore.Mvc.IActionResult? Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public partial class ExceptionContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext public partial class ExceptionContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext
{ {
public ExceptionContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { } public ExceptionContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { }
public virtual System.Exception Exception { get { throw null; } set { } } public virtual System.Exception Exception { get { throw null; } set { } }
public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo ExceptionDispatchInfo { get { throw null; } set { } } public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo? ExceptionDispatchInfo { get { throw null; } set { } }
public virtual bool ExceptionHandled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual bool ExceptionHandled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual Microsoft.AspNetCore.Mvc.IActionResult? Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public abstract partial class FilterContext : Microsoft.AspNetCore.Mvc.ActionContext public abstract partial class FilterContext : Microsoft.AspNetCore.Mvc.ActionContext
{ {
public FilterContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters) { } public FilterContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters) { }
public virtual System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> Filters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public virtual System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> Filters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
[return: System.Diagnostics.CodeAnalysis.MaybeNullAttribute]
public TMetadata FindEffectivePolicy<TMetadata>() where TMetadata : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata { throw null; } public TMetadata FindEffectivePolicy<TMetadata>() where TMetadata : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata { throw null; }
public bool IsEffectivePolicy<TMetadata>(TMetadata policy) where TMetadata : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata { throw null; } public bool IsEffectivePolicy<TMetadata>(TMetadata policy) where TMetadata : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata { throw null; }
} }
@ -349,15 +350,15 @@ namespace Microsoft.AspNetCore.Mvc.Filters
{ {
public ResourceExecutedContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { } public ResourceExecutedContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { }
public virtual bool Canceled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual bool Canceled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual System.Exception Exception { get { throw null; } set { } } public virtual System.Exception? Exception { get { throw null; } set { } }
public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo ExceptionDispatchInfo { get { throw null; } set { } } public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo? ExceptionDispatchInfo { get { throw null; } set { } }
public virtual bool ExceptionHandled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual bool ExceptionHandled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual Microsoft.AspNetCore.Mvc.IActionResult? Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public partial class ResourceExecutingContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext public partial class ResourceExecutingContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext
{ {
public ResourceExecutingContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory> valueProviderFactories) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { } public ResourceExecutingContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory> valueProviderFactories) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { }
public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual Microsoft.AspNetCore.Mvc.IActionResult? Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory> ValueProviderFactories { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory> ValueProviderFactories { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
} }
public delegate System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext> ResourceExecutionDelegate(); public delegate System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext> ResourceExecutionDelegate();
@ -366,8 +367,8 @@ namespace Microsoft.AspNetCore.Mvc.Filters
public ResultExecutedContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters, Microsoft.AspNetCore.Mvc.IActionResult result, object controller) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { } public ResultExecutedContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> filters, Microsoft.AspNetCore.Mvc.IActionResult result, object controller) : base (default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata>)) { }
public virtual bool Canceled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual bool Canceled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual object Controller { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public virtual object Controller { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public virtual System.Exception Exception { get { throw null; } set { } } public virtual System.Exception? Exception { get { throw null; } set { } }
public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo ExceptionDispatchInfo { get { throw null; } set { } } public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo? ExceptionDispatchInfo { get { throw null; } set { } }
public virtual bool ExceptionHandled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual bool ExceptionHandled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
} }
@ -382,7 +383,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
} }
namespace Microsoft.AspNetCore.Mvc.Formatters namespace Microsoft.AspNetCore.Mvc.Formatters
{ {
public partial class FormatterCollection<TFormatter> : System.Collections.ObjectModel.Collection<TFormatter> public partial class FormatterCollection<TFormatter> : System.Collections.ObjectModel.Collection<TFormatter> where TFormatter : notnull
{ {
public FormatterCollection() { } public FormatterCollection() { }
public FormatterCollection(System.Collections.Generic.IList<TFormatter> list) { } public FormatterCollection(System.Collections.Generic.IList<TFormatter> list) { }
@ -426,7 +427,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
internal InputFormatterResult() { } internal InputFormatterResult() { }
public bool HasError { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public bool HasError { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public bool IsModelSet { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public bool IsModelSet { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public object? Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public static Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult Failure() { throw null; } public static Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult Failure() { throw null; }
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult> FailureAsync() { throw null; } public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult> FailureAsync() { throw null; }
public static Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult NoValue() { throw null; } public static Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult NoValue() { throw null; }
@ -445,8 +446,8 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
public virtual Microsoft.Extensions.Primitives.StringSegment ContentType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual Microsoft.Extensions.Primitives.StringSegment ContentType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual bool ContentTypeIsServerDefined { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public virtual bool ContentTypeIsServerDefined { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public virtual Microsoft.AspNetCore.Http.HttpContext HttpContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] protected set { } } public virtual Microsoft.AspNetCore.Http.HttpContext HttpContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] protected set { } }
public virtual object Object { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] protected set { } } public virtual object? Object { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] protected set { } }
public virtual System.Type ObjectType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] protected set { } } public virtual System.Type? ObjectType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] protected set { } }
} }
public partial class OutputFormatterWriteContext : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext public partial class OutputFormatterWriteContext : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext
{ {
@ -460,18 +461,18 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
{ {
public BindingInfo() { } public BindingInfo() { }
public BindingInfo(Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo other) { } public BindingInfo(Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo other) { }
public string BinderModelName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? BinderModelName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public System.Type BinderType { get { throw null; } set { } } public System.Type? BinderType { get { throw null; } set { } }
public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? BindingSource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public Microsoft.AspNetCore.Mvc.ModelBinding.EmptyBodyBehavior EmptyBodyBehavior { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.EmptyBodyBehavior EmptyBodyBehavior { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider PropertyFilterProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider? PropertyFilterProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public System.Func<Microsoft.AspNetCore.Mvc.ActionContext, bool> RequestPredicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public System.Func<Microsoft.AspNetCore.Mvc.ActionContext, bool>? RequestPredicate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo GetBindingInfo(System.Collections.Generic.IEnumerable<object> attributes) { throw null; } public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo? GetBindingInfo(System.Collections.Generic.IEnumerable<object> attributes) { throw null; }
public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo GetBindingInfo(System.Collections.Generic.IEnumerable<object> attributes, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata) { throw null; } public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo? GetBindingInfo(System.Collections.Generic.IEnumerable<object> attributes, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata) { throw null; }
public bool TryApplyBindingInfo(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata) { throw null; } public bool TryApplyBindingInfo(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata) { throw null; }
} }
[System.Diagnostics.DebuggerDisplayAttribute("Source: {DisplayName}")] [System.Diagnostics.DebuggerDisplayAttribute("Source: {DisplayName}")]
public partial class BindingSource : System.IEquatable<Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource> public partial class BindingSource : System.IEquatable<Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource?>
{ {
public static readonly Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Body; public static readonly Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Body;
public static readonly Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Custom; public static readonly Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Custom;
@ -489,11 +490,11 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public bool IsFromRequest { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public bool IsFromRequest { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public bool IsGreedy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public bool IsGreedy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public virtual bool CanAcceptDataFrom(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource) { throw null; } public virtual bool CanAcceptDataFrom(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource) { throw null; }
public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource other) { throw null; } public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? other) { throw null; }
public override bool Equals(object obj) { throw null; } public override bool Equals(object? obj) { throw null; }
public override int GetHashCode() { throw null; } public override int GetHashCode() { throw null; }
public static bool operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource s1, Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource s2) { throw null; } public static bool operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? s1, Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? s2) { throw null; }
public static bool operator !=(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource s1, Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource s2) { throw null; } public static bool operator !=(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? s1, Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? s2) { throw null; }
} }
public partial class CompositeBindingSource : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource public partial class CompositeBindingSource : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource
{ {
@ -524,7 +525,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
public partial interface IBindingSourceMetadata public partial interface IBindingSourceMetadata
{ {
Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get; } Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? BindingSource { get; }
} }
public partial interface IModelBinder public partial interface IModelBinder
{ {
@ -607,9 +608,9 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
private readonly object _dummy; private readonly object _dummy;
private readonly int _dummyPrimitive; private readonly int _dummyPrimitive;
public bool IsModelSet { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public bool IsModelSet { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public object? Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult other) { throw null; } public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult other) { throw null; }
public override bool Equals(object obj) { throw null; } public override bool Equals(object? obj) { throw null; }
public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult Failed() { throw null; } public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult Failed() { throw null; }
public override int GetHashCode() { throw null; } public override int GetHashCode() { throw null; }
public static bool operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult y) { throw null; } public static bool operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult y) { throw null; }
@ -620,10 +621,10 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public partial class ModelError public partial class ModelError
{ {
public ModelError(System.Exception exception) { } public ModelError(System.Exception exception) { }
public ModelError(System.Exception exception, string errorMessage) { } public ModelError(System.Exception exception, string? errorMessage) { }
public ModelError(string errorMessage) { } public ModelError(string? errorMessage) { }
public string ErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string ErrorMessage { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public System.Exception Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.Exception? Exception { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
} }
public partial class ModelErrorCollection : System.Collections.ObjectModel.Collection<Microsoft.AspNetCore.Mvc.ModelBinding.ModelError> public partial class ModelErrorCollection : System.Collections.ObjectModel.Collection<Microsoft.AspNetCore.Mvc.ModelBinding.ModelError>
{ {
@ -632,7 +633,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public void Add(string errorMessage) { } public void Add(string errorMessage) { }
} }
[System.Diagnostics.DebuggerDisplayAttribute("{DebuggerToString(),nq}")] [System.Diagnostics.DebuggerDisplayAttribute("{DebuggerToString(),nq}")]
public abstract partial class ModelMetadata : Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider, System.IEquatable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata> public abstract partial class ModelMetadata : Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider, System.IEquatable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata?>
{ {
public static readonly int DefaultOrder; public static readonly int DefaultOrder;
protected ModelMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity identity) { } protected ModelMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity identity) { }
@ -641,15 +642,15 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public abstract System.Type BinderType { get; } public abstract System.Type BinderType { get; }
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get; } public abstract Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get; }
public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ContainerMetadata { get { throw null; } } public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ContainerMetadata { get { throw null; } }
public System.Type ContainerType { get { throw null; } } public System.Type? ContainerType { get { throw null; } }
public abstract bool ConvertEmptyStringToNull { get; } public abstract bool ConvertEmptyStringToNull { get; }
public abstract string DataTypeName { get; } public abstract string DataTypeName { get; }
public abstract string Description { get; } public abstract string Description { get; }
public abstract string DisplayFormatString { get; } public abstract string DisplayFormatString { get; }
public abstract string DisplayName { get; } public abstract string DisplayName { get; }
public abstract string EditFormatString { get; } public abstract string EditFormatString { get; }
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ElementMetadata { get; } public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata? ElementMetadata { get; }
public System.Type ElementType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.Type? ElementType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public abstract System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<Microsoft.AspNetCore.Mvc.ModelBinding.EnumGroupAndName, string>> EnumGroupedDisplayNamesAndValues { get; } public abstract System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<Microsoft.AspNetCore.Mvc.ModelBinding.EnumGroupAndName, string>> EnumGroupedDisplayNamesAndValues { get; }
public abstract System.Collections.Generic.IReadOnlyDictionary<string, string> EnumNamesAndValues { get; } public abstract System.Collections.Generic.IReadOnlyDictionary<string, string> EnumNamesAndValues { get; }
public abstract bool HasNonDefaultEditFormat { get; } public abstract bool HasNonDefaultEditFormat { get; }
@ -671,17 +672,17 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataKind MetadataKind { get { throw null; } } public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataKind MetadataKind { get { throw null; } }
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelBindingMessageProvider ModelBindingMessageProvider { get; } public abstract Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelBindingMessageProvider ModelBindingMessageProvider { get; }
public System.Type ModelType { get { throw null; } } public System.Type ModelType { get { throw null; } }
public string Name { get { throw null; } } public string? Name { get { throw null; } }
public abstract string NullDisplayText { get; } public abstract string NullDisplayText { get; }
public abstract int Order { get; } public abstract int Order { get; }
public string ParameterName { get { throw null; } } public string? ParameterName { get { throw null; } }
public abstract string Placeholder { get; } public abstract string Placeholder { get; }
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelPropertyCollection Properties { get; } public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelPropertyCollection Properties { get; }
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider PropertyFilterProvider { get; } public abstract Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider PropertyFilterProvider { get; }
public abstract System.Func<object, object> PropertyGetter { get; } public abstract System.Func<object, object> PropertyGetter { get; }
public string PropertyName { get { throw null; } } public string? PropertyName { get { throw null; } }
public abstract System.Action<object, object> PropertySetter { get; } public abstract System.Action<object, object> PropertySetter { get; }
public virtual Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IPropertyValidationFilter PropertyValidationFilter { get { throw null; } } public virtual Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IPropertyValidationFilter? PropertyValidationFilter { get { throw null; } }
public abstract bool ShowForDisplay { get; } public abstract bool ShowForDisplay { get; }
public abstract bool ShowForEdit { get; } public abstract bool ShowForEdit { get; }
public abstract string SimpleDisplayProperty { get; } public abstract string SimpleDisplayProperty { get; }
@ -689,8 +690,8 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public System.Type UnderlyingOrModelType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.Type UnderlyingOrModelType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public abstract bool ValidateChildren { get; } public abstract bool ValidateChildren { get; }
public abstract System.Collections.Generic.IReadOnlyList<object> ValidatorMetadata { get; } public abstract System.Collections.Generic.IReadOnlyList<object> ValidatorMetadata { get; }
public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata other) { throw null; } public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata? other) { throw null; }
public override bool Equals(object obj) { throw null; } public override bool Equals(object? obj) { throw null; }
public string GetDisplayName() { throw null; } public string GetDisplayName() { throw null; }
public override int GetHashCode() { throw null; } public override int GetHashCode() { throw null; }
public virtual System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata> GetMetadataForProperties(System.Type modelType) { throw null; } public virtual System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata> GetMetadataForProperties(System.Type modelType) { throw null; }
@ -708,7 +709,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public partial class ModelPropertyCollection : System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata> public partial class ModelPropertyCollection : System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata>
{ {
public ModelPropertyCollection(System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata> properties) : base (default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata>)) { } public ModelPropertyCollection(System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata> properties) : base (default(System.Collections.Generic.IList<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata>)) { }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata this[string propertyName] { get { throw null; } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata? this[string propertyName] { get { throw null; } }
} }
public partial class ModelStateDictionary : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>, System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>, System.Collections.IEnumerable public partial class ModelStateDictionary : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>, System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>, System.Collections.IEnumerable
{ {
@ -724,8 +725,8 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerable Keys { get { throw null; } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerable Keys { get { throw null; } }
public int MaxAllowedErrors { get { throw null; } set { } } public int MaxAllowedErrors { get { throw null; } set { } }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry Root { get { throw null; } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry Root { get { throw null; } }
System.Collections.Generic.IEnumerable<string> System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>.Keys { get { throw null; } } System.Collections.Generic.IEnumerable<string> System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>.Keys { get { throw null; } }
System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry> System.Collections.Generic.IReadOnlyDictionary<System.String,Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>.Values { get { throw null; } } System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry> System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>.Values { get { throw null; } }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState ValidationState { get { throw null; } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState ValidationState { get { throw null; } }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.ValueEnumerable Values { get { throw null; } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.ValueEnumerable Values { get { throw null; } }
public void AddModelError(string key, System.Exception exception, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) { } public void AddModelError(string key, System.Exception exception, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) { }
@ -742,14 +743,14 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public void Merge(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary) { } public void Merge(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary) { }
public bool Remove(string key) { throw null; } public bool Remove(string key) { throw null; }
public void SetModelValue(string key, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult valueProviderResult) { } public void SetModelValue(string key, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult valueProviderResult) { }
public void SetModelValue(string key, object rawValue, string attemptedValue) { } public void SetModelValue(string key, object? rawValue, string attemptedValue) { }
public static bool StartsWithPrefix(string prefix, string key) { throw null; } public static bool StartsWithPrefix(string prefix, string key) { throw null; }
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>.GetEnumerator() { throw null; } System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>.GetEnumerator() { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
public bool TryAddModelError(string key, System.Exception exception, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) { throw null; } public bool TryAddModelError(string key, System.Exception exception, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) { throw null; }
public bool TryAddModelError(string key, string errorMessage) { throw null; } public bool TryAddModelError(string key, string errorMessage) { throw null; }
public bool TryAddModelException(string key, System.Exception exception) { throw null; } public bool TryAddModelException(string key, System.Exception exception) { throw null; }
public bool TryGetValue(string key, out Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry value) { throw null; } public bool TryGetValue(string key, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry? value) { throw null; }
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public partial struct Enumerator : System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>, System.Collections.IEnumerator, System.IDisposable public partial struct Enumerator : System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>, System.Collections.IEnumerator, System.IDisposable
{ {
@ -769,7 +770,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
private readonly int _dummyPrimitive; private readonly int _dummyPrimitive;
public KeyEnumerable(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary) { throw null; } public KeyEnumerable(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary) { throw null; }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerator GetEnumerator() { throw null; } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerator GetEnumerator() { throw null; }
System.Collections.Generic.IEnumerator<string> System.Collections.Generic.IEnumerable<System.String>.GetEnumerator() { throw null; } System.Collections.Generic.IEnumerator<string> System.Collections.Generic.IEnumerable<string>.GetEnumerator() { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
} }
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
@ -791,7 +792,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
private readonly int _dummyPrimitive; private readonly int _dummyPrimitive;
public PrefixEnumerable(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary, string prefix) { throw null; } public PrefixEnumerable(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary, string prefix) { throw null; }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.Enumerator GetEnumerator() { throw null; } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.Enumerator GetEnumerator() { throw null; }
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>.GetEnumerator() { throw null; } System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>>.GetEnumerator() { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
} }
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
@ -820,13 +821,13 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public abstract partial class ModelStateEntry public abstract partial class ModelStateEntry
{ {
protected ModelStateEntry() { } protected ModelStateEntry() { }
public string AttemptedValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? AttemptedValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public abstract System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry> Children { get; } public abstract System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry>? Children { get; }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelErrorCollection Errors { get { throw null; } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelErrorCollection Errors { get { throw null; } }
public abstract bool IsContainerNode { get; } public abstract bool IsContainerNode { get; }
public object RawValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public object? RawValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState ValidationState { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState ValidationState { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry GetModelStateForProperty(string propertyName); public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry? GetModelStateForProperty(string propertyName);
} }
public enum ModelValidationState public enum ModelValidationState
{ {
@ -859,11 +860,11 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public ValueProviderResult(Microsoft.Extensions.Primitives.StringValues values) { throw null; } public ValueProviderResult(Microsoft.Extensions.Primitives.StringValues values) { throw null; }
public ValueProviderResult(Microsoft.Extensions.Primitives.StringValues values, System.Globalization.CultureInfo culture) { throw null; } public ValueProviderResult(Microsoft.Extensions.Primitives.StringValues values, System.Globalization.CultureInfo culture) { throw null; }
public System.Globalization.CultureInfo Culture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.Globalization.CultureInfo Culture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public string FirstValue { get { throw null; } } public string? FirstValue { get { throw null; } }
public int Length { get { throw null; } } public int Length { get { throw null; } }
public Microsoft.Extensions.Primitives.StringValues Values { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public Microsoft.Extensions.Primitives.StringValues Values { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult other) { throw null; } public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult other) { throw null; }
public override bool Equals(object obj) { throw null; } public override bool Equals(object? obj) { throw null; }
public System.Collections.Generic.IEnumerator<string> GetEnumerator() { throw null; } public System.Collections.Generic.IEnumerator<string> GetEnumerator() { throw null; }
public override int GetHashCode() { throw null; } public override int GetHashCode() { throw null; }
public static bool operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult y) { throw null; } public static bool operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult y) { throw null; }
@ -896,14 +897,14 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
{ {
private readonly object _dummy; private readonly object _dummy;
private readonly int _dummyPrimitive; private readonly int _dummyPrimitive;
public System.Type ContainerType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.Type? ContainerType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataKind MetadataKind { get { throw null; } } public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataKind MetadataKind { get { throw null; } }
public System.Type ModelType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public System.Type ModelType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string? Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public System.Reflection.ParameterInfo ParameterInfo { get { throw null; } } public System.Reflection.ParameterInfo? ParameterInfo { get { throw null; } }
public System.Reflection.PropertyInfo PropertyInfo { get { throw null; } } public System.Reflection.PropertyInfo? PropertyInfo { get { throw null; } }
public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity other) { throw null; } public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity other) { throw null; }
public override bool Equals(object obj) { throw null; } public override bool Equals(object? obj) { throw null; }
public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForParameter(System.Reflection.ParameterInfo parameter) { throw null; } public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForParameter(System.Reflection.ParameterInfo parameter) { throw null; }
public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForParameter(System.Reflection.ParameterInfo parameter, System.Type modelType) { throw null; } public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForParameter(System.Reflection.ParameterInfo parameter, System.Type modelType) { throw null; }
public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForProperty(System.Reflection.PropertyInfo propertyInfo, System.Type modelType, System.Type containerType) { throw null; } public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForProperty(System.Reflection.PropertyInfo propertyInfo, System.Type modelType, System.Type containerType) { throw null; }
@ -1000,17 +1001,19 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
public ValidationEntry(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model) { throw null; } public ValidationEntry(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model) { throw null; }
public string Key { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public string Key { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public object Model { get { throw null; } } public object? Model { get { throw null; } }
} }
public partial class ValidationStateDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>>, System.Collections.Generic.IDictionary<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>>, System.Collections.Generic.IReadOnlyDictionary<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>, System.Collections.IEnumerable public partial class ValidationStateDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>>, System.Collections.Generic.IDictionary<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>>, System.Collections.Generic.IReadOnlyDictionary<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>, System.Collections.IEnumerable
{ {
public ValidationStateDictionary() { } public ValidationStateDictionary() { }
public int Count { get { throw null; } } public int Count { get { throw null; } }
public bool IsReadOnly { get { throw null; } } public bool IsReadOnly { get { throw null; } }
public Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry this[object key] { get { throw null; } set { } } public Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry? this[object key] { get { throw null; } set { } }
public System.Collections.Generic.ICollection<object> Keys { get { throw null; } } public System.Collections.Generic.ICollection<object> Keys { get { throw null; } }
System.Collections.Generic.IEnumerable<object> System.Collections.Generic.IReadOnlyDictionary<System.Object,Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>.Keys { get { throw null; } } Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry System.Collections.Generic.IDictionary<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>.this[object key] { get { throw null; } set { } }
System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry> System.Collections.Generic.IReadOnlyDictionary<System.Object,Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>.Values { get { throw null; } } Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry System.Collections.Generic.IReadOnlyDictionary<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>.this[object key] { get { throw null; } }
System.Collections.Generic.IEnumerable<object> System.Collections.Generic.IReadOnlyDictionary<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>.Keys { get { throw null; } }
System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry> System.Collections.Generic.IReadOnlyDictionary<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>.Values { get { throw null; } }
public System.Collections.Generic.ICollection<Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry> Values { get { throw null; } } public System.Collections.Generic.ICollection<Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry> Values { get { throw null; } }
public void Add(System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry> item) { } public void Add(System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry> item) { }
public void Add(object key, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry value) { } public void Add(object key, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry value) { }
@ -1022,7 +1025,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
public bool Remove(System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry> item) { throw null; } public bool Remove(System.Collections.Generic.KeyValuePair<object, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry> item) { throw null; }
public bool Remove(object key) { throw null; } public bool Remove(object key) { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
public bool TryGetValue(object key, out Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry value) { throw null; } public bool TryGetValue(object key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry value) { throw null; }
} }
public partial class ValidationStateEntry public partial class ValidationStateEntry
{ {
@ -1050,25 +1053,25 @@ namespace Microsoft.AspNetCore.Mvc.Routing
public int Order { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public int Order { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public bool SuppressLinkGeneration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public bool SuppressLinkGeneration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public bool SuppressPathMatching { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public bool SuppressPathMatching { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string Template { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? Template { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public partial class UrlActionContext public partial class UrlActionContext
{ {
public UrlActionContext() { } public UrlActionContext() { }
public string Action { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? Action { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string Controller { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? Controller { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string Fragment { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? Fragment { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string Host { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? Host { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string Protocol { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? Protocol { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public object Values { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public object? Values { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
public partial class UrlRouteContext public partial class UrlRouteContext
{ {
public UrlRouteContext() { } public UrlRouteContext() { }
public string Fragment { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? Fragment { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string Host { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? Host { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string Protocol { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? Protocol { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public string RouteName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public string? RouteName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public object Values { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } } public object? Values { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
} }
} }

View File

@ -38,42 +38,42 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions
/// <summary> /// <summary>
/// Gets or sets the <see cref="Routing.AttributeRouteInfo"/>. /// Gets or sets the <see cref="Routing.AttributeRouteInfo"/>.
/// </summary> /// </summary>
public AttributeRouteInfo AttributeRouteInfo { get; set; } public AttributeRouteInfo? AttributeRouteInfo { get; set; }
/// <summary> /// <summary>
/// The set of constraints for this action. Must all be satisfied for the action to be selected. /// The set of constraints for this action. Must all be satisfied for the action to be selected.
/// </summary> /// </summary>
public IList<IActionConstraintMetadata> ActionConstraints { get; set; } public IList<IActionConstraintMetadata>? ActionConstraints { get; set; }
/// <summary> /// <summary>
/// Gets or sets the endpoint metadata for this action. /// Gets or sets the endpoint metadata for this action.
/// This API is meant for infrastructure and should not be used by application code. /// This API is meant for infrastructure and should not be used by application code.
/// </summary> /// </summary>
public IList<object> EndpointMetadata { get; set; } public IList<object> EndpointMetadata { get; set; } = Array.Empty<ParameterDescriptor>();
/// <summary> /// <summary>
/// The set of parameters associated with this action. /// The set of parameters associated with this action.
/// </summary> /// </summary>
public IList<ParameterDescriptor> Parameters { get; set; } public IList<ParameterDescriptor> Parameters { get; set; } = Array.Empty<ParameterDescriptor>();
/// <summary> /// <summary>
/// The set of properties which are model bound. /// The set of properties which are model bound.
/// </summary> /// </summary>
public IList<ParameterDescriptor> BoundProperties { get; set; } public IList<ParameterDescriptor> BoundProperties { get; set; } = Array.Empty<ParameterDescriptor>();
/// <summary> /// <summary>
/// The set of filters associated with this action. /// The set of filters associated with this action.
/// </summary> /// </summary>
public IList<FilterDescriptor> FilterDescriptors { get; set; } public IList<FilterDescriptor> FilterDescriptors { get; set; } = Array.Empty<FilterDescriptor>();
/// <summary> /// <summary>
/// A friendly name for this action. /// A friendly name for this action.
/// </summary> /// </summary>
public virtual string DisplayName { get; set; } public virtual string? DisplayName { get; set; }
/// <summary> /// <summary>
/// Stores arbitrary metadata properties associated with the <see cref="ActionDescriptor"/>. /// Stores arbitrary metadata properties associated with the <see cref="ActionDescriptor"/>.
/// </summary> /// </summary>
public IDictionary<object, object> Properties { get; set; } public IDictionary<object, object> Properties { get; set; } = default!;
} }
} }

View File

@ -24,14 +24,13 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions
throw new ArgumentNullException(nameof(actionDescriptor)); throw new ArgumentNullException(nameof(actionDescriptor));
} }
object value; if (actionDescriptor.Properties.TryGetValue(typeof(T), out var value))
if (actionDescriptor.Properties.TryGetValue(typeof(T), out value))
{ {
return (T)value; return (T)value;
} }
else else
{ {
return default(T); return default!;
} }
} }

View File

@ -32,6 +32,6 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions
/// <summary> /// <summary>
/// Gets or sets the <see cref="IActionInvoker"/> that will be used to invoke <see cref="ActionContext" /> /// Gets or sets the <see cref="IActionInvoker"/> that will be used to invoke <see cref="ActionContext" />
/// </summary> /// </summary>
public IActionInvoker Result { get; set; } public IActionInvoker? Result { get; set; }
} }
} }

View File

@ -14,16 +14,16 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions
/// <summary> /// <summary>
/// Gets or sets the parameter name. /// Gets or sets the parameter name.
/// </summary> /// </summary>
public string Name { get; set; } public string Name { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets the type of the parameter. /// Gets or sets the type of the parameter.
/// </summary> /// </summary>
public Type ParameterType { get; set; } public Type ParameterType { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets the <see cref="ModelBinding.BindingInfo"/> for the parameter. /// Gets or sets the <see cref="ModelBinding.BindingInfo"/> for the parameter.
/// </summary> /// </summary>
public BindingInfo BindingInfo { get; set; } public BindingInfo BindingInfo { get; set; } = default!;
} }
} }

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. // 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.Collections.Generic;
using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing;
@ -15,16 +16,16 @@ namespace Microsoft.AspNetCore.Mvc.ActionConstraints
/// The list of <see cref="ActionSelectorCandidate"/>. This includes all actions that are valid for the current /// The list of <see cref="ActionSelectorCandidate"/>. This includes all actions that are valid for the current
/// request, as well as their constraints. /// request, as well as their constraints.
/// </summary> /// </summary>
public IReadOnlyList<ActionSelectorCandidate> Candidates { get; set; } public IReadOnlyList<ActionSelectorCandidate> Candidates { get; set; } = Array.Empty<ActionSelectorCandidate>();
/// <summary> /// <summary>
/// The current <see cref="ActionSelectorCandidate"/>. /// The current <see cref="ActionSelectorCandidate"/>.
/// </summary> /// </summary>
public ActionSelectorCandidate CurrentCandidate { get; set; } public ActionSelectorCandidate CurrentCandidate { get; set; } = default!;
/// <summary> /// <summary>
/// The <see cref="RouteContext"/>. /// The <see cref="RouteContext"/>.
/// </summary> /// </summary>
public RouteContext RouteContext { get; set; } public RouteContext RouteContext { get; set; } = default!;
} }
} }

View File

@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Mvc.ActionConstraints
/// <summary> /// <summary>
/// The <see cref="IActionConstraint"/> associated with <see cref="Metadata"/>. /// The <see cref="IActionConstraint"/> associated with <see cref="Metadata"/>.
/// </summary> /// </summary>
public IActionConstraint Constraint { get; set; } public IActionConstraint Constraint { get; set; } = default!;
/// <summary> /// <summary>
/// The <see cref="IActionConstraintMetadata"/> instance. /// The <see cref="IActionConstraintMetadata"/> instance.

View File

@ -31,10 +31,10 @@ namespace Microsoft.AspNetCore.Mvc
/// <param name="actionContext">The <see cref="ActionContext"/> to copy.</param> /// <param name="actionContext">The <see cref="ActionContext"/> to copy.</param>
public ActionContext(ActionContext actionContext) public ActionContext(ActionContext actionContext)
: this( : this(
actionContext?.HttpContext, actionContext.HttpContext,
actionContext?.RouteData, actionContext.RouteData,
actionContext?.ActionDescriptor, actionContext.ActionDescriptor,
actionContext?.ModelState) actionContext.ModelState)
{ {
} }
@ -97,10 +97,7 @@ namespace Microsoft.AspNetCore.Mvc
/// <remarks> /// <remarks>
/// The property setter is provided for unit test purposes only. /// The property setter is provided for unit test purposes only.
/// </remarks> /// </remarks>
public ActionDescriptor ActionDescriptor public ActionDescriptor ActionDescriptor { get; set; } = default!;
{
get; set;
}
/// <summary> /// <summary>
/// Gets or sets the <see cref="Http.HttpContext"/> for the current request. /// Gets or sets the <see cref="Http.HttpContext"/> for the current request.
@ -108,18 +105,12 @@ namespace Microsoft.AspNetCore.Mvc
/// <remarks> /// <remarks>
/// The property setter is provided for unit test purposes only. /// The property setter is provided for unit test purposes only.
/// </remarks> /// </remarks>
public HttpContext HttpContext public HttpContext HttpContext { get; set; } = default!;
{
get; set;
}
/// <summary> /// <summary>
/// Gets the <see cref="ModelStateDictionary"/>. /// Gets the <see cref="ModelStateDictionary"/>.
/// </summary> /// </summary>
public ModelStateDictionary ModelState public ModelStateDictionary ModelState { get; } = default!;
{
get;
}
/// <summary> /// <summary>
/// Gets or sets the <see cref="AspNetCore.Routing.RouteData"/> for the current request. /// Gets or sets the <see cref="AspNetCore.Routing.RouteData"/> for the current request.
@ -127,9 +118,6 @@ namespace Microsoft.AspNetCore.Mvc
/// <remarks> /// <remarks>
/// The property setter is provided for unit test purposes only. /// The property setter is provided for unit test purposes only.
/// </remarks> /// </remarks>
public RouteData RouteData public RouteData RouteData { get; set; } = default!;
{
get; set;
}
} }
} }

View File

@ -16,17 +16,17 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
/// <summary> /// <summary>
/// Gets or sets <see cref="ActionDescriptor"/> for this api. /// Gets or sets <see cref="ActionDescriptor"/> for this api.
/// </summary> /// </summary>
public ActionDescriptor ActionDescriptor { get; set; } public ActionDescriptor ActionDescriptor { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets group name for this api. /// Gets or sets group name for this api.
/// </summary> /// </summary>
public string GroupName { get; set; } public string? GroupName { get; set; }
/// <summary> /// <summary>
/// Gets or sets the supported HTTP method for this api, or null if all HTTP methods are supported. /// Gets or sets the supported HTTP method for this api, or null if all HTTP methods are supported.
/// </summary> /// </summary>
public string HttpMethod { get; set; } public string? HttpMethod { get; set; }
/// <summary> /// <summary>
/// Gets a list of <see cref="ApiParameterDescription"/> for this api. /// Gets a list of <see cref="ApiParameterDescription"/> for this api.
@ -41,7 +41,7 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
/// <summary> /// <summary>
/// Gets or sets relative url path template (relative to application root) for this api. /// Gets or sets relative url path template (relative to application root) for this api.
/// </summary> /// </summary>
public string RelativePath { get; set; } public string RelativePath { get; set; } = default!;
/// <summary> /// <summary>
/// Gets the list of possible formats for a request. /// Gets the list of possible formats for a request.

View File

@ -15,37 +15,37 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
/// <summary> /// <summary>
/// Gets or sets the <see cref="ModelMetadata"/>. /// Gets or sets the <see cref="ModelMetadata"/>.
/// </summary> /// </summary>
public ModelMetadata ModelMetadata { get; set; } public ModelMetadata ModelMetadata { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets the name. /// Gets or sets the name.
/// </summary> /// </summary>
public string Name { get; set; } public string Name { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets the <see cref="ApiParameterRouteInfo"/>. /// Gets or sets the <see cref="ApiParameterRouteInfo"/>.
/// </summary> /// </summary>
public ApiParameterRouteInfo RouteInfo { get; set; } public ApiParameterRouteInfo? RouteInfo { get; set; }
/// <summary> /// <summary>
/// Gets or sets the <see cref="BindingSource"/>. /// Gets or sets the <see cref="BindingSource"/>.
/// </summary> /// </summary>
public BindingSource Source { get; set; } public BindingSource Source { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets the <see cref="BindingInfo"/>. /// Gets or sets the <see cref="BindingInfo"/>.
/// </summary> /// </summary>
public BindingInfo BindingInfo { get; set; } public BindingInfo? BindingInfo { get; set; }
/// <summary> /// <summary>
/// Gets or sets the parameter type. /// Gets or sets the parameter type.
/// </summary> /// </summary>
public Type Type { get; set; } public Type Type { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets the parameter descriptor. /// Gets or sets the parameter descriptor.
/// </summary> /// </summary>
public ParameterDescriptor ParameterDescriptor { get; set; } public ParameterDescriptor ParameterDescriptor { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets a value that determines if the parameter is required. /// Gets or sets a value that determines if the parameter is required.
@ -63,6 +63,6 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
/// <summary> /// <summary>
/// Gets or sets the default value for a parameter. /// Gets or sets the default value for a parameter.
/// </summary> /// </summary>
public object DefaultValue { get; set; } public object? DefaultValue { get; set; }
} }
} }

View File

@ -18,12 +18,12 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
/// Route constraints are only applied when a value is bound from a URL's path. See /// Route constraints are only applied when a value is bound from a URL's path. See
/// <see cref="ApiParameterDescription.Source"/> for the data source considered. /// <see cref="ApiParameterDescription.Source"/> for the data source considered.
/// </remarks> /// </remarks>
public IEnumerable<IRouteConstraint> Constraints { get; set; } public IEnumerable<IRouteConstraint>? Constraints { get; set; }
/// <summary> /// <summary>
/// Gets or sets the default value for the parameter. /// Gets or sets the default value for the parameter.
/// </summary> /// </summary>
public object DefaultValue { get; set; } public object? DefaultValue { get; set; }
/// <summary> /// <summary>
/// Gets a value indicating whether not a parameter is considered optional by routing. /// Gets a value indicating whether not a parameter is considered optional by routing.

View File

@ -13,11 +13,11 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
/// <summary> /// <summary>
/// The formatter used to read this request. /// The formatter used to read this request.
/// </summary> /// </summary>
public IInputFormatter Formatter { get; set; } public IInputFormatter Formatter { get; set; } = default!;
/// <summary> /// <summary>
/// The media type of the request. /// The media type of the request.
/// </summary> /// </summary>
public string MediaType { get; set; } public string MediaType { get; set; } = default!;
} }
} }

View File

@ -13,11 +13,11 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
/// <summary> /// <summary>
/// Gets or sets the formatter used to output this response. /// Gets or sets the formatter used to output this response.
/// </summary> /// </summary>
public IOutputFormatter Formatter { get; set; } public IOutputFormatter Formatter { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets the media type of the response. /// Gets or sets the media type of the response.
/// </summary> /// </summary>
public string MediaType { get; set; } public string MediaType { get; set; } = default!;
} }
} }

View File

@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
/// <remarks> /// <remarks>
/// Will be null if <see cref="Type"/> is null or void. /// Will be null if <see cref="Type"/> is null or void.
/// </remarks> /// </remarks>
public ModelMetadata ModelMetadata { get; set; } public ModelMetadata? ModelMetadata { get; set; }
/// <summary> /// <summary>
/// Gets or sets the CLR data type of the response or null. /// Gets or sets the CLR data type of the response or null.
@ -33,7 +33,7 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
/// <c>Microsoft.AspNetCore.Mvc.ProducesAttribute</c> or <c>Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute</c> on an action method /// <c>Microsoft.AspNetCore.Mvc.ProducesAttribute</c> or <c>Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute</c> on an action method
/// to specify a response type. /// to specify a response type.
/// </remarks> /// </remarks>
public Type Type { get; set; } public Type? Type { get; set; }
/// <summary> /// <summary>
/// Gets or sets the HTTP response status code. /// Gets or sets the HTTP response status code.

View File

@ -12,8 +12,8 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// </summary> /// </summary>
public class ActionExecutedContext : FilterContext public class ActionExecutedContext : FilterContext
{ {
private Exception _exception; private Exception? _exception;
private ExceptionDispatchInfo _exceptionDispatchInfo; private ExceptionDispatchInfo? _exceptionDispatchInfo;
/// <summary> /// <summary>
/// Instantiates a new <see cref="ActionExecutingContext"/> instance. /// Instantiates a new <see cref="ActionExecutingContext"/> instance.
@ -44,7 +44,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Gets or sets the <see cref="System.Exception"/> caught while executing the action or action filters, if /// Gets or sets the <see cref="System.Exception"/> caught while executing the action or action filters, if
/// any. /// any.
/// </summary> /// </summary>
public virtual Exception Exception public virtual Exception? Exception
{ {
get get
{ {
@ -69,7 +69,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Gets or sets the <see cref="System.Runtime.ExceptionServices.ExceptionDispatchInfo"/> for the /// Gets or sets the <see cref="System.Runtime.ExceptionServices.ExceptionDispatchInfo"/> for the
/// <see cref="Exception"/>, if an <see cref="System.Exception"/> was caught and this information captured. /// <see cref="Exception"/>, if an <see cref="System.Exception"/> was caught and this information captured.
/// </summary> /// </summary>
public virtual ExceptionDispatchInfo ExceptionDispatchInfo public virtual ExceptionDispatchInfo? ExceptionDispatchInfo
{ {
get get
{ {
@ -91,6 +91,6 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// <summary> /// <summary>
/// Gets or sets the <see cref="IActionResult"/>. /// Gets or sets the <see cref="IActionResult"/>.
/// </summary> /// </summary>
public virtual IActionResult Result { get; set; } public virtual IActionResult Result { get; set; } = default!;
} }
} }

View File

@ -41,7 +41,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Gets or sets the <see cref="IActionResult"/> to execute. Setting <see cref="Result"/> to a non-<c>null</c> /// Gets or sets the <see cref="IActionResult"/> to execute. Setting <see cref="Result"/> to a non-<c>null</c>
/// value inside an action filter will short-circuit the action and any remaining action filters. /// value inside an action filter will short-circuit the action and any remaining action filters.
/// </summary> /// </summary>
public virtual IActionResult Result { get; set; } public virtual IActionResult? Result { get; set; }
/// <summary> /// <summary>
/// Gets the arguments to pass when invoking the action. Keys are parameter names. /// Gets the arguments to pass when invoking the action. Keys are parameter names.

View File

@ -27,6 +27,6 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Gets or sets the result of the request. Setting <see cref="Result"/> to a non-<c>null</c> value inside /// Gets or sets the result of the request. Setting <see cref="Result"/> to a non-<c>null</c> value inside
/// an authorization filter will short-circuit the remainder of the filter pipeline. /// an authorization filter will short-circuit the remainder of the filter pipeline.
/// </summary> /// </summary>
public virtual IActionResult Result { get; set; } public virtual IActionResult? Result { get; set; }
} }
} }

View File

@ -13,8 +13,8 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// </summary> /// </summary>
public class ExceptionContext : FilterContext public class ExceptionContext : FilterContext
{ {
private Exception _exception; private Exception? _exception;
private ExceptionDispatchInfo _exceptionDispatchInfo; private ExceptionDispatchInfo? _exceptionDispatchInfo;
/// <summary> /// <summary>
/// Instantiates a new <see cref="ExceptionContext"/> instance. /// Instantiates a new <see cref="ExceptionContext"/> instance.
@ -39,7 +39,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
} }
else else
{ {
return _exception; return _exception!;
} }
} }
@ -54,7 +54,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Gets or sets the <see cref="System.Runtime.ExceptionServices.ExceptionDispatchInfo"/> for the /// Gets or sets the <see cref="System.Runtime.ExceptionServices.ExceptionDispatchInfo"/> for the
/// <see cref="Exception"/>, if this information was captured. /// <see cref="Exception"/>, if this information was captured.
/// </summary> /// </summary>
public virtual ExceptionDispatchInfo ExceptionDispatchInfo public virtual ExceptionDispatchInfo? ExceptionDispatchInfo
{ {
get get
{ {
@ -76,6 +76,6 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// <summary> /// <summary>
/// Gets or sets the <see cref="IActionResult"/>. /// Gets or sets the <see cref="IActionResult"/>.
/// </summary> /// </summary>
public virtual IActionResult Result { get; set; } public virtual IActionResult? Result { get; set; }
} }
} }

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.AspNetCore.Mvc.Filters namespace Microsoft.AspNetCore.Mvc.Filters
{ {
@ -81,6 +82,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// <returns>The implementation of <typeparamref name="TMetadata"/> applied to the action associated with /// <returns>The implementation of <typeparamref name="TMetadata"/> applied to the action associated with
/// the <see cref="FilterContext"/> /// the <see cref="FilterContext"/>
/// </returns> /// </returns>
[return: MaybeNull]
public TMetadata FindEffectivePolicy<TMetadata>() where TMetadata : IFilterMetadata public TMetadata FindEffectivePolicy<TMetadata>() where TMetadata : IFilterMetadata
{ {
// The most specific policy is the one closest to the action (nearest the end of the list). // The most specific policy is the one closest to the action (nearest the end of the list).
@ -93,7 +95,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
} }
} }
return default(TMetadata); return default;
} }
} }
} }

View File

@ -48,12 +48,12 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// <summary> /// <summary>
/// Gets the <see cref="FilterDescriptor"/> containing the filter metadata. /// Gets the <see cref="FilterDescriptor"/> containing the filter metadata.
/// </summary> /// </summary>
public FilterDescriptor Descriptor { get; } public FilterDescriptor Descriptor { get; } = default!;
/// <summary> /// <summary>
/// Gets or sets the executable <see cref="IFilterMetadata"/> associated with <see cref="Descriptor"/>. /// Gets or sets the executable <see cref="IFilterMetadata"/> associated with <see cref="Descriptor"/>.
/// </summary> /// </summary>
public IFilterMetadata Filter { get; set; } public IFilterMetadata Filter { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets a value indicating whether or not <see cref="Filter"/> can be reused across requests. /// Gets or sets a value indicating whether or not <see cref="Filter"/> can be reused across requests.

View File

@ -12,8 +12,8 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// </summary> /// </summary>
public class ResourceExecutedContext : FilterContext public class ResourceExecutedContext : FilterContext
{ {
private Exception _exception; private Exception? _exception;
private ExceptionDispatchInfo _exceptionDispatchInfo; private ExceptionDispatchInfo? _exceptionDispatchInfo;
/// <summary> /// <summary>
/// Creates a new <see cref="ResourceExecutedContext"/>. /// Creates a new <see cref="ResourceExecutedContext"/>.
@ -44,7 +44,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Setting <see cref="ExceptionHandled"/> to <c>true</c> will also mark the exception as handled. /// Setting <see cref="ExceptionHandled"/> to <c>true</c> will also mark the exception as handled.
/// </para> /// </para>
/// </remarks> /// </remarks>
public virtual Exception Exception public virtual Exception? Exception
{ {
get get
{ {
@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Setting <see cref="ExceptionHandled"/> to <c>true</c> will also mark the exception as handled. /// Setting <see cref="ExceptionHandled"/> to <c>true</c> will also mark the exception as handled.
/// </para> /// </para>
/// </remarks> /// </remarks>
public virtual ExceptionDispatchInfo ExceptionDispatchInfo public virtual ExceptionDispatchInfo? ExceptionDispatchInfo
{ {
get get
{ {
@ -115,6 +115,6 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// to resource filters. /// to resource filters.
/// </para> /// </para>
/// </remarks> /// </remarks>
public virtual IActionResult Result { get; set; } public virtual IActionResult? Result { get; set; }
} }
} }

View File

@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Setting <see cref="Result"/> to a non-<c>null</c> value inside a resource filter will /// Setting <see cref="Result"/> to a non-<c>null</c> value inside a resource filter will
/// short-circuit execution of additional resource filters and the action itself. /// short-circuit execution of additional resource filters and the action itself.
/// </remarks> /// </remarks>
public virtual IActionResult Result { get; set; } public virtual IActionResult? Result { get; set; }
/// <summary> /// <summary>
/// Gets the list of <see cref="IValueProviderFactory"/> instances used by model binding. /// Gets the list of <see cref="IValueProviderFactory"/> instances used by model binding.

View File

@ -12,8 +12,8 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// </summary> /// </summary>
public class ResultExecutedContext : FilterContext public class ResultExecutedContext : FilterContext
{ {
private Exception _exception; private Exception? _exception;
private ExceptionDispatchInfo _exceptionDispatchInfo; private ExceptionDispatchInfo? _exceptionDispatchInfo;
/// <summary> /// <summary>
/// Instantiates a new <see cref="ResultExecutedContext"/> instance. /// Instantiates a new <see cref="ResultExecutedContext"/> instance.
@ -55,7 +55,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Gets or sets the <see cref="System.Exception"/> caught while executing the result or result filters, if /// Gets or sets the <see cref="System.Exception"/> caught while executing the result or result filters, if
/// any. /// any.
/// </summary> /// </summary>
public virtual Exception Exception public virtual Exception? Exception
{ {
get get
{ {
@ -80,7 +80,7 @@ namespace Microsoft.AspNetCore.Mvc.Filters
/// Gets or sets the <see cref="System.Runtime.ExceptionServices.ExceptionDispatchInfo"/> for the /// Gets or sets the <see cref="System.Runtime.ExceptionServices.ExceptionDispatchInfo"/> for the
/// <see cref="Exception"/>, if an <see cref="System.Exception"/> was caught and this information captured. /// <see cref="Exception"/>, if an <see cref="System.Exception"/> was caught and this information captured.
/// </summary> /// </summary>
public virtual ExceptionDispatchInfo ExceptionDispatchInfo public virtual ExceptionDispatchInfo? ExceptionDispatchInfo
{ {
get get
{ {

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
/// Represents a collection of formatters. /// Represents a collection of formatters.
/// </summary> /// </summary>
/// <typeparam name="TFormatter">The type of formatters in the collection.</typeparam> /// <typeparam name="TFormatter">The type of formatters in the collection.</typeparam>
public class FormatterCollection<TFormatter> : Collection<TFormatter> public class FormatterCollection<TFormatter> : Collection<TFormatter> where TFormatter : notnull
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="FormatterCollection{TFormatter}"/> class that is empty. /// Initializes a new instance of the <see cref="FormatterCollection{TFormatter}"/> class that is empty.

View File

@ -42,7 +42,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
/// <value> /// <value>
/// <c>null</c> if <see cref="HasError"/> is <c>true</c>. /// <c>null</c> if <see cref="HasError"/> is <c>true</c>.
/// </value> /// </value>
public object Model { get; } public object? Model { get; }
/// <summary> /// <summary>
/// Returns an <see cref="InputFormatterResult"/> indicating the <see cref="IInputFormatter.ReadAsync"/> /// Returns an <see cref="InputFormatterResult"/> indicating the <see cref="IInputFormatter.ReadAsync"/>

View File

@ -53,11 +53,11 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
/// <summary> /// <summary>
/// Gets or sets the object to write to the response. /// Gets or sets the object to write to the response.
/// </summary> /// </summary>
public virtual object Object { get; protected set; } public virtual object? Object { get; protected set; }
/// <summary> /// <summary>
/// Gets or sets the <see cref="Type"/> of the object to write to the response. /// Gets or sets the <see cref="Type"/> of the object to write to the response.
/// </summary> /// </summary>
public virtual Type ObjectType { get; protected set; } public virtual Type? ObjectType { get; protected set; }
} }
} }

View File

@ -9,6 +9,7 @@ Microsoft.AspNetCore.Mvc.IActionResult</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;aspnetcoremvc</PackageTags> <PackageTags>aspnetcore;aspnetcoremvc</PackageTags>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -20,8 +21,4 @@ Microsoft.AspNetCore.Mvc.IActionResult</Description>
<Reference Include="Microsoft.Net.Http.Headers" /> <Reference Include="Microsoft.Net.Http.Headers" />
</ItemGroup> </ItemGroup>
<ItemGroup Label="Shared Source">
<Compile Include="$(SharedSourceRoot)HashCodeCombiner\*.cs" />
</ItemGroup>
</Project> </Project>

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// </summary> /// </summary>
public class BindingInfo public class BindingInfo
{ {
private Type _binderType; private Type? _binderType;
/// <summary> /// <summary>
/// Creates a new <see cref="BindingInfo"/>. /// Creates a new <see cref="BindingInfo"/>.
@ -44,12 +44,12 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <summary> /// <summary>
/// Gets or sets the <see cref="ModelBinding.BindingSource"/>. /// Gets or sets the <see cref="ModelBinding.BindingSource"/>.
/// </summary> /// </summary>
public BindingSource BindingSource { get; set; } public BindingSource? BindingSource { get; set; }
/// <summary> /// <summary>
/// Gets or sets the binder model name. /// Gets or sets the binder model name.
/// </summary> /// </summary>
public string BinderModelName { get; set; } public string? BinderModelName { get; set; }
/// <summary> /// <summary>
/// Gets or sets the <see cref="Type"/> of the <see cref="IModelBinder"/> implementation used to bind the /// Gets or sets the <see cref="Type"/> of the <see cref="IModelBinder"/> implementation used to bind the
@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// Also set <see cref="BindingSource"/> if the specified <see cref="IModelBinder"/> implementation does not /// Also set <see cref="BindingSource"/> if the specified <see cref="IModelBinder"/> implementation does not
/// use values from form data, route values or the query string. /// use values from form data, route values or the query string.
/// </remarks> /// </remarks>
public Type BinderType public Type? BinderType
{ {
get => _binderType; get => _binderType;
set set
@ -80,13 +80,13 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <summary> /// <summary>
/// Gets or sets the <see cref="ModelBinding.IPropertyFilterProvider"/>. /// Gets or sets the <see cref="ModelBinding.IPropertyFilterProvider"/>.
/// </summary> /// </summary>
public IPropertyFilterProvider PropertyFilterProvider { get; set; } public IPropertyFilterProvider? PropertyFilterProvider { get; set; }
/// <summary> /// <summary>
/// Gets or sets a predicate which determines whether or not the model should be bound based on state /// Gets or sets a predicate which determines whether or not the model should be bound based on state
/// from the current request. /// from the current request.
/// </summary> /// </summary>
public Func<ActionContext, bool> RequestPredicate { get; set; } public Func<ActionContext, bool>? RequestPredicate { get; set; }
/// <summary> /// <summary>
/// Gets or sets the value which decides if empty bodies are treated as valid inputs. /// Gets or sets the value which decides if empty bodies are treated as valid inputs.
@ -104,7 +104,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <param name="attributes">A collection of attributes which are used to construct <see cref="BindingInfo"/> /// <param name="attributes">A collection of attributes which are used to construct <see cref="BindingInfo"/>
/// </param> /// </param>
/// <returns>A new instance of <see cref="BindingInfo"/>.</returns> /// <returns>A new instance of <see cref="BindingInfo"/>.</returns>
public static BindingInfo GetBindingInfo(IEnumerable<object> attributes) public static BindingInfo? GetBindingInfo(IEnumerable<object> attributes)
{ {
var bindingInfo = new BindingInfo(); var bindingInfo = new BindingInfo();
var isBindingInfoPresent = false; var isBindingInfoPresent = false;
@ -182,7 +182,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <param name="attributes">A collection of attributes which are used to construct <see cref="BindingInfo"/>.</param> /// <param name="attributes">A collection of attributes which are used to construct <see cref="BindingInfo"/>.</param>
/// <param name="modelMetadata">The <see cref="ModelMetadata"/>.</param> /// <param name="modelMetadata">The <see cref="ModelMetadata"/>.</param>
/// <returns>A new instance of <see cref="BindingInfo"/> if any binding metadata was discovered; otherwise or <see langword="null"/>.</returns> /// <returns>A new instance of <see cref="BindingInfo"/> if any binding metadata was discovered; otherwise or <see langword="null"/>.</returns>
public static BindingInfo GetBindingInfo(IEnumerable<object> attributes, ModelMetadata modelMetadata) public static BindingInfo? GetBindingInfo(IEnumerable<object> attributes, ModelMetadata modelMetadata)
{ {
if (attributes == null) if (attributes == null)
{ {

View File

@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// A metadata object representing a source of data for model binding. /// A metadata object representing a source of data for model binding.
/// </summary> /// </summary>
[DebuggerDisplay("Source: {DisplayName}")] [DebuggerDisplay("Source: {DisplayName}")]
public class BindingSource : IEquatable<BindingSource> public class BindingSource : IEquatable<BindingSource?>
{ {
/// <summary> /// <summary>
/// A <see cref="BindingSource"/> for the request body. /// A <see cref="BindingSource"/> for the request body.
@ -210,13 +210,13 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
/// <inheritdoc /> /// <inheritdoc />
public bool Equals(BindingSource other) public bool Equals(BindingSource? other)
{ {
return string.Equals(other?.Id, Id, StringComparison.Ordinal); return string.Equals(other?.Id, Id, StringComparison.Ordinal);
} }
/// <inheritdoc /> /// <inheritdoc />
public override bool Equals(object obj) public override bool Equals(object? obj)
{ {
return Equals(obj as BindingSource); return Equals(obj as BindingSource);
} }
@ -228,7 +228,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
/// <inheritdoc /> /// <inheritdoc />
public static bool operator ==(BindingSource s1, BindingSource s2) public static bool operator ==(BindingSource? s1, BindingSource? s2)
{ {
if (s1 is null) if (s1 is null)
{ {
@ -239,7 +239,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
/// <inheritdoc /> /// <inheritdoc />
public static bool operator !=(BindingSource s1, BindingSource s2) public static bool operator !=(BindingSource? s1, BindingSource? s2)
{ {
return !(s1 == s2); return !(s1 == s2);
} }

View File

@ -89,7 +89,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <inheritdoc /> /// <inheritdoc />
public override bool CanAcceptDataFrom(BindingSource bindingSource) public override bool CanAcceptDataFrom(BindingSource bindingSource)
{ {
if (bindingSource == null) if (bindingSource is null)
{ {
throw new ArgumentNullException(nameof(bindingSource)); throw new ArgumentNullException(nameof(bindingSource));
} }

View File

@ -15,6 +15,6 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// The <see cref="BindingSource"/> is metadata which can be used to determine which data /// The <see cref="BindingSource"/> is metadata which can be used to determine which data
/// sources are valid for model binding of a property or parameter. /// sources are valid for model binding of a property or parameter.
/// </remarks> /// </remarks>
BindingSource BindingSource { get; } BindingSource? BindingSource { get; }
} }
} }

View File

@ -17,28 +17,28 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// <value> /// <value>
/// Default <see cref="string"/> is "A value for the '{0}' parameter or property was not provided.". /// Default <see cref="string"/> is "A value for the '{0}' parameter or property was not provided.".
/// </value> /// </value>
public virtual Func<string, string> MissingBindRequiredValueAccessor { get; } public virtual Func<string, string> MissingBindRequiredValueAccessor { get; } = default!;
/// <summary> /// <summary>
/// Error message the model binding system adds when either the key or the value of a /// Error message the model binding system adds when either the key or the value of a
/// <see cref="System.Collections.Generic.KeyValuePair{TKey, TValue}"/> is bound but not both. /// <see cref="System.Collections.Generic.KeyValuePair{TKey, TValue}"/> is bound but not both.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "A value is required.".</value> /// <value>Default <see cref="string"/> is "A value is required.".</value>
public virtual Func<string> MissingKeyOrValueAccessor { get; } public virtual Func<string> MissingKeyOrValueAccessor { get; } = default!;
/// <summary> /// <summary>
/// Error message the model binding system adds when no value is provided for the request body, /// Error message the model binding system adds when no value is provided for the request body,
/// but a value is required. /// but a value is required.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "A non-empty request body is required.".</value> /// <value>Default <see cref="string"/> is "A non-empty request body is required.".</value>
public virtual Func<string> MissingRequestBodyRequiredValueAccessor { get; } public virtual Func<string> MissingRequestBodyRequiredValueAccessor { get; } = default!;
/// <summary> /// <summary>
/// Error message the model binding system adds when a <c>null</c> value is bound to a /// Error message the model binding system adds when a <c>null</c> value is bound to a
/// non-<see cref="Nullable"/> property. /// non-<see cref="Nullable"/> property.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "The value '{0}' is invalid.".</value> /// <value>Default <see cref="string"/> is "The value '{0}' is invalid.".</value>
public virtual Func<string, string> ValueMustNotBeNullAccessor { get; } public virtual Func<string, string> ValueMustNotBeNullAccessor { get; } = default!;
/// <summary> /// <summary>
/// Error message the model binding system adds when <see cref="ModelError.Exception"/> is of type /// Error message the model binding system adds when <see cref="ModelError.Exception"/> is of type
@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// with a property. /// with a property.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "The value '{0}' is not valid for {1}.".</value> /// <value>Default <see cref="string"/> is "The value '{0}' is not valid for {1}.".</value>
public virtual Func<string, string, string> AttemptedValueIsInvalidAccessor { get; } public virtual Func<string, string, string> AttemptedValueIsInvalidAccessor { get; } = default!;
/// <summary> /// <summary>
/// Error message the model binding system adds when <see cref="ModelError.Exception"/> is of type /// Error message the model binding system adds when <see cref="ModelError.Exception"/> is of type
@ -54,7 +54,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// with a collection element or action parameter. /// with a collection element or action parameter.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "The value '{0}' is not valid.".</value> /// <value>Default <see cref="string"/> is "The value '{0}' is not valid.".</value>
public virtual Func<string, string> NonPropertyAttemptedValueIsInvalidAccessor { get; } public virtual Func<string, string> NonPropertyAttemptedValueIsInvalidAccessor { get; } = default!;
/// <summary> /// <summary>
/// Error message the model binding system adds when <see cref="ModelError.Exception"/> is of type /// Error message the model binding system adds when <see cref="ModelError.Exception"/> is of type
@ -62,7 +62,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// with a property. /// with a property.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "The supplied value is invalid for {0}.".</value> /// <value>Default <see cref="string"/> is "The supplied value is invalid for {0}.".</value>
public virtual Func<string, string> UnknownValueIsInvalidAccessor { get; } public virtual Func<string, string> UnknownValueIsInvalidAccessor { get; } = default!;
/// <summary> /// <summary>
/// Error message the model binding system adds when <see cref="ModelError.Exception"/> is of type /// Error message the model binding system adds when <see cref="ModelError.Exception"/> is of type
@ -70,21 +70,21 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// with a collection element or action parameter. /// with a collection element or action parameter.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "The supplied value is invalid.".</value> /// <value>Default <see cref="string"/> is "The supplied value is invalid.".</value>
public virtual Func<string> NonPropertyUnknownValueIsInvalidAccessor { get; } public virtual Func<string> NonPropertyUnknownValueIsInvalidAccessor { get; } = default!;
/// <summary> /// <summary>
/// Fallback error message HTML and tag helpers display when a property is invalid but the /// Fallback error message HTML and tag helpers display when a property is invalid but the
/// <see cref="ModelError"/>s have <c>null</c> <see cref="ModelError.ErrorMessage"/>s. /// <see cref="ModelError"/>s have <c>null</c> <see cref="ModelError.ErrorMessage"/>s.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "The value '{0}' is invalid.".</value> /// <value>Default <see cref="string"/> is "The value '{0}' is invalid.".</value>
public virtual Func<string, string> ValueIsInvalidAccessor { get; } public virtual Func<string, string> ValueIsInvalidAccessor { get; } = default!;
/// <summary> /// <summary>
/// Error message HTML and tag helpers add for client-side validation of numeric formats. Visible in the /// Error message HTML and tag helpers add for client-side validation of numeric formats. Visible in the
/// browser if the field for a <c>float</c> (for example) property does not have a correctly-formatted value. /// browser if the field for a <c>float</c> (for example) property does not have a correctly-formatted value.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "The field {0} must be a number.".</value> /// <value>Default <see cref="string"/> is "The field {0} must be a number.".</value>
public virtual Func<string, string> ValueMustBeANumberAccessor { get; } public virtual Func<string, string> ValueMustBeANumberAccessor { get; } = default!;
/// <summary> /// <summary>
/// Error message HTML and tag helpers add for client-side validation of numeric formats. Visible in the /// Error message HTML and tag helpers add for client-side validation of numeric formats. Visible in the
@ -92,6 +92,6 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// correctly-formatted value. /// correctly-formatted value.
/// </summary> /// </summary>
/// <value>Default <see cref="string"/> is "The field must be a number.".</value> /// <value>Default <see cref="string"/> is "The field must be a number.".</value>
public virtual Func<string> NonPropertyValueMustBeANumberAccessor { get; } public virtual Func<string> NonPropertyValueMustBeANumberAccessor { get; } = default!;
} }
} }

View File

@ -4,7 +4,6 @@
using System; using System;
using System.Reflection; using System.Reflection;
using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.Extensions.Internal;
namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
{ {
@ -15,9 +14,9 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
{ {
private ModelMetadataIdentity( private ModelMetadataIdentity(
Type modelType, Type modelType,
string name = null, string? name = null,
Type containerType = null, Type? containerType = null,
object fieldInfo = null) object? fieldInfo = null)
{ {
ModelType = modelType; ModelType = modelType;
Name = name; Name = name;
@ -107,7 +106,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// <param name="parameter">The <see cref="ParameterInfo" />.</param> /// <param name="parameter">The <see cref="ParameterInfo" />.</param>
/// <returns>A <see cref="ModelMetadataIdentity"/>.</returns> /// <returns>A <see cref="ModelMetadataIdentity"/>.</returns>
public static ModelMetadataIdentity ForParameter(ParameterInfo parameter) public static ModelMetadataIdentity ForParameter(ParameterInfo parameter)
=> ForParameter(parameter, parameter?.ParameterType); => ForParameter(parameter, parameter.ParameterType);
/// <summary> /// <summary>
/// Creates a <see cref="ModelMetadataIdentity"/> for the provided parameter with the specified /// Creates a <see cref="ModelMetadataIdentity"/> for the provided parameter with the specified
@ -135,7 +134,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// Gets the <see cref="Type"/> defining the model property represented by the current /// Gets the <see cref="Type"/> defining the model property represented by the current
/// instance, or <c>null</c> if the current instance does not represent a property. /// instance, or <c>null</c> if the current instance does not represent a property.
/// </summary> /// </summary>
public Type ContainerType { get; } public Type? ContainerType { get; }
/// <summary> /// <summary>
/// Gets the <see cref="Type"/> represented by the current instance. /// Gets the <see cref="Type"/> represented by the current instance.
@ -168,21 +167,21 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// Gets the name of the current instance if it represents a parameter or property, or <c>null</c> if /// Gets the name of the current instance if it represents a parameter or property, or <c>null</c> if
/// the current instance represents a type. /// the current instance represents a type.
/// </summary> /// </summary>
public string Name { get; } public string? Name { get; }
private object FieldInfo { get; } private object? FieldInfo { get; }
/// <summary> /// <summary>
/// Gets a descriptor for the parameter, or <c>null</c> if this instance /// Gets a descriptor for the parameter, or <c>null</c> if this instance
/// does not represent a parameter. /// does not represent a parameter.
/// </summary> /// </summary>
public ParameterInfo ParameterInfo => FieldInfo as ParameterInfo; public ParameterInfo? ParameterInfo => FieldInfo as ParameterInfo;
/// <summary> /// <summary>
/// Gets a descriptor for the property, or <c>null</c> if this instance /// Gets a descriptor for the property, or <c>null</c> if this instance
/// does not represent a property. /// does not represent a property.
/// </summary> /// </summary>
public PropertyInfo PropertyInfo => FieldInfo as PropertyInfo; public PropertyInfo? PropertyInfo => FieldInfo as PropertyInfo;
/// <inheritdoc /> /// <inheritdoc />
public bool Equals(ModelMetadataIdentity other) public bool Equals(ModelMetadataIdentity other)
@ -196,7 +195,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
} }
/// <inheritdoc /> /// <inheritdoc />
public override bool Equals(object obj) public override bool Equals(object? obj)
{ {
var other = obj as ModelMetadataIdentity?; var other = obj as ModelMetadataIdentity?;
return other.HasValue && Equals(other.Value); return other.HasValue && Equals(other.Value);
@ -205,13 +204,13 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Metadata
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode()
{ {
var hash = new HashCodeCombiner(); var hash = new HashCode();
hash.Add(ContainerType); hash.Add(ContainerType);
hash.Add(ModelType); hash.Add(ModelType);
hash.Add(Name, StringComparer.Ordinal); hash.Add(Name, StringComparer.Ordinal);
hash.Add(ParameterInfo); hash.Add(ParameterInfo);
hash.Add(PropertyInfo); hash.Add(PropertyInfo);
return hash; return hash.ToHashCode();
} }
} }
} }

View File

@ -48,6 +48,6 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <summary> /// <summary>
/// Gets the <see cref="IServiceProvider"/>. /// Gets the <see cref="IServiceProvider"/>.
/// </summary> /// </summary>
public virtual IServiceProvider Services { get; } public virtual IServiceProvider Services { get; } = default!;
} }
} }

View File

@ -39,7 +39,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <summary> /// <summary>
/// Gets the <see cref="Http.HttpContext"/> associated with this context. /// Gets the <see cref="Http.HttpContext"/> associated with this context.
/// </summary> /// </summary>
public virtual HttpContext HttpContext => ActionContext?.HttpContext; public virtual HttpContext HttpContext => ActionContext?.HttpContext!;
/// <summary> /// <summary>
/// Gets or sets an indication that the current binder is handling the top-level object. /// Gets or sets an indication that the current binder is handling the top-level object.
@ -71,7 +71,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// Gets or sets the name of the top-level model. This is not reset to <see cref="string.Empty"/> when value /// Gets or sets the name of the top-level model. This is not reset to <see cref="string.Empty"/> when value
/// providers have no match for that model. /// providers have no match for that model.
/// </summary> /// </summary>
public string OriginalModelName { get; protected set; } public string OriginalModelName { get; protected set; } = default!;
/// <summary> /// <summary>
/// Gets or sets the <see cref="ModelStateDictionary"/> used to capture <see cref="ModelStateEntry"/> values /// Gets or sets the <see cref="ModelStateDictionary"/> used to capture <see cref="ModelStateEntry"/> values

View File

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.Extensions.Internal;
namespace Microsoft.AspNetCore.Mvc.ModelBinding namespace Microsoft.AspNetCore.Mvc.ModelBinding
{ {
@ -19,7 +18,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
{ {
return new ModelBindingResult(model: null, isModelSet: false); return new ModelBindingResult(model: null, isModelSet: false);
} }
/// <summary> /// <summary>
/// Creates a <see cref="ModelBindingResult"/> representing a successful model binding operation. /// Creates a <see cref="ModelBindingResult"/> representing a successful model binding operation.
/// </summary> /// </summary>
@ -27,10 +26,10 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <returns>A <see cref="ModelBindingResult"/> representing a successful model bind.</returns> /// <returns>A <see cref="ModelBindingResult"/> representing a successful model bind.</returns>
public static ModelBindingResult Success(object model) public static ModelBindingResult Success(object model)
{ {
return new ModelBindingResult( model, isModelSet: true); return new ModelBindingResult(model, isModelSet: true);
} }
private ModelBindingResult(object model, bool isModelSet) private ModelBindingResult(object? model, bool isModelSet)
{ {
Model = model; Model = model;
IsModelSet = isModelSet; IsModelSet = isModelSet;
@ -39,7 +38,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <summary> /// <summary>
/// Gets the model associated with this context. /// Gets the model associated with this context.
/// </summary> /// </summary>
public object Model { get; } public object? Model { get; }
/// <summary> /// <summary>
/// <para> /// <para>
@ -53,7 +52,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public bool IsModelSet { get; } public bool IsModelSet { get; }
/// <inheritdoc /> /// <inheritdoc />
public override bool Equals(object obj) public override bool Equals(object? obj)
{ {
var other = obj as ModelBindingResult?; var other = obj as ModelBindingResult?;
if (other == null) if (other == null)
@ -69,11 +68,11 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode()
{ {
var hashCodeCombiner = HashCodeCombiner.Start(); var hashCodeCombiner = new HashCode();
hashCodeCombiner.Add(IsModelSet); hashCodeCombiner.Add(IsModelSet);
hashCodeCombiner.Add(Model); hashCodeCombiner.Add(Model);
return hashCodeCombiner.CombinedHash; return hashCodeCombiner.ToHashCode();
} }
/// <inheritdoc /> /// <inheritdoc />

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// </summary> /// </summary>
/// <param name="exception">The <see cref="System.Exception"/>.</param> /// <param name="exception">The <see cref="System.Exception"/>.</param>
/// <param name="errorMessage">The error message.</param> /// <param name="errorMessage">The error message.</param>
public ModelError(Exception exception, string errorMessage) public ModelError(Exception exception, string? errorMessage)
: this(errorMessage) : this(errorMessage)
{ {
Exception = exception ?? throw new ArgumentNullException(nameof(exception)); Exception = exception ?? throw new ArgumentNullException(nameof(exception));
@ -35,7 +35,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// Initializes a new instance of <see cref="ModelError"/> with the specified <paramref name="errorMessage"/>. /// Initializes a new instance of <see cref="ModelError"/> with the specified <paramref name="errorMessage"/>.
/// </summary> /// </summary>
/// <param name="errorMessage">The error message.</param> /// <param name="errorMessage">The error message.</param>
public ModelError(string errorMessage) public ModelError(string? errorMessage)
{ {
ErrorMessage = errorMessage ?? string.Empty; ErrorMessage = errorMessage ?? string.Empty;
} }
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <summary> /// <summary>
/// Gets the <see cref="System.Exception"/> associated with this <see cref="ModelError"/> instance. /// Gets the <see cref="System.Exception"/> associated with this <see cref="ModelError"/> instance.
/// </summary> /// </summary>
public Exception Exception { get; } public Exception? Exception { get; }
/// <summary> /// <summary>
/// Gets the error message associated with this <see cref="ModelError"/> instance. /// Gets the error message associated with this <see cref="ModelError"/> instance.

View File

@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// A metadata representation of a model type, property or parameter. /// A metadata representation of a model type, property or parameter.
/// </summary> /// </summary>
[DebuggerDisplay("{DebuggerToString(),nq}")] [DebuggerDisplay("{DebuggerToString(),nq}")]
public abstract class ModelMetadata : IEquatable<ModelMetadata>, IModelMetadataProvider public abstract class ModelMetadata : IEquatable<ModelMetadata?>, IModelMetadataProvider
{ {
/// <summary> /// <summary>
/// The default value of <see cref="ModelMetadata.Order"/>. /// The default value of <see cref="ModelMetadata.Order"/>.
@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <summary> /// <summary>
/// Gets the type containing the property if this metadata is for a property; <see langword="null"/> otherwise. /// Gets the type containing the property if this metadata is for a property; <see langword="null"/> otherwise.
/// </summary> /// </summary>
public Type ContainerType => Identity.ContainerType; public Type? ContainerType => Identity.ContainerType;
/// <summary> /// <summary>
/// Gets the metadata for <see cref="ContainerType"/> if this metadata is for a property; /// Gets the metadata for <see cref="ContainerType"/> if this metadata is for a property;
@ -68,17 +68,17 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// Gets the name of the parameter or property if this metadata is for a parameter or property; /// Gets the name of the parameter or property if this metadata is for a parameter or property;
/// <see langword="null"/> otherwise i.e. if this is the metadata for a type. /// <see langword="null"/> otherwise i.e. if this is the metadata for a type.
/// </summary> /// </summary>
public string Name => Identity.Name; public string? Name => Identity.Name;
/// <summary> /// <summary>
/// Gets the name of the parameter if this metadata is for a parameter; <see langword="null"/> otherwise. /// Gets the name of the parameter if this metadata is for a parameter; <see langword="null"/> otherwise.
/// </summary> /// </summary>
public string ParameterName => MetadataKind == ModelMetadataKind.Parameter ? Identity.Name : null; public string? ParameterName => MetadataKind == ModelMetadataKind.Parameter ? Identity.Name : null;
/// <summary> /// <summary>
/// Gets the name of the property if this metadata is for a property; <see langword="null"/> otherwise. /// Gets the name of the property if this metadata is for a property; <see langword="null"/> otherwise.
/// </summary> /// </summary>
public string PropertyName => MetadataKind == ModelMetadataKind.Property ? Identity.Name : null; public string? PropertyName => MetadataKind == ModelMetadataKind.Property ? Identity.Name : null;
/// <summary> /// <summary>
/// Gets the key for the current instance. /// Gets the key for the current instance.
@ -155,7 +155,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// implements <see cref="IEnumerable"/> but not <see cref="IEnumerable{T}"/>. <c>null</c> otherwise i.e. when /// implements <see cref="IEnumerable"/> but not <see cref="IEnumerable{T}"/>. <c>null</c> otherwise i.e. when
/// <see cref="IsEnumerableType"/> is <c>false</c>. /// <see cref="IsEnumerableType"/> is <c>false</c>.
/// </value> /// </value>
public abstract ModelMetadata ElementMetadata { get; } public abstract ModelMetadata? ElementMetadata { get; }
/// <summary> /// <summary>
/// Gets the ordered and grouped display names and values of all <see cref="Enum"/> values in /// Gets the ordered and grouped display names and values of all <see cref="Enum"/> values in
@ -318,7 +318,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// validated. If <c>null</c>, properties with this <see cref="ModelMetadata"/> are validated. /// validated. If <c>null</c>, properties with this <see cref="ModelMetadata"/> are validated.
/// </summary> /// </summary>
/// <value>Defaults to <c>null</c>.</value> /// <value>Defaults to <c>null</c>.</value>
public virtual IPropertyValidationFilter PropertyValidationFilter => null; public virtual IPropertyValidationFilter? PropertyValidationFilter => null;
/// <summary> /// <summary>
/// Gets a value that indicates whether properties or elements of the model should be validated. /// Gets a value that indicates whether properties or elements of the model should be validated.
@ -343,7 +343,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// Gets the <see cref="Type"/> for elements of <see cref="ModelType"/> if that <see cref="Type"/> /// Gets the <see cref="Type"/> for elements of <see cref="ModelType"/> if that <see cref="Type"/>
/// implements <see cref="IEnumerable"/>. /// implements <see cref="IEnumerable"/>.
/// </summary> /// </summary>
public Type ElementType { get; private set; } public Type? ElementType { get; private set; }
/// <summary> /// <summary>
/// Gets a value indicating whether <see cref="ModelType"/> is a complex type. /// Gets a value indicating whether <see cref="ModelType"/> is a complex type.
@ -389,7 +389,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <remarks> /// <remarks>
/// Identical to <see cref="ModelType"/> unless <see cref="IsNullableValueType"/> is <c>true</c>. /// Identical to <see cref="ModelType"/> unless <see cref="IsNullableValueType"/> is <c>true</c>.
/// </remarks> /// </remarks>
public Type UnderlyingOrModelType { get; private set; } public Type UnderlyingOrModelType { get; private set; } = default!;
/// <summary> /// <summary>
/// Gets a property getter delegate to get the property value from a model object. /// Gets a property getter delegate to get the property value from a model object.
@ -415,7 +415,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
/// <inheritdoc /> /// <inheritdoc />
public bool Equals(ModelMetadata other) public bool Equals(ModelMetadata? other)
{ {
if (object.ReferenceEquals(this, other)) if (object.ReferenceEquals(this, other))
{ {
@ -433,7 +433,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
/// <inheritdoc /> /// <inheritdoc />
public override bool Equals(object obj) public override bool Equals(object? obj)
{ {
return Equals(obj as ModelMetadata); return Equals(obj as ModelMetadata);
} }
@ -469,14 +469,14 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
else if (ModelType.IsArray) else if (ModelType.IsArray)
{ {
IsEnumerableType = true; IsEnumerableType = true;
ElementType = ModelType.GetElementType(); ElementType = ModelType.GetElementType()!;
} }
else else
{ {
IsEnumerableType = true; IsEnumerableType = true;
var enumerableType = ClosedGenericMatcher.ExtractGenericInterface(ModelType, typeof(IEnumerable<>)); var enumerableType = ClosedGenericMatcher.ExtractGenericInterface(ModelType, typeof(IEnumerable<>));
ElementType = enumerableType?.GenericTypeArguments[0]; ElementType = enumerableType?.GenericTypeArguments[0]!;
if (ElementType == null) if (ElementType == null)
{ {
@ -497,7 +497,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
case ModelMetadataKind.Parameter: case ModelMetadataKind.Parameter:
return $"ModelMetadata (Parameter: '{ParameterName}' Type: '{ModelType.Name}')"; return $"ModelMetadata (Parameter: '{ParameterName}' Type: '{ModelType.Name}')";
case ModelMetadataKind.Property: case ModelMetadataKind.Property:
return $"ModelMetadata (Property: '{ContainerType.Name}.{PropertyName}' Type: '{ModelType.Name}')"; return $"ModelMetadata (Property: '{ContainerType!.Name}.{PropertyName}' Type: '{ModelType.Name}')";
case ModelMetadataKind.Type: case ModelMetadataKind.Type:
return $"ModelMetadata (Type: '{ModelType.Name}')"; return $"ModelMetadata (Type: '{ModelType.Name}')";
default: default:

View File

@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// The <see cref="ModelMetadata"/> instance for the property specified by <paramref name="propertyName"/>, or /// The <see cref="ModelMetadata"/> instance for the property specified by <paramref name="propertyName"/>, or
/// <c>null</c> if no match can be found. /// <c>null</c> if no match can be found.
/// </returns> /// </returns>
public ModelMetadata this[string propertyName] public ModelMetadata? this[string propertyName]
{ {
get get
{ {

View File

@ -5,6 +5,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Formatters;
@ -166,7 +167,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
TryGetValue(key, out var entry); TryGetValue(key, out var entry);
return entry; return entry!;
} }
} }
@ -305,15 +306,15 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
else if (entry == null) else if (entry == null)
{ {
errorMessage = messageProvider.UnknownValueIsInvalidAccessor(name); errorMessage = messageProvider.UnknownValueIsInvalidAccessor(name!);
} }
else if (name == null) else if (name == null)
{ {
errorMessage = messageProvider.NonPropertyAttemptedValueIsInvalidAccessor(entry.AttemptedValue); errorMessage = messageProvider.NonPropertyAttemptedValueIsInvalidAccessor(entry.AttemptedValue!);
} }
else else
{ {
errorMessage = messageProvider.AttemptedValueIsInvalidAccessor(entry.AttemptedValue, name); errorMessage = messageProvider.AttemptedValueIsInvalidAccessor(entry.AttemptedValue!, name);
} }
return TryAddModelError(key, errorMessage); return TryAddModelError(key, errorMessage);
@ -511,7 +512,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// <param name="attemptedValue"> /// <param name="attemptedValue">
/// The values of <paramref name="rawValue"/> in a comma-separated <see cref="string"/>. /// The values of <paramref name="rawValue"/> in a comma-separated <see cref="string"/>.
/// </param> /// </param>
public void SetModelValue(string key, object rawValue, string attemptedValue) public void SetModelValue(string key, object? rawValue, string attemptedValue)
{ {
if (key == null) if (key == null)
{ {
@ -540,7 +541,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
// Avoid creating a new array for rawValue if there's only one value. // Avoid creating a new array for rawValue if there's only one value.
object rawValue; object? rawValue;
if (valueProviderResult == ValueProviderResult.None) if (valueProviderResult == ValueProviderResult.None)
{ {
rawValue = null; rawValue = null;
@ -573,10 +574,8 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
} }
private ModelStateNode GetNode(string key) private ModelStateNode? GetNode(string key)
{ {
Debug.Assert(key != null);
var current = _root; var current = _root;
if (key.Length > 0) if (key.Length > 0)
{ {
@ -661,7 +660,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
return new StringSegment(key, keyStart, index - keyStart); return new StringSegment(key, keyStart, index - keyStart);
} }
private static ModelValidationState? GetValidity(ModelStateNode node) private static ModelValidationState? GetValidity(ModelStateNode? node)
{ {
if (node == null) if (node == null)
{ {
@ -774,7 +773,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
/// <inheritdoc /> /// <inheritdoc />
public bool TryGetValue(string key, out ModelStateEntry value) public bool TryGetValue(string key, [NotNullWhen(true)] out ModelStateEntry? value)
{ {
if (key == null) if (key == null)
{ {
@ -893,11 +892,11 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
SubKey = subKey; SubKey = subKey;
} }
public List<ModelStateNode> ChildNodes { get; set; } public List<ModelStateNode>? ChildNodes { get; set; }
public override IReadOnlyList<ModelStateEntry> Children => ChildNodes; public override IReadOnlyList<ModelStateEntry>? Children => ChildNodes;
public string Key { get; set; } public string Key { get; set; } = default!;
public StringSegment SubKey { get; } public StringSegment SubKey { get; }
@ -931,9 +930,9 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public ModelStateNode GetNode(StringSegment subKey) public ModelStateNode? GetNode(StringSegment subKey)
{ {
ModelStateNode modelStateNode = null; ModelStateNode? modelStateNode = null;
if (subKey.Length == 0) if (subKey.Length == 0)
{ {
modelStateNode = this; modelStateNode = this;
@ -981,7 +980,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
return modelStateNode; return modelStateNode;
} }
public override ModelStateEntry GetModelStateForProperty(string propertyName) public override ModelStateEntry? GetModelStateForProperty(string propertyName)
=> GetNode(new StringSegment(propertyName)); => GetNode(new StringSegment(propertyName));
private int BinarySearch(StringSegment searchKey) private int BinarySearch(StringSegment searchKey)
@ -1068,9 +1067,9 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// </summary> /// </summary>
public struct Enumerator : IEnumerator<KeyValuePair<string, ModelStateEntry>> public struct Enumerator : IEnumerator<KeyValuePair<string, ModelStateEntry>>
{ {
private readonly ModelStateNode _rootNode; private readonly ModelStateNode? _rootNode;
private ModelStateNode _modelStateNode; private ModelStateNode _modelStateNode;
private List<ModelStateNode> _nodes; private List<ModelStateNode>? _nodes;
private int _index; private int _index;
private bool _visitedRoot; private bool _visitedRoot;
@ -1093,7 +1092,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
_index = -1; _index = -1;
_rootNode = dictionary.GetNode(prefix); _rootNode = dictionary.GetNode(prefix);
_modelStateNode = null; _modelStateNode = default!;
_nodes = null; _nodes = null;
_visitedRoot = false; _visitedRoot = false;
} }
@ -1141,7 +1140,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
while (_nodes.Count > 0) while (_nodes.Count > 0)
{ {
var node = _nodes[0]; var node = _nodes[0];
if (_index == node.ChildNodes.Count - 1) if (_index == node.ChildNodes!.Count - 1)
{ {
// We've exhausted the current sublist. // We've exhausted the current sublist.
_nodes.RemoveAt(0); _nodes.RemoveAt(0);
@ -1173,9 +1172,9 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public void Reset() public void Reset()
{ {
_index = -1; _index = -1;
_nodes.Clear(); _nodes?.Clear();
_visitedRoot = false; _visitedRoot = false;
_modelStateNode = null; _modelStateNode = default!;
} }
} }
@ -1218,7 +1217,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public KeyEnumerator(ModelStateDictionary dictionary, string prefix) public KeyEnumerator(ModelStateDictionary dictionary, string prefix)
{ {
_prefixEnumerator = new Enumerator(dictionary, prefix); _prefixEnumerator = new Enumerator(dictionary, prefix);
Current = null; Current = default!;
} }
/// <inheritdoc /> /// <inheritdoc />
@ -1240,7 +1239,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
else else
{ {
Current = null; Current = default!;
} }
return result; return result;
@ -1250,7 +1249,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public void Reset() public void Reset()
{ {
_prefixEnumerator.Reset(); _prefixEnumerator.Reset();
Current = null; Current = default!;
} }
} }
@ -1293,7 +1292,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public ValueEnumerator(ModelStateDictionary dictionary, string prefix) public ValueEnumerator(ModelStateDictionary dictionary, string prefix)
{ {
_prefixEnumerator = new Enumerator(dictionary, prefix); _prefixEnumerator = new Enumerator(dictionary, prefix);
Current = null; Current = default!;
} }
/// <inheritdoc /> /// <inheritdoc />
@ -1315,7 +1314,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
} }
else else
{ {
Current = null; Current = default!;
} }
return result; return result;
@ -1325,7 +1324,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public void Reset() public void Reset()
{ {
_prefixEnumerator.Reset(); _prefixEnumerator.Reset();
Current = null; Current = default!;
} }
} }
} }

View File

@ -10,17 +10,17 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// </summary> /// </summary>
public abstract class ModelStateEntry public abstract class ModelStateEntry
{ {
private ModelErrorCollection _errors; private ModelErrorCollection? _errors;
/// <summary> /// <summary>
/// Gets the raw value from the request associated with this entry. /// Gets the raw value from the request associated with this entry.
/// </summary> /// </summary>
public object RawValue { get; set; } public object? RawValue { get; set; }
/// <summary> /// <summary>
/// Gets the set of values contained in <see cref="RawValue"/>, joined into a comma-separated string. /// Gets the set of values contained in <see cref="RawValue"/>, joined into a comma-separated string.
/// </summary> /// </summary>
public string AttemptedValue { get; set; } public string? AttemptedValue { get; set; }
/// <summary> /// <summary>
/// Gets the <see cref="ModelErrorCollection"/> for this entry. /// Gets the <see cref="ModelErrorCollection"/> for this entry.
@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// This method returns any existing entry, even those with <see cref="IsContainerNode"/> with value /// This method returns any existing entry, even those with <see cref="IsContainerNode"/> with value
/// <see langword="true"/>. /// <see langword="true"/>.
/// </remarks> /// </remarks>
public abstract ModelStateEntry GetModelStateForProperty(string propertyName); public abstract ModelStateEntry? GetModelStateForProperty(string propertyName);
/// <summary> /// <summary>
/// Gets the <see cref="ModelStateEntry"/> values for sub-properties. /// Gets the <see cref="ModelStateEntry"/> values for sub-properties.
@ -70,6 +70,6 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// This property returns all existing entries, even those with <see cref="IsContainerNode"/> with value /// This property returns all existing entries, even those with <see cref="IsContainerNode"/> with value
/// <see langword="true"/>. /// <see langword="true"/>.
/// </remarks> /// </remarks>
public abstract IReadOnlyList<ModelStateEntry> Children { get; } public abstract IReadOnlyList<ModelStateEntry>? Children { get; }
} }
} }

View File

@ -30,12 +30,12 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
/// <summary> /// <summary>
/// Gets the metadata associated with the <see cref="Validator"/>. /// Gets the metadata associated with the <see cref="Validator"/>.
/// </summary> /// </summary>
public object ValidatorMetadata { get; } public object ValidatorMetadata { get; } = default!;
/// <summary> /// <summary>
/// Gets or sets the <see cref="IClientModelValidator"/>. /// Gets or sets the <see cref="IClientModelValidator"/>.
/// </summary> /// </summary>
public IClientModelValidator Validator { get; set; } public IClientModelValidator Validator { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets a value indicating whether or not <see cref="Validator"/> can be reused across requests. /// Gets or sets a value indicating whether or not <see cref="Validator"/> can be reused across requests.

View File

@ -10,8 +10,8 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
/// </summary> /// </summary>
public struct ValidationEntry public struct ValidationEntry
{ {
private object _model; private object? _model;
private Func<object> _modelAccessor; private Func<object>? _modelAccessor;
/// <summary> /// <summary>
/// Creates a new <see cref="ValidationEntry"/>. /// Creates a new <see cref="ValidationEntry"/>.
@ -79,7 +79,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
/// <summary> /// <summary>
/// The model object. /// The model object.
/// </summary> /// </summary>
public object Model public object? Model
{ {
get get
{ {

View File

@ -4,7 +4,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis;
namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
{ {
@ -25,8 +25,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
_inner = new Dictionary<object, ValidationStateEntry>(ReferenceEqualityComparer.Instance); _inner = new Dictionary<object, ValidationStateEntry>(ReferenceEqualityComparer.Instance);
} }
/// <inheritdoc /> public ValidationStateEntry? this[object key]
public ValidationStateEntry this[object key]
{ {
get get
{ {
@ -36,10 +35,19 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
set set
{ {
_inner[key] = value; _inner[key] = value!;
} }
} }
/// <inheritdoc />
ValidationStateEntry IDictionary<object, ValidationStateEntry>.this[object key]
{
get => this[key]!;
set => this[key] = value;
}
ValidationStateEntry IReadOnlyDictionary<object, ValidationStateEntry>.this[object key] => this[key]!;
/// <inheritdoc /> /// <inheritdoc />
public int Count => _inner.Count; public int Count => _inner.Count;
@ -115,7 +123,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
} }
/// <inheritdoc /> /// <inheritdoc />
public bool TryGetValue(object key, out ValidationStateEntry value) public bool TryGetValue(object key, [MaybeNullWhen(false)] out ValidationStateEntry value)
{ {
return _inner.TryGetValue(key, out value); return _inner.TryGetValue(key, out value);
} }
@ -125,30 +133,5 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
{ {
return ((IDictionary<object, ValidationStateEntry>)_inner).GetEnumerator(); return ((IDictionary<object, ValidationStateEntry>)_inner).GetEnumerator();
} }
private class ReferenceEqualityComparer : IEqualityComparer<object>
{
private static readonly bool IsMono = Type.GetType("Mono.Runtime") != null;
public static readonly ReferenceEqualityComparer Instance = new ReferenceEqualityComparer();
public new bool Equals(object x, object y)
{
return Object.ReferenceEquals(x, y);
}
public int GetHashCode(object obj)
{
// RuntimeHelpers.GetHashCode sometimes crashes the runtime on Mono 4.0.4
// See: https://github.com/aspnet/External/issues/45
// The workaround here is to just not hash anything, and fall back to an equality check.
if (IsMono)
{
return 0;
}
return RuntimeHelpers.GetHashCode(obj);
}
}
} }
} }

View File

@ -12,12 +12,12 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
/// <summary> /// <summary>
/// Gets or sets the model prefix associated with the entry. /// Gets or sets the model prefix associated with the entry.
/// </summary> /// </summary>
public string Key { get; set; } public string Key { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets the <see cref="ModelMetadata"/> associated with the entry. /// Gets or sets the <see cref="ModelMetadata"/> associated with the entry.
/// </summary> /// </summary>
public ModelMetadata Metadata { get; set; } public ModelMetadata Metadata { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets a value indicating whether the associated model object should be validated. /// Gets or sets a value indicating whether the associated model object should be validated.
@ -28,6 +28,6 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
/// Gets or sets an <see cref="IValidationStrategy"/> for enumerating child entries of the associated /// Gets or sets an <see cref="IValidationStrategy"/> for enumerating child entries of the associated
/// model object. /// model object.
/// </summary> /// </summary>
public IValidationStrategy Strategy { get; set; } public IValidationStrategy Strategy { get; set; } = default!;
} }
} }

View File

@ -30,12 +30,12 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation
/// <summary> /// <summary>
/// Gets the metadata associated with the <see cref="Validator"/>. /// Gets the metadata associated with the <see cref="Validator"/>.
/// </summary> /// </summary>
public object ValidatorMetadata { get; } public object ValidatorMetadata { get; } = default!;
/// <summary> /// <summary>
/// Gets or sets the <see cref="IModelValidator"/>. /// Gets or sets the <see cref="IModelValidator"/>.
/// </summary> /// </summary>
public IModelValidator Validator { get; set; } public IModelValidator Validator { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets a value indicating whether or not <see cref="Validator"/> can be reused across requests. /// Gets or sets a value indicating whether or not <see cref="Validator"/> can be reused across requests.

View File

@ -69,7 +69,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
/// to get a single value for processing regardless of whether a single or multiple values were provided /// to get a single value for processing regardless of whether a single or multiple values were provided
/// in the request. /// in the request.
/// </summary> /// </summary>
public string FirstValue public string? FirstValue
{ {
get get
{ {
@ -87,7 +87,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public int Length => Values.Count; public int Length => Values.Count;
/// <inheritdoc /> /// <inheritdoc />
public override bool Equals(object obj) public override bool Equals(object? obj)
{ {
var other = obj as ValueProviderResult?; var other = obj as ValueProviderResult?;
return other.HasValue && Equals(other.Value); return other.HasValue && Equals(other.Value);

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// <summary> /// <summary>
/// The route template. May be null if the action has no attribute routes. /// The route template. May be null if the action has no attribute routes.
/// </summary> /// </summary>
public string Template { get; set; } public string? Template { get; set; }
/// <summary> /// <summary>
/// Gets the order of the route associated with a given action. This property determines /// Gets the order of the route associated with a given action. This property determines
@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// to generate a link by referring to the route by name instead of attempting to match a /// to generate a link by referring to the route by name instead of attempting to match a
/// route by provided route data. /// route by provided route data.
/// </summary> /// </summary>
public string Name { get; set; } public string Name { get; set; } = default!;
/// <summary> /// <summary>
/// Gets or sets a value that determines if the route entry associated with this model participates in link generation. /// Gets or sets a value that determines if the route entry associated with this model participates in link generation.

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// <summary> /// <summary>
/// The name of the action method that <see cref="IUrlHelper.Action(UrlActionContext)"/> uses to generate URLs. /// The name of the action method that <see cref="IUrlHelper.Action(UrlActionContext)"/> uses to generate URLs.
/// </summary> /// </summary>
public string Action public string? Action
{ {
get; get;
set; set;
@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// <summary> /// <summary>
/// The name of the controller that <see cref="IUrlHelper.Action(UrlActionContext)"/> uses to generate URLs. /// The name of the controller that <see cref="IUrlHelper.Action(UrlActionContext)"/> uses to generate URLs.
/// </summary> /// </summary>
public string Controller public string? Controller
{ {
get; get;
set; set;
@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// The object that contains the route values that <see cref="IUrlHelper.Action(UrlActionContext)"/> /// The object that contains the route values that <see cref="IUrlHelper.Action(UrlActionContext)"/>
/// uses to generate URLs. /// uses to generate URLs.
/// </summary> /// </summary>
public object Values public object? Values
{ {
get; get;
set; set;
@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// The protocol for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates, /// The protocol for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates,
/// such as "http" or "https" /// such as "http" or "https"
/// </summary> /// </summary>
public string Protocol public string? Protocol
{ {
get; get;
set; set;
@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// <summary> /// <summary>
/// The host name for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates. /// The host name for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates.
/// </summary> /// </summary>
public string Host public string? Host
{ {
get; get;
set; set;
@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// <summary> /// <summary>
/// The fragment for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates. /// The fragment for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates.
/// </summary> /// </summary>
public string Fragment public string? Fragment
{ {
get; get;
set; set;

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// <summary> /// <summary>
/// The name of the route that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> uses to generate URLs. /// The name of the route that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> uses to generate URLs.
/// </summary> /// </summary>
public string RouteName public string? RouteName
{ {
get; get;
set; set;
@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// The object that contains the route values that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> /// The object that contains the route values that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/>
/// uses to generate URLs. /// uses to generate URLs.
/// </summary> /// </summary>
public object Values public object? Values
{ {
get; get;
set; set;
@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// The protocol for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates, /// The protocol for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates,
/// such as "http" or "https" /// such as "http" or "https"
/// </summary> /// </summary>
public string Protocol public string? Protocol
{ {
get; get;
set; set;
@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// <summary> /// <summary>
/// The host name for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates. /// The host name for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates.
/// </summary> /// </summary>
public string Host public string? Host
{ {
get; get;
set; set;
@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing
/// <summary> /// <summary>
/// The fragment for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates. /// The fragment for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates.
/// </summary> /// </summary>
public string Fragment public string? Fragment
{ {
get; get;
set; set;

View File

@ -662,11 +662,11 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer
public int GetHashCode(PropertyKey obj) public int GetHashCode(PropertyKey obj)
{ {
var hashCodeCombiner = HashCodeCombiner.Start(); var hashCodeCombiner = new HashCode();
hashCodeCombiner.Add(obj.ContainerType); hashCodeCombiner.Add(obj.ContainerType);
hashCodeCombiner.Add(obj.PropertyName); hashCodeCombiner.Add(obj.PropertyName);
hashCodeCombiner.Add(obj.Source); hashCodeCombiner.Add(obj.Source);
return hashCodeCombiner.CombinedHash; return hashCodeCombiner.ToHashCode();
} }
} }
} }

View File

@ -319,10 +319,10 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
public override int GetHashCode() public override int GetHashCode()
{ {
var hash = new HashCodeCombiner(); var hash = new HashCode();
hash.Add(_metadata); hash.Add(_metadata);
hash.Add(RuntimeHelpers.GetHashCode(_token)); hash.Add(RuntimeHelpers.GetHashCode(_token));
return hash; return hash.ToHashCode();
} }
public override string ToString() public override string ToString()

View File

@ -291,10 +291,10 @@ namespace Microsoft.AspNetCore.Mvc.Routing
return 0; return 0;
} }
var hash = new HashCodeCombiner(); var hash = new HashCode();
hash.Add(obj.Order); hash.Add(obj.Order);
hash.Add(obj.RouteTemplate.TemplateText, StringComparer.OrdinalIgnoreCase); hash.Add(obj.RouteTemplate.TemplateText, StringComparer.OrdinalIgnoreCase);
return hash; return hash.ToHashCode();
} }
} }

View File

@ -123,14 +123,14 @@ namespace Microsoft.AspNetCore.Mvc.Razor
public override int GetHashCode() public override int GetHashCode()
{ {
var hashCodeCombiner = HashCodeCombiner.Start(); var hashCodeCombiner = new HashCode();
hashCodeCombiner.Add(PageType); hashCodeCombiner.Add(PageType);
if (ProvidedModelType != null) if (ProvidedModelType != null)
{ {
hashCodeCombiner.Add(ProvidedModelType); hashCodeCombiner.Add(ProvidedModelType);
} }
return hashCodeCombiner.CombinedHash; return hashCodeCombiner.ToHashCode();
} }
} }
} }

View File

@ -135,7 +135,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode()
{ {
var hashCodeCombiner = HashCodeCombiner.Start(); var hashCodeCombiner = new HashCode();
hashCodeCombiner.Add(IsMainPage ? 1 : 0); hashCodeCombiner.Add(IsMainPage ? 1 : 0);
hashCodeCombiner.Add(ViewName, StringComparer.Ordinal); hashCodeCombiner.Add(ViewName, StringComparer.Ordinal);
hashCodeCombiner.Add(ControllerName, StringComparer.Ordinal); hashCodeCombiner.Add(ControllerName, StringComparer.Ordinal);
@ -151,7 +151,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
} }
} }
return hashCodeCombiner; return hashCodeCombiner.ToHashCode();
} }
} }
} }

View File

@ -247,7 +247,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Cache
return _hashcode.Value; return _hashcode.Value;
} }
var hashCodeCombiner = new HashCodeCombiner(); var hashCodeCombiner = new HashCode();
hashCodeCombiner.Add(Key, StringComparer.Ordinal); hashCodeCombiner.Add(Key, StringComparer.Ordinal);
hashCodeCombiner.Add(_expiresAfter); hashCodeCombiner.Add(_expiresAfter);
@ -258,12 +258,12 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Cache
hashCodeCombiner.Add(_requestCulture); hashCodeCombiner.Add(_requestCulture);
hashCodeCombiner.Add(_requestUICulture); hashCodeCombiner.Add(_requestUICulture);
CombineCollectionHashCode(hashCodeCombiner, VaryByCookieName, _cookies); CombineCollectionHashCode(ref hashCodeCombiner, VaryByCookieName, _cookies);
CombineCollectionHashCode(hashCodeCombiner, VaryByHeaderName, _headers); CombineCollectionHashCode(ref hashCodeCombiner, VaryByHeaderName, _headers);
CombineCollectionHashCode(hashCodeCombiner, VaryByQueryName, _queries); CombineCollectionHashCode(ref hashCodeCombiner, VaryByQueryName, _queries);
CombineCollectionHashCode(hashCodeCombiner, VaryByRouteName, _routeValues); CombineCollectionHashCode(ref hashCodeCombiner, VaryByRouteName, _routeValues);
_hashcode = hashCodeCombiner.CombinedHash; _hashcode = hashCodeCombiner.ToHashCode();
return _hashcode.Value; return _hashcode.Value;
} }
@ -331,7 +331,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Cache
} }
private static void CombineCollectionHashCode( private static void CombineCollectionHashCode(
HashCodeCombiner hashCodeCombiner, ref HashCode hashCodeCombiner,
string collectionName, string collectionName,
IList<KeyValuePair<string, string>> values) IList<KeyValuePair<string, string>> values)
{ {

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Policy;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.FileProviders;
@ -373,11 +374,11 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
public override int GetHashCode() public override int GetHashCode()
{ {
var hashCodeCombiner = HashCodeCombiner.Start(); var hashCodeCombiner = new HashCode();
hashCodeCombiner.Add(Include); hashCodeCombiner.Add(Include);
hashCodeCombiner.Add(Exclude); hashCodeCombiner.Add(Exclude);
return hashCodeCombiner.CombinedHash; return hashCodeCombiner.ToHashCode();
} }
} }
} }

View File

@ -887,7 +887,6 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
} }
[Fact] [Fact]
[QuarantinedTest]
public async Task ProcessAsync_AwaitersUseTheResultOfExecutor() public async Task ProcessAsync_AwaitersUseTheResultOfExecutor()
{ {
// Arrange // Arrange

View File

@ -652,6 +652,7 @@ namespace Microsoft.AspNetCore.Mvc.Rendering
[System.Diagnostics.DebuggerDisplayAttribute("{DebuggerToString()}")] [System.Diagnostics.DebuggerDisplayAttribute("{DebuggerToString()}")]
public partial class TagBuilder : Microsoft.AspNetCore.Html.IHtmlContent public partial class TagBuilder : Microsoft.AspNetCore.Html.IHtmlContent
{ {
public TagBuilder(Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder) { }
public TagBuilder(string tagName) { } public TagBuilder(string tagName) { }
public Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary Attributes { get { throw null; } } public Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary Attributes { get { throw null; } }
public bool HasInnerHtml { get { throw null; } } public bool HasInnerHtml { get { throw null; } }

View File

@ -84,7 +84,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
public int GetHashCode(LambdaExpression lambdaExpression) public int GetHashCode(LambdaExpression lambdaExpression)
{ {
var expression = lambdaExpression.Body; var expression = lambdaExpression.Body;
var hashCodeCombiner = HashCodeCombiner.Start(); var hashCodeCombiner = new HashCode();
while (true) while (true)
{ {
@ -107,7 +107,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
} }
} }
return hashCodeCombiner.CombinedHash; return hashCodeCombiner.ToHashCode();
} }
} }
} }

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. // 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.Collections.Generic;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
@ -39,7 +40,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
public int GetHashCode(MemberExpressionCacheKey obj) public int GetHashCode(MemberExpressionCacheKey obj)
{ {
var hashCodeCombiner = new HashCodeCombiner(); var hashCodeCombiner = new HashCode();
hashCodeCombiner.Add(obj.ModelType); hashCodeCombiner.Add(obj.ModelType);
foreach (var member in obj) foreach (var member in obj)
@ -47,7 +48,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
hashCodeCombiner.Add(member); hashCodeCombiner.Add(member);
} }
return hashCodeCombiner.CombinedHash; return hashCodeCombiner.ToHashCode();
} }
} }
} }

View File

@ -37,6 +37,34 @@ namespace Microsoft.AspNetCore.Mvc.Rendering
TagName = tagName; TagName = tagName;
} }
/// <summary>
/// Creates a copy of the HTML tag passed as <paramref name="tagBuilder"/>.
/// </summary>
/// <param name="tagBuilder">Tag to copy.</param>
public TagBuilder(TagBuilder tagBuilder)
{
if (tagBuilder == null)
{
throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(tagBuilder));
}
if (tagBuilder._attributes != null)
{
foreach (var tag in tagBuilder._attributes)
{
Attributes.Add(tag);
}
}
if (tagBuilder._innerHtml != null)
{
tagBuilder.InnerHtml.CopyTo(InnerHtml);
}
TagName = tagBuilder.TagName;
TagRenderMode = tagBuilder.TagRenderMode;
}
/// <summary> /// <summary>
/// Gets the set of attributes that will be written to the tag. /// Gets the set of attributes that will be written to the tag.
/// </summary> /// </summary>

View File

@ -253,5 +253,64 @@ namespace Microsoft.AspNetCore.Mvc.Core.Rendering
// Assert // Assert
Assert.Equal("<span>Hello</span>", HtmlContentUtilities.HtmlContentToString(tag)); Assert.Equal("<span>Hello</span>", HtmlContentUtilities.HtmlContentToString(tag));
} }
[Fact]
public void Constructor_Copy_CopiesTagRenderMode()
{
// Arrange
var originalTagBuilder = new TagBuilder("p");
originalTagBuilder.TagRenderMode = TagRenderMode.SelfClosing;
// Act
var clonedTagBuilder = new TagBuilder(originalTagBuilder);
// Assert
Assert.Equal(originalTagBuilder.TagRenderMode, clonedTagBuilder.TagRenderMode);
}
[Fact]
public void Constructor_Copy_DoesShallowCopyOfInnerHtml()
{
// Arrange
var originalTagBuilder = new TagBuilder("p");
originalTagBuilder.InnerHtml.AppendHtml("<span>Hello</span>");
// Act
var clonedTagBuilder = new TagBuilder(originalTagBuilder);
// Assert
Assert.NotEqual(originalTagBuilder.InnerHtml, clonedTagBuilder.InnerHtml);
Assert.Equal(HtmlContentUtilities.HtmlContentToString(originalTagBuilder.RenderBody()), HtmlContentUtilities.HtmlContentToString(clonedTagBuilder.RenderBody()));
}
[Fact]
public void Constructor_Copy_DoesShallowCopyOfAttributes()
{
// Arrange
var originalTagBuilder = new TagBuilder("p");
originalTagBuilder.AddCssClass("class1");
// Act
var clonedTagBuilder = new TagBuilder(originalTagBuilder);
// Assert
Assert.NotSame(originalTagBuilder.Attributes, clonedTagBuilder.Attributes);
Assert.Equal(originalTagBuilder.Attributes, clonedTagBuilder.Attributes);
}
[Fact]
public void Constructor_Copy_CopiesTagName()
{
// Arrange
var originalTagBuilder = new TagBuilder("p");
// Act
var clonedTagBuilder = new TagBuilder(originalTagBuilder);
// Assert
Assert.Equal(originalTagBuilder.TagName, clonedTagBuilder.TagName);
}
} }
} }

View File

@ -34,7 +34,6 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
.WithAllHostingModels(); .WithAllHostingModels();
[ConditionalTheory] [ConditionalTheory]
[QuarantinedTest]
[MemberData(nameof(TestVariants))] [MemberData(nameof(TestVariants))]
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
public Task HttpsNoClientCert_NoClientCert(TestVariant variant) public Task HttpsNoClientCert_NoClientCert(TestVariant variant)

View File

@ -268,7 +268,7 @@
<value>Overriding endpoints defined in UseKestrel() because {settingName} is set to true. Binding to address(es) '{addresses}' instead.</value> <value>Overriding endpoints defined in UseKestrel() because {settingName} is set to true. Binding to address(es) '{addresses}' instead.</value>
</data> </data>
<data name="UnsupportedAddressScheme" xml:space="preserve"> <data name="UnsupportedAddressScheme" xml:space="preserve">
<value>Unrecognized scheme in server address '{address}'. Only 'http://' is supported.</value> <value>Unrecognized scheme in server address '{address}'. Only 'http://' and 'https://' are supported.</value>
</data> </data>
<data name="HeadersAreReadOnly" xml:space="preserve"> <data name="HeadersAreReadOnly" xml:space="preserve">
<value>Headers are read-only, response has already started.</value> <value>Headers are read-only, response has already started.</value>

View File

@ -83,7 +83,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2
case 404: case 404:
case 500: case 500:
// Status codes which exist in the HTTP/2 StaticTable. // Status codes which exist in the HTTP/2 StaticTable.
return HPackEncoder.EncodeIndexedHeaderField(H2StaticTable.StatusIndex[statusCode], buffer, out length); return HPackEncoder.EncodeIndexedHeaderField(H2StaticTable.GetStatusIndex(statusCode), buffer, out length);
default: default:
const string name = ":status"; const string name = ":status";
var value = StatusCodes.ToStatusString(statusCode); var value = StatusCodes.ToStatusString(statusCode);

View File

@ -0,0 +1,135 @@
// 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.Linq;
using System.Net.Http.HPack;
using System.Text;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
{
public class HPackDecoderBenchmark
{
// Indexed Header Field Representation - Dynamic Table - Index 62 (first index in dynamic table)
private static readonly byte[] _indexedHeaderDynamic = new byte[] { 0xbe };
private static readonly byte[] _literalHeaderFieldWithoutIndexingNewName = new byte[] { 0x00 };
private const string _headerNameString = "new-header";
private static readonly byte[] _headerNameBytes = Encoding.ASCII.GetBytes(_headerNameString);
private static readonly byte[] _headerName = new byte[] { (byte)_headerNameBytes.Length }
.Concat(_headerNameBytes)
.ToArray();
private const string _headerValueString = "value";
private static readonly byte[] _headerValueBytes = Encoding.ASCII.GetBytes(_headerValueString);
private static readonly byte[] _headerValue = new byte[] { (byte)_headerValueBytes.Length }
.Concat(_headerValueBytes)
.ToArray();
private static readonly byte[] _literalHeaderFieldNeverIndexed_NewName = _literalHeaderFieldWithoutIndexingNewName
.Concat(_headerName)
.Concat(_headerValue)
.ToArray();
private static readonly byte[] _literalHeaderFieldNeverIndexed_NewName_Large;
private static readonly byte[] _literalHeaderFieldNeverIndexed_NewName_Multiple;
private static readonly byte[] _indexedHeaderDynamic_Multiple;
static HPackDecoderBenchmark()
{
string string8193 = new string('a', 8193);
_literalHeaderFieldNeverIndexed_NewName_Large = _literalHeaderFieldWithoutIndexingNewName
.Concat(new byte[] { 0x7f, 0x82, 0x3f }) // 8193 encoded with 7-bit prefix, no Huffman encoding
.Concat(Encoding.ASCII.GetBytes(string8193))
.Concat(new byte[] { 0x7f, 0x82, 0x3f }) // 8193 encoded with 7-bit prefix, no Huffman encoding
.Concat(Encoding.ASCII.GetBytes(string8193))
.ToArray();
_literalHeaderFieldNeverIndexed_NewName_Multiple = _literalHeaderFieldNeverIndexed_NewName
.Concat(_literalHeaderFieldNeverIndexed_NewName)
.Concat(_literalHeaderFieldNeverIndexed_NewName)
.Concat(_literalHeaderFieldNeverIndexed_NewName)
.Concat(_literalHeaderFieldNeverIndexed_NewName)
.ToArray();
_indexedHeaderDynamic_Multiple = _indexedHeaderDynamic
.Concat(_indexedHeaderDynamic)
.Concat(_indexedHeaderDynamic)
.Concat(_indexedHeaderDynamic)
.Concat(_indexedHeaderDynamic)
.ToArray();
}
private HPackDecoder _decoder;
private TestHeadersHandler _testHeadersHandler;
private DynamicTable _dynamicTable;
[GlobalSetup]
public void GlobalSetup()
{
_dynamicTable = new DynamicTable(maxSize: 4096);
_dynamicTable.Insert(_headerNameBytes, _headerValueBytes);
_decoder = new HPackDecoder(maxDynamicTableSize: 4096, maxHeadersLength: 65536, _dynamicTable);
_testHeadersHandler = new TestHeadersHandler();
}
[Benchmark]
public void DecodesLiteralHeaderFieldNeverIndexed_NewName()
{
_decoder.Decode(_literalHeaderFieldNeverIndexed_NewName, endHeaders: true, handler: _testHeadersHandler);
}
[Benchmark]
public void DecodesLiteralHeaderFieldNeverIndexed_NewName_Large()
{
_decoder.Decode(_literalHeaderFieldNeverIndexed_NewName_Large, endHeaders: true, handler: _testHeadersHandler);
}
[Benchmark]
public void DecodesLiteralHeaderFieldNeverIndexed_NewName_Multiple()
{
_decoder.Decode(_literalHeaderFieldNeverIndexed_NewName_Multiple, endHeaders: true, handler: _testHeadersHandler);
}
[Benchmark]
public void DecodesIndexedHeaderField_DynamicTable()
{
_decoder.Decode(_indexedHeaderDynamic, endHeaders: true, handler: _testHeadersHandler);
}
[Benchmark]
public void DecodesIndexedHeaderField_DynamicTable_Multiple()
{
_decoder.Decode(_indexedHeaderDynamic_Multiple, endHeaders: true, handler: _testHeadersHandler);
}
private class TestHeadersHandler : IHttpHeadersHandler
{
public void OnHeader(ReadOnlySpan<byte> name, ReadOnlySpan<byte> value)
{
}
public void OnHeadersComplete(bool endStream)
{
}
public void OnStaticIndexedHeader(int index)
{
}
public void OnStaticIndexedHeader(int index, ReadOnlySpan<byte> value)
{
}
}
}
}

View File

@ -300,7 +300,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
} }
[Fact] [Fact]
[QuarantinedTest]
public async Task StreamPool_MultipleStreamsInSequence_PooledStreamReused() public async Task StreamPool_MultipleStreamsInSequence_PooledStreamReused()
{ {
TaskCompletionSource appDelegateTcs = null; TaskCompletionSource appDelegateTcs = null;
@ -365,7 +364,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
} }
[Fact] [Fact]
[QuarantinedTest]
public async Task StreamPool_StreamIsInvalidState_DontReturnedToPool() public async Task StreamPool_StreamIsInvalidState_DontReturnedToPool()
{ {
var serverTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var serverTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
@ -4010,7 +4008,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
[Theory] [Theory]
[InlineData(true)] [InlineData(true)]
[InlineData(false)] [InlineData(false)]
[QuarantinedTest]
public async Task CONTINUATION_Received_WithTrailers_Available(bool sendData) public async Task CONTINUATION_Received_WithTrailers_Available(bool sendData)
{ {
await InitializeConnectionAsync(_readTrailersApplication); await InitializeConnectionAsync(_readTrailersApplication);

View File

@ -371,7 +371,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
} }
[Fact] [Fact]
[QuarantinedTest]
public async Task DATA_Sent_TooSlowlyDueToFlowControlOnSmallWrite_AbortsConnectionAfterGracePeriod() public async Task DATA_Sent_TooSlowlyDueToFlowControlOnSmallWrite_AbortsConnectionAfterGracePeriod()
{ {
var mockSystemClock = _serviceContext.MockSystemClock; var mockSystemClock = _serviceContext.MockSystemClock;
@ -426,7 +425,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
} }
[Fact] [Fact]
[QuarantinedTest]
public async Task DATA_Sent_TooSlowlyDueToOutputFlowControlOnLargeWrite_AbortsConnectionAfterRateTimeout() public async Task DATA_Sent_TooSlowlyDueToOutputFlowControlOnLargeWrite_AbortsConnectionAfterRateTimeout()
{ {
var mockSystemClock = _serviceContext.MockSystemClock; var mockSystemClock = _serviceContext.MockSystemClock;

View File

@ -220,7 +220,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests
[Fact] [Fact]
[Repeat(20)] [Repeat(20)]
[QuarantinedTest]
public async Task DoesNotThrowObjectDisposedExceptionFromWriteAsyncAfterConnectionIsAborted() public async Task DoesNotThrowObjectDisposedExceptionFromWriteAsyncAfterConnectionIsAborted()
{ {
var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);

View File

@ -23,7 +23,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests
[InlineData(5, 0)] [InlineData(5, 0)]
[InlineData(5, 1)] [InlineData(5, 1)]
[InlineData(5, 1337)] [InlineData(5, 1337)]
[QuarantinedTest]
public async Task ServerAcceptsRequestWithHeaderTotalSizeWithinLimit(int headerCount, int extraLimit) public async Task ServerAcceptsRequestWithHeaderTotalSizeWithinLimit(int headerCount, int extraLimit)
{ {
var headers = MakeHeaders(headerCount); var headers = MakeHeaders(headerCount);

View File

@ -559,7 +559,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests
} }
[Fact] [Fact]
[QuarantinedTest]
public async Task TraceIdentifierIsUnique() public async Task TraceIdentifierIsUnique()
{ {
const int identifierLength = 22; const int identifierLength = 22;

View File

@ -1,8 +1,9 @@
// 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#nullable enable
using System; using System;
using System.Linq;
using System.Reflection; using System.Reflection;
namespace Microsoft.Extensions.Internal namespace Microsoft.Extensions.Internal
@ -28,7 +29,7 @@ namespace Microsoft.Extensions.Internal
/// <c>typeof(KeyValuePair{,})</c>, and <paramref name="queryType"/> is /// <c>typeof(KeyValuePair{,})</c>, and <paramref name="queryType"/> is
/// <c>typeof(KeyValuePair{string, object})</c>. /// <c>typeof(KeyValuePair{string, object})</c>.
/// </remarks> /// </remarks>
public static Type ExtractGenericInterface(Type queryType, Type interfaceType) public static Type? ExtractGenericInterface(Type queryType, Type interfaceType)
{ {
if (queryType == null) if (queryType == null)
{ {
@ -62,9 +63,9 @@ namespace Microsoft.Extensions.Internal
candidate.GetGenericTypeDefinition() == interfaceType; candidate.GetGenericTypeDefinition() == interfaceType;
} }
private static Type GetGenericInstantiation(Type queryType, Type interfaceType) private static Type? GetGenericInstantiation(Type queryType, Type interfaceType)
{ {
Type bestMatch = null; Type? bestMatch = null;
var interfaces = queryType.GetInterfaces(); var interfaces = queryType.GetInterfaces();
foreach (var @interface in interfaces) foreach (var @interface in interfaces)
{ {
@ -103,4 +104,4 @@ namespace Microsoft.Extensions.Internal
} }
} }
} }
} }

View File

@ -25,7 +25,7 @@ namespace System.Net.Http.HPack
public int MaxSize => _maxSize; public int MaxSize => _maxSize;
public HeaderField this[int index] public ref readonly HeaderField this[int index]
{ {
get get
{ {
@ -42,7 +42,7 @@ namespace System.Net.Http.HPack
index += _buffer.Length; index += _buffer.Length;
} }
return _buffer[index]; return ref _buffer[index];
} }
} }

View File

@ -9,23 +9,22 @@ namespace System.Net.Http.HPack
{ {
internal static class H2StaticTable internal static class H2StaticTable
{ {
// Index of status code into s_staticDecoderTable
private static readonly Dictionary<int, int> s_statusIndex = new Dictionary<int, int>
{
[200] = 8,
[204] = 9,
[206] = 10,
[304] = 11,
[400] = 12,
[404] = 13,
[500] = 14,
};
public static int Count => s_staticDecoderTable.Length; public static int Count => s_staticDecoderTable.Length;
public static HeaderField Get(int index) => s_staticDecoderTable[index]; public static ref readonly HeaderField Get(int index) => ref s_staticDecoderTable[index];
public static IReadOnlyDictionary<int, int> StatusIndex => s_statusIndex; public static int GetStatusIndex(int status) =>
status switch
{
200 => 8,
204 => 9,
206 => 10,
304 => 11,
400 => 12,
404 => 13,
500 => 14,
_ => throw new ArgumentOutOfRangeException()
};
private static readonly HeaderField[] s_staticDecoderTable = new HeaderField[] private static readonly HeaderField[] s_staticDecoderTable = new HeaderField[]
{ {

View File

@ -5,6 +5,7 @@
#nullable enable #nullable enable
using System.Buffers; using System.Buffers;
using System.Diagnostics; using System.Diagnostics;
using System.Numerics;
#if KESTREL #if KESTREL
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
#endif #endif
@ -37,7 +38,6 @@ namespace System.Net.Http.HPack
// | 1 | Index (7+) | // | 1 | Index (7+) |
// +---+---------------------------+ // +---+---------------------------+
private const byte IndexedHeaderFieldMask = 0x80; private const byte IndexedHeaderFieldMask = 0x80;
private const byte IndexedHeaderFieldRepresentation = 0x80;
// http://httpwg.org/specs/rfc7541.html#rfc.section.6.2.1 // http://httpwg.org/specs/rfc7541.html#rfc.section.6.2.1
// 0 1 2 3 4 5 6 7 // 0 1 2 3 4 5 6 7
@ -45,7 +45,6 @@ namespace System.Net.Http.HPack
// | 0 | 1 | Index (6+) | // | 0 | 1 | Index (6+) |
// +---+---+-----------------------+ // +---+---+-----------------------+
private const byte LiteralHeaderFieldWithIncrementalIndexingMask = 0xc0; private const byte LiteralHeaderFieldWithIncrementalIndexingMask = 0xc0;
private const byte LiteralHeaderFieldWithIncrementalIndexingRepresentation = 0x40;
// http://httpwg.org/specs/rfc7541.html#rfc.section.6.2.2 // http://httpwg.org/specs/rfc7541.html#rfc.section.6.2.2
// 0 1 2 3 4 5 6 7 // 0 1 2 3 4 5 6 7
@ -53,7 +52,6 @@ namespace System.Net.Http.HPack
// | 0 | 0 | 0 | 0 | Index (4+) | // | 0 | 0 | 0 | 0 | Index (4+) |
// +---+---+-----------------------+ // +---+---+-----------------------+
private const byte LiteralHeaderFieldWithoutIndexingMask = 0xf0; private const byte LiteralHeaderFieldWithoutIndexingMask = 0xf0;
private const byte LiteralHeaderFieldWithoutIndexingRepresentation = 0x00;
// http://httpwg.org/specs/rfc7541.html#rfc.section.6.2.3 // http://httpwg.org/specs/rfc7541.html#rfc.section.6.2.3
// 0 1 2 3 4 5 6 7 // 0 1 2 3 4 5 6 7
@ -61,7 +59,6 @@ namespace System.Net.Http.HPack
// | 0 | 0 | 0 | 1 | Index (4+) | // | 0 | 0 | 0 | 1 | Index (4+) |
// +---+---+-----------------------+ // +---+---+-----------------------+
private const byte LiteralHeaderFieldNeverIndexedMask = 0xf0; private const byte LiteralHeaderFieldNeverIndexedMask = 0xf0;
private const byte LiteralHeaderFieldNeverIndexedRepresentation = 0x10;
// http://httpwg.org/specs/rfc7541.html#rfc.section.6.3 // http://httpwg.org/specs/rfc7541.html#rfc.section.6.3
// 0 1 2 3 4 5 6 7 // 0 1 2 3 4 5 6 7
@ -69,7 +66,6 @@ namespace System.Net.Http.HPack
// | 0 | 0 | 1 | Max size (5+) | // | 0 | 0 | 1 | Max size (5+) |
// +---+---------------------------+ // +---+---------------------------+
private const byte DynamicTableSizeUpdateMask = 0xe0; private const byte DynamicTableSizeUpdateMask = 0xe0;
private const byte DynamicTableSizeUpdateRepresentation = 0x20;
// http://httpwg.org/specs/rfc7541.html#rfc.section.5.2 // http://httpwg.org/specs/rfc7541.html#rfc.section.5.2
// 0 1 2 3 4 5 6 7 // 0 1 2 3 4 5 6 7
@ -92,6 +88,8 @@ namespace System.Net.Http.HPack
private byte[] _stringOctets; private byte[] _stringOctets;
private byte[] _headerNameOctets; private byte[] _headerNameOctets;
private byte[] _headerValueOctets; private byte[] _headerValueOctets;
private (int start, int length)? _headerNameRange;
private (int start, int length)? _headerValueRange;
private State _state = State.Ready; private State _state = State.Ready;
private byte[]? _headerName; private byte[]? _headerName;
@ -124,107 +122,247 @@ namespace System.Net.Http.HPack
{ {
foreach (ReadOnlyMemory<byte> segment in data) foreach (ReadOnlyMemory<byte> segment in data)
{ {
DecodeInternal(segment.Span, endHeaders, handler); DecodeInternal(segment.Span, handler);
} }
CheckIncompleteHeaderBlock(endHeaders); CheckIncompleteHeaderBlock(endHeaders);
} }
public void Decode(ReadOnlySpan<byte> data, bool endHeaders, IHttpHeadersHandler? handler) public void Decode(ReadOnlySpan<byte> data, bool endHeaders, IHttpHeadersHandler handler)
{ {
DecodeInternal(data, endHeaders, handler); DecodeInternal(data, handler);
CheckIncompleteHeaderBlock(endHeaders); CheckIncompleteHeaderBlock(endHeaders);
} }
private void DecodeInternal(ReadOnlySpan<byte> data, bool endHeaders, IHttpHeadersHandler? handler) private void DecodeInternal(ReadOnlySpan<byte> data, IHttpHeadersHandler handler)
{ {
int intResult; int currentIndex = 0;
for (int i = 0; i < data.Length; i++) do
{ {
byte b = data[i];
switch (_state) switch (_state)
{ {
case State.Ready: case State.Ready:
// TODO: Instead of masking and comparing each prefix value, Parse(data, ref currentIndex, handler);
// consider doing a 16-way switch on the first four bits (which is the max prefix size). break;
// Look at this once we have more concrete perf data. case State.HeaderFieldIndex:
if ((b & IndexedHeaderFieldMask) == IndexedHeaderFieldRepresentation) ParseHeaderFieldIndex(data, ref currentIndex, handler);
break;
case State.HeaderNameIndex:
ParseHeaderNameIndex(data, ref currentIndex, handler);
break;
case State.HeaderNameLength:
ParseHeaderNameLength(data, ref currentIndex, handler);
break;
case State.HeaderNameLengthContinue:
ParseHeaderNameLengthContinue(data, ref currentIndex, handler);
break;
case State.HeaderName:
ParseHeaderName(data, ref currentIndex, handler);
break;
case State.HeaderValueLength:
ParseHeaderValueLength(data, ref currentIndex, handler);
break;
case State.HeaderValueLengthContinue:
ParseHeaderValueLengthContinue(data, ref currentIndex, handler);
break;
case State.HeaderValue:
ParseHeaderValue(data, ref currentIndex, handler);
break;
case State.DynamicTableSizeUpdate:
ParseDynamicTableSizeUpdate(data, ref currentIndex);
break;
default:
// Can't happen
Debug.Fail("HPACK decoder reach an invalid state");
throw new NotImplementedException(_state.ToString());
}
}
// Parse methods each check the length. This check is to see whether there is still data available
// and to continue parsing.
while (currentIndex < data.Length);
// If a header range was set, but the value was not in the data, then copy the range
// to the name buffer. Must copy because because the data will be replaced and the range
// will no longer be valid.
if (_headerNameRange != null)
{
EnsureStringCapacity(ref _headerNameOctets);
_headerName = _headerNameOctets;
ReadOnlySpan<byte> headerBytes = data.Slice(_headerNameRange.GetValueOrDefault().start, _headerNameRange.GetValueOrDefault().length);
headerBytes.CopyTo(_headerName);
_headerNameLength = headerBytes.Length;
_headerNameRange = null;
}
}
private void ParseDynamicTableSizeUpdate(ReadOnlySpan<byte> data, ref int currentIndex)
{
if (TryDecodeInteger(data, ref currentIndex, out int intResult))
{
SetDynamicHeaderTableSize(intResult);
_state = State.Ready;
}
}
private void ParseHeaderValueLength(ReadOnlySpan<byte> data, ref int currentIndex, IHttpHeadersHandler handler)
{
if (currentIndex < data.Length)
{
byte b = data[currentIndex++];
_huffman = IsHuffmanEncoded(b);
if (_integerDecoder.BeginTryDecode((byte)(b & ~HuffmanMask), StringLengthPrefix, out int intResult))
{
OnStringLength(intResult, nextState: State.HeaderValue);
if (intResult == 0)
{
OnString(nextState: State.Ready);
ProcessHeaderValue(data, handler);
}
else
{
ParseHeaderValue(data, ref currentIndex, handler);
}
}
else
{
_state = State.HeaderValueLengthContinue;
ParseHeaderValueLengthContinue(data, ref currentIndex, handler);
}
}
}
private void ParseHeaderNameLengthContinue(ReadOnlySpan<byte> data, ref int currentIndex, IHttpHeadersHandler handler)
{
if (TryDecodeInteger(data, ref currentIndex, out int intResult))
{
// IntegerDecoder disallows overlong encodings, where an integer is encoded with more bytes than is strictly required.
// 0 should always be represented by a single byte, so we shouldn't need to check for it in the continuation case.
Debug.Assert(intResult != 0, "A header name length of 0 should never be encoded with a continuation byte.");
OnStringLength(intResult, nextState: State.HeaderName);
ParseHeaderName(data, ref currentIndex, handler);
}
}
private void ParseHeaderValueLengthContinue(ReadOnlySpan<byte> data, ref int currentIndex, IHttpHeadersHandler handler)
{
if (TryDecodeInteger(data, ref currentIndex, out int intResult))
{
// 0 should always be represented by a single byte, so we shouldn't need to check for it in the continuation case.
Debug.Assert(intResult != 0, "A header value length of 0 should never be encoded with a continuation byte.");
OnStringLength(intResult, nextState: State.HeaderValue);
ParseHeaderValue(data, ref currentIndex, handler);
}
}
private void ParseHeaderFieldIndex(ReadOnlySpan<byte> data, ref int currentIndex, IHttpHeadersHandler handler)
{
if (TryDecodeInteger(data, ref currentIndex, out int intResult))
{
OnIndexedHeaderField(intResult, handler);
}
}
private void ParseHeaderNameIndex(ReadOnlySpan<byte> data, ref int currentIndex, IHttpHeadersHandler handler)
{
if (TryDecodeInteger(data, ref currentIndex, out int intResult))
{
OnIndexedHeaderName(intResult);
ParseHeaderValueLength(data, ref currentIndex, handler);
}
}
private void ParseHeaderNameLength(ReadOnlySpan<byte> data, ref int currentIndex, IHttpHeadersHandler handler)
{
if (currentIndex < data.Length)
{
byte b = data[currentIndex++];
_huffman = IsHuffmanEncoded(b);
if (_integerDecoder.BeginTryDecode((byte)(b & ~HuffmanMask), StringLengthPrefix, out int intResult))
{
if (intResult == 0)
{
throw new HPackDecodingException(SR.Format(SR.net_http_invalid_header_name, ""));
}
OnStringLength(intResult, nextState: State.HeaderName);
ParseHeaderName(data, ref currentIndex, handler);
}
else
{
_state = State.HeaderNameLengthContinue;
ParseHeaderNameLengthContinue(data, ref currentIndex, handler);
}
}
}
private void Parse(ReadOnlySpan<byte> data, ref int currentIndex, IHttpHeadersHandler handler)
{
if (currentIndex < data.Length)
{
Debug.Assert(_state == State.Ready, "Should be ready to parse a new header.");
byte b = data[currentIndex++];
switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
{
case 0: // Indexed Header Field
{ {
_headersObserved = true; _headersObserved = true;
int val = b & ~IndexedHeaderFieldMask; int val = b & ~IndexedHeaderFieldMask;
if (_integerDecoder.BeginTryDecode((byte)val, IndexedHeaderFieldPrefix, out intResult)) if (_integerDecoder.BeginTryDecode((byte)val, IndexedHeaderFieldPrefix, out int intResult))
{ {
OnIndexedHeaderField(intResult, handler); OnIndexedHeaderField(intResult, handler);
} }
else else
{ {
_state = State.HeaderFieldIndex; _state = State.HeaderFieldIndex;
ParseHeaderFieldIndex(data, ref currentIndex, handler);
} }
break;
} }
else if ((b & LiteralHeaderFieldWithIncrementalIndexingMask) == LiteralHeaderFieldWithIncrementalIndexingRepresentation) case 1: // Literal Header Field with Incremental Indexing
{ ParseLiteralHeaderField(
_headersObserved = true; data,
ref currentIndex,
_index = true; b,
int val = b & ~LiteralHeaderFieldWithIncrementalIndexingMask; LiteralHeaderFieldWithIncrementalIndexingMask,
LiteralHeaderFieldWithIncrementalIndexingPrefix,
if (val == 0) index: true,
{ handler);
_state = State.HeaderNameLength; break;
} case 4:
else if (_integerDecoder.BeginTryDecode((byte)val, LiteralHeaderFieldWithIncrementalIndexingPrefix, out intResult)) default: // Literal Header Field without Indexing
{ ParseLiteralHeaderField(
OnIndexedHeaderName(intResult); data,
} ref currentIndex,
else b,
{ LiteralHeaderFieldWithoutIndexingMask,
_state = State.HeaderNameIndex; LiteralHeaderFieldWithoutIndexingPrefix,
} index: false,
} handler);
else if ((b & LiteralHeaderFieldWithoutIndexingMask) == LiteralHeaderFieldWithoutIndexingRepresentation) break;
{ case 3: // Literal Header Field Never Indexed
_headersObserved = true; ParseLiteralHeaderField(
data,
_index = false; ref currentIndex,
int val = b & ~LiteralHeaderFieldWithoutIndexingMask; b,
LiteralHeaderFieldNeverIndexedMask,
if (val == 0) LiteralHeaderFieldNeverIndexedPrefix,
{ index: false,
_state = State.HeaderNameLength; handler);
} break;
else if (_integerDecoder.BeginTryDecode((byte)val, LiteralHeaderFieldWithoutIndexingPrefix, out intResult)) case 2: // Dynamic Table Size Update
{
OnIndexedHeaderName(intResult);
}
else
{
_state = State.HeaderNameIndex;
}
}
else if ((b & LiteralHeaderFieldNeverIndexedMask) == LiteralHeaderFieldNeverIndexedRepresentation)
{
_headersObserved = true;
_index = false;
int val = b & ~LiteralHeaderFieldNeverIndexedMask;
if (val == 0)
{
_state = State.HeaderNameLength;
}
else if (_integerDecoder.BeginTryDecode((byte)val, LiteralHeaderFieldNeverIndexedPrefix, out intResult))
{
OnIndexedHeaderName(intResult);
}
else
{
_state = State.HeaderNameIndex;
}
}
else if ((b & DynamicTableSizeUpdateMask) == DynamicTableSizeUpdateRepresentation)
{ {
// https://tools.ietf.org/html/rfc7541#section-4.2 // https://tools.ietf.org/html/rfc7541#section-4.2
// This dynamic table size // This dynamic table size
@ -235,125 +373,107 @@ namespace System.Net.Http.HPack
throw new HPackDecodingException(SR.net_http_hpack_late_dynamic_table_size_update); throw new HPackDecodingException(SR.net_http_hpack_late_dynamic_table_size_update);
} }
if (_integerDecoder.BeginTryDecode((byte)(b & ~DynamicTableSizeUpdateMask), DynamicTableSizeUpdatePrefix, out intResult)) if (_integerDecoder.BeginTryDecode((byte)(b & ~DynamicTableSizeUpdateMask), DynamicTableSizeUpdatePrefix, out int intResult))
{ {
SetDynamicHeaderTableSize(intResult); SetDynamicHeaderTableSize(intResult);
} }
else else
{ {
_state = State.DynamicTableSizeUpdate; _state = State.DynamicTableSizeUpdate;
ParseDynamicTableSizeUpdate(data, ref currentIndex);
} }
break;
} }
else }
{ }
// Can't happen }
Debug.Fail("Unreachable code");
throw new InvalidOperationException("Unreachable code.");
}
break; private void ParseLiteralHeaderField(ReadOnlySpan<byte> data, ref int currentIndex, byte b, byte mask, byte indexPrefix, bool index, IHttpHeadersHandler handler)
case State.HeaderFieldIndex: {
if (_integerDecoder.TryDecode(b, out intResult)) _headersObserved = true;
{
OnIndexedHeaderField(intResult, handler);
}
break; _index = index;
case State.HeaderNameIndex: int val = b & ~mask;
if (_integerDecoder.TryDecode(b, out intResult))
{
OnIndexedHeaderName(intResult);
}
break; if (val == 0)
case State.HeaderNameLength: {
_huffman = (b & HuffmanMask) != 0; _state = State.HeaderNameLength;
ParseHeaderNameLength(data, ref currentIndex, handler);
}
else
{
if (_integerDecoder.BeginTryDecode((byte)val, indexPrefix, out int intResult))
{
OnIndexedHeaderName(intResult);
ParseHeaderValueLength(data, ref currentIndex, handler);
}
else
{
_state = State.HeaderNameIndex;
ParseHeaderNameIndex(data, ref currentIndex, handler);
}
}
}
if (_integerDecoder.BeginTryDecode((byte)(b & ~HuffmanMask), StringLengthPrefix, out intResult)) private void ParseHeaderName(ReadOnlySpan<byte> data, ref int currentIndex, IHttpHeadersHandler handler)
{ {
if (intResult == 0) // Read remaining chars, up to the length of the current data
{ int count = Math.Min(_stringLength - _stringIndex, data.Length - currentIndex);
throw new HPackDecodingException(SR.Format(SR.net_http_invalid_header_name, ""));
}
OnStringLength(intResult, nextState: State.HeaderName); // Check whether the whole string is available in the data and no decompression required.
} // If string is good then mark its range.
else // NOTE: it may need to be copied to buffer later the if value is not current data.
{ if (count == _stringLength && !_huffman)
_state = State.HeaderNameLengthContinue; {
} // Fast path. Store the range rather than copying.
_headerNameRange = (start: currentIndex, count);
currentIndex += count;
break; _state = State.HeaderValueLength;
case State.HeaderNameLengthContinue: }
if (_integerDecoder.TryDecode(b, out intResult)) else
{ {
// IntegerDecoder disallows overlong encodings, where an integer is encoded with more bytes than is strictly required. // Copy string to temporary buffer.
// 0 should always be represented by a single byte, so we shouldn't need to check for it in the continuation case. // _stringOctets was already
Debug.Assert(intResult != 0, "A header name length of 0 should never be encoded with a continuation byte."); data.Slice(currentIndex, count).CopyTo(_stringOctets.AsSpan(_stringIndex));
_stringIndex += count;
currentIndex += count;
OnStringLength(intResult, nextState: State.HeaderName); if (_stringIndex == _stringLength)
} {
OnString(nextState: State.HeaderValueLength);
ParseHeaderValueLength(data, ref currentIndex, handler);
}
}
}
break; private void ParseHeaderValue(ReadOnlySpan<byte> data, ref int currentIndex, IHttpHeadersHandler handler)
case State.HeaderName: {
_stringOctets[_stringIndex++] = b; // Read remaining chars, up to the length of the current data
int count = Math.Min(_stringLength - _stringIndex, data.Length - currentIndex);
if (_stringIndex == _stringLength) // Check whether the whole string is available in the data and no decompressed required.
{ // If string is good then mark its range.
OnString(nextState: State.HeaderValueLength); if (count == _stringLength && !_huffman)
} {
// Fast path. Store the range rather than copying.
_headerValueRange = (start: currentIndex, count);
currentIndex += count;
break; _state = State.Ready;
case State.HeaderValueLength: ProcessHeaderValue(data, handler);
_huffman = (b & HuffmanMask) != 0; }
else
{
// Copy string to temporary buffer.
data.Slice(currentIndex, count).CopyTo(_stringOctets.AsSpan(_stringIndex));
_stringIndex += count;
currentIndex += count;
if (_integerDecoder.BeginTryDecode((byte)(b & ~HuffmanMask), StringLengthPrefix, out intResult)) if (_stringIndex == _stringLength)
{ {
OnStringLength(intResult, nextState: State.HeaderValue); OnString(nextState: State.Ready);
ProcessHeaderValue(data, handler);
if (intResult == 0)
{
ProcessHeaderValue(handler);
}
}
else
{
_state = State.HeaderValueLengthContinue;
}
break;
case State.HeaderValueLengthContinue:
if (_integerDecoder.TryDecode(b, out intResult))
{
// IntegerDecoder disallows overlong encodings where an integer is encoded with more bytes than is strictly required.
// 0 should always be represented by a single byte, so we shouldn't need to check for it in the continuation case.
Debug.Assert(intResult != 0, "A header value length of 0 should never be encoded with a continuation byte.");
OnStringLength(intResult, nextState: State.HeaderValue);
}
break;
case State.HeaderValue:
_stringOctets[_stringIndex++] = b;
if (_stringIndex == _stringLength)
{
ProcessHeaderValue(handler);
}
break;
case State.DynamicTableSizeUpdate:
if (_integerDecoder.TryDecode(b, out intResult))
{
SetDynamicHeaderTableSize(intResult);
_state = State.Ready;
}
break;
default:
// Can't happen
Debug.Fail("HPACK decoder reach an invalid state");
throw new NotImplementedException(_state.ToString());
} }
} }
} }
@ -371,14 +491,20 @@ namespace System.Net.Http.HPack
} }
} }
private void ProcessHeaderValue(IHttpHeadersHandler? handler) private void ProcessHeaderValue(ReadOnlySpan<byte> data, IHttpHeadersHandler handler)
{ {
OnString(nextState: State.Ready); ReadOnlySpan<byte> headerNameSpan = _headerNameRange == null
? new Span<byte>(_headerName, 0, _headerNameLength)
: data.Slice(_headerNameRange.GetValueOrDefault().start, _headerNameRange.GetValueOrDefault().length);
var headerNameSpan = new Span<byte>(_headerName, 0, _headerNameLength); ReadOnlySpan<byte> headerValueSpan = _headerValueRange == null
var headerValueSpan = new Span<byte>(_headerValueOctets, 0, _headerValueLength); ? new Span<byte>(_headerValueOctets, 0, _headerValueLength)
: data.Slice(_headerValueRange.GetValueOrDefault().start, _headerValueRange.GetValueOrDefault().length);
handler?.OnHeader(headerNameSpan, headerValueSpan); handler.OnHeader(headerNameSpan, headerValueSpan);
_headerNameRange = null;
_headerValueRange = null;
if (_index) if (_index)
{ {
@ -395,18 +521,17 @@ namespace System.Net.Http.HPack
} }
} }
private void OnIndexedHeaderField(int index, IHttpHeadersHandler? handler) private void OnIndexedHeaderField(int index, IHttpHeadersHandler handler)
{ {
HeaderField header = GetHeader(index); ref readonly HeaderField header = ref GetHeader(index);
handler?.OnHeader(header.Name, header.Value); handler.OnHeader(header.Name, header.Value);
_state = State.Ready; _state = State.Ready;
} }
private void OnIndexedHeaderName(int index) private void OnIndexedHeaderName(int index)
{ {
HeaderField header = GetHeader(index); _headerName = GetHeader(index).Name;
_headerName = header.Name; _headerNameLength = _headerName.Length;
_headerNameLength = header.Name.Length;
_state = State.HeaderValueLength; _state = State.HeaderValueLength;
} }
@ -437,11 +562,7 @@ namespace System.Net.Http.HPack
} }
else else
{ {
if (dst.Length < _stringLength) EnsureStringCapacity(ref dst);
{
dst = new byte[Math.Max(_stringLength, dst.Length * 2)];
}
Buffer.BlockCopy(_stringOctets, 0, dst, 0, _stringLength); Buffer.BlockCopy(_stringOctets, 0, dst, 0, _stringLength);
return _stringLength; return _stringLength;
} }
@ -467,13 +588,41 @@ namespace System.Net.Http.HPack
_state = nextState; _state = nextState;
} }
private HeaderField GetHeader(int index) private void EnsureStringCapacity(ref byte[] dst)
{
if (dst.Length < _stringLength)
{
dst = new byte[Math.Max(_stringLength, dst.Length * 2)];
}
}
private bool TryDecodeInteger(ReadOnlySpan<byte> data, ref int currentIndex, out int result)
{
for (; currentIndex < data.Length; currentIndex++)
{
if (_integerDecoder.TryDecode(data[currentIndex], out result))
{
currentIndex++;
return true;
}
}
result = default;
return false;
}
private static bool IsHuffmanEncoded(byte b)
{
return (b & HuffmanMask) != 0;
}
private ref readonly HeaderField GetHeader(int index)
{ {
try try
{ {
return index <= H2StaticTable.Count return ref index <= H2StaticTable.Count
? H2StaticTable.Get(index - 1) ? ref H2StaticTable.Get(index - 1)
: _dynamicTable[index - H2StaticTable.Count - 1]; : ref _dynamicTable[index - H2StaticTable.Count - 1];
} }
catch (IndexOutOfRangeException) catch (IndexOutOfRangeException)
{ {

View File

@ -54,7 +54,7 @@ namespace System.Net.Http.HPack
case 404: case 404:
case 500: case 500:
// Status codes which exist in the HTTP/2 StaticTable. // Status codes which exist in the HTTP/2 StaticTable.
return EncodeIndexedHeaderField(H2StaticTable.StatusIndex[statusCode], destination, out bytesWritten); return EncodeIndexedHeaderField(H2StaticTable.GetStatusIndex(statusCode), destination, out bytesWritten);
default: default:
// If the status code doesn't have a static index then we need to include the full value. // If the status code doesn't have a static index then we need to include the full value.
// Write a status index and then the number bytes as a string literal. // Write a status index and then the number bytes as a string literal.

View File

@ -14,7 +14,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
namespace System.Net.Http.Unit.Tests.HPack namespace System.Net.Http.Unit.Tests.HPack
{ {
public class HPackDecoderTests : IHttpHeadersHandler public class HPackDecoderTests
{ {
private const int DynamicTableInitialMaxSize = 4096; private const int DynamicTableInitialMaxSize = 4096;
private const int MaxHeaderFieldSize = 8192; private const int MaxHeaderFieldSize = 8192;
@ -89,42 +89,26 @@ namespace System.Net.Http.Unit.Tests.HPack
private readonly DynamicTable _dynamicTable; private readonly DynamicTable _dynamicTable;
private readonly HPackDecoder _decoder; private readonly HPackDecoder _decoder;
private readonly TestHttpHeadersHandler _handler = new TestHttpHeadersHandler();
private readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>();
public HPackDecoderTests() public HPackDecoderTests()
{ {
_dynamicTable = new DynamicTable(DynamicTableInitialMaxSize); (_dynamicTable, _decoder) = CreateDecoderAndTable();
_decoder = new HPackDecoder(DynamicTableInitialMaxSize, MaxHeaderFieldSize, _dynamicTable);
} }
void IHttpHeadersHandler.OnHeader(ReadOnlySpan<byte> name, ReadOnlySpan<byte> value) private static (DynamicTable, HPackDecoder) CreateDecoderAndTable()
{ {
string headerName = Encoding.ASCII.GetString(name); var dynamicTable = new DynamicTable(DynamicTableInitialMaxSize);
string headerValue = Encoding.ASCII.GetString(value); var decoder = new HPackDecoder(DynamicTableInitialMaxSize, MaxHeaderFieldSize, dynamicTable);
_decodedHeaders[headerName] = headerValue; return (dynamicTable, decoder);
} }
void IHttpHeadersHandler.OnStaticIndexedHeader(int index)
{
// Not yet implemented for HPACK.
throw new NotImplementedException();
}
void IHttpHeadersHandler.OnStaticIndexedHeader(int index, ReadOnlySpan<byte> value)
{
// Not yet implemented for HPACK.
throw new NotImplementedException();
}
void IHttpHeadersHandler.OnHeadersComplete(bool endStream) { }
[Fact] [Fact]
public void DecodesIndexedHeaderField_StaticTable() public void DecodesIndexedHeaderField_StaticTable()
{ {
_decoder.Decode(_indexedHeaderStatic, endHeaders: true, handler: this); _decoder.Decode(_indexedHeaderStatic, endHeaders: true, handler: _handler);
Assert.Equal("GET", _decodedHeaders[":method"]); Assert.Equal("GET", _handler.DecodedHeaders[":method"]);
} }
[Fact] [Fact]
@ -134,17 +118,17 @@ namespace System.Net.Http.Unit.Tests.HPack
_dynamicTable.Insert(_headerNameBytes, _headerValueBytes); _dynamicTable.Insert(_headerNameBytes, _headerValueBytes);
// Index it // Index it
_decoder.Decode(_indexedHeaderDynamic, endHeaders: true, handler: this); _decoder.Decode(_indexedHeaderDynamic, endHeaders: true, handler: _handler);
Assert.Equal(_headerValueString, _decodedHeaders[_headerNameString]); Assert.Equal(_headerValueString, _handler.DecodedHeaders[_headerNameString]);
} }
[Fact] [Fact]
public void DecodesIndexedHeaderField_OutOfRange_Error() public void DecodesIndexedHeaderField_OutOfRange_Error()
{ {
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() =>
_decoder.Decode(_indexedHeaderDynamic, endHeaders: true, handler: this)); _decoder.Decode(_indexedHeaderDynamic, endHeaders: true, handler: _handler));
Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message);
Assert.Empty(_decodedHeaders); Assert.Empty(_handler.DecodedHeaders);
} }
[Fact] [Fact]
@ -218,9 +202,9 @@ namespace System.Net.Http.Unit.Tests.HPack
// 11 1110 (Indexed Name - Index 62 encoded with 6-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation) // 11 1110 (Indexed Name - Index 62 encoded with 6-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation)
// Index 62 is the first entry in the dynamic table. If there's nothing there, the decoder should throw. // Index 62 is the first entry in the dynamic table. If there's nothing there, the decoder should throw.
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x7e }, endHeaders: true, handler: this)); HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x7e }, endHeaders: true, handler: _handler));
Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message);
Assert.Empty(_decodedHeaders); Assert.Empty(_handler.DecodedHeaders);
} }
[Fact] [Fact]
@ -294,9 +278,9 @@ namespace System.Net.Http.Unit.Tests.HPack
// 1111 0010 1111 (Indexed Name - Index 62 encoded with 4-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation) // 1111 0010 1111 (Indexed Name - Index 62 encoded with 4-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation)
// Index 62 is the first entry in the dynamic table. If there's nothing there, the decoder should throw. // Index 62 is the first entry in the dynamic table. If there's nothing there, the decoder should throw.
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x0f, 0x2f }, endHeaders: true, handler: this)); HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x0f, 0x2f }, endHeaders: true, handler: _handler));
Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message);
Assert.Empty(_decodedHeaders); Assert.Empty(_handler.DecodedHeaders);
} }
[Fact] [Fact]
@ -310,6 +294,19 @@ namespace System.Net.Http.Unit.Tests.HPack
TestDecodeWithoutIndexing(encoded, _headerNameString, _headerValueString); TestDecodeWithoutIndexing(encoded, _headerNameString, _headerValueString);
} }
[Fact]
public void DecodesLiteralHeaderFieldNeverIndexed_NewName_Duplicated()
{
byte[] encoded = _literalHeaderFieldNeverIndexedNewName
.Concat(_headerName)
.Concat(_headerValue)
.ToArray();
encoded = encoded.Concat(encoded).ToArray();
TestDecodeWithoutIndexing(encoded, _headerNameString, _headerValueString);
}
[Fact] [Fact]
public void DecodesLiteralHeaderFieldNeverIndexed_NewName_HuffmanEncodedName() public void DecodesLiteralHeaderFieldNeverIndexed_NewName_HuffmanEncodedName()
{ {
@ -376,9 +373,9 @@ namespace System.Net.Http.Unit.Tests.HPack
// 1111 0010 1111 (Indexed Name - Index 62 encoded with 4-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation) // 1111 0010 1111 (Indexed Name - Index 62 encoded with 4-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation)
// Index 62 is the first entry in the dynamic table. If there's nothing there, the decoder should throw. // Index 62 is the first entry in the dynamic table. If there's nothing there, the decoder should throw.
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x1f, 0x2f }, endHeaders: true, handler: this)); HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x1f, 0x2f }, endHeaders: true, handler: _handler));
Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message);
Assert.Empty(_decodedHeaders); Assert.Empty(_handler.DecodedHeaders);
} }
[Fact] [Fact]
@ -389,10 +386,10 @@ namespace System.Net.Http.Unit.Tests.HPack
Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize); Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize);
_decoder.Decode(new byte[] { 0x3e }, endHeaders: true, handler: this); _decoder.Decode(new byte[] { 0x3e }, endHeaders: true, handler: _handler);
Assert.Equal(30, _dynamicTable.MaxSize); Assert.Equal(30, _dynamicTable.MaxSize);
Assert.Empty(_decodedHeaders); Assert.Empty(_handler.DecodedHeaders);
} }
[Fact] [Fact]
@ -404,7 +401,7 @@ namespace System.Net.Http.Unit.Tests.HPack
Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize); Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize);
byte[] data = _indexedHeaderStatic.Concat(new byte[] { 0x3e }).ToArray(); byte[] data = _indexedHeaderStatic.Concat(new byte[] { 0x3e }).ToArray();
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(data, endHeaders: true, handler: this)); HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(data, endHeaders: true, handler: _handler));
Assert.Equal(SR.net_http_hpack_late_dynamic_table_size_update, exception.Message); Assert.Equal(SR.net_http_hpack_late_dynamic_table_size_update, exception.Message);
} }
@ -413,13 +410,13 @@ namespace System.Net.Http.Unit.Tests.HPack
{ {
Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize); Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize);
_decoder.Decode(_indexedHeaderStatic, endHeaders: false, handler: this); _decoder.Decode(_indexedHeaderStatic, endHeaders: false, handler: _handler);
Assert.Equal("GET", _decodedHeaders[":method"]); Assert.Equal("GET", _handler.DecodedHeaders[":method"]);
// 001 (Dynamic Table Size Update) // 001 (Dynamic Table Size Update)
// 11110 (30 encoded with 5-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation) // 11110 (30 encoded with 5-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation)
byte[] data = new byte[] { 0x3e }; byte[] data = new byte[] { 0x3e };
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(data, endHeaders: true, handler: this)); HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(data, endHeaders: true, handler: _handler));
Assert.Equal(SR.net_http_hpack_late_dynamic_table_size_update, exception.Message); Assert.Equal(SR.net_http_hpack_late_dynamic_table_size_update, exception.Message);
} }
@ -428,12 +425,12 @@ namespace System.Net.Http.Unit.Tests.HPack
{ {
Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize); Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize);
_decoder.Decode(_indexedHeaderStatic, endHeaders: true, handler: this); _decoder.Decode(_indexedHeaderStatic, endHeaders: true, handler: _handler);
Assert.Equal("GET", _decodedHeaders[":method"]); Assert.Equal("GET", _handler.DecodedHeaders[":method"]);
// 001 (Dynamic Table Size Update) // 001 (Dynamic Table Size Update)
// 11110 (30 encoded with 5-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation) // 11110 (30 encoded with 5-bit prefix - see http://httpwg.org/specs/rfc7541.html#integer.representation)
_decoder.Decode(new byte[] { 0x3e }, endHeaders: true, handler: this); _decoder.Decode(new byte[] { 0x3e }, endHeaders: true, handler: _handler);
Assert.Equal(30, _dynamicTable.MaxSize); Assert.Equal(30, _dynamicTable.MaxSize);
} }
@ -447,9 +444,9 @@ namespace System.Net.Http.Unit.Tests.HPack
Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize); Assert.Equal(DynamicTableInitialMaxSize, _dynamicTable.MaxSize);
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() =>
_decoder.Decode(new byte[] { 0x3f, 0xe2, 0x1f }, endHeaders: true, handler: this)); _decoder.Decode(new byte[] { 0x3f, 0xe2, 0x1f }, endHeaders: true, handler: _handler));
Assert.Equal(SR.Format(SR.net_http_hpack_large_table_size_update, 4097, DynamicTableInitialMaxSize), exception.Message); Assert.Equal(SR.Format(SR.net_http_hpack_large_table_size_update, 4097, DynamicTableInitialMaxSize), exception.Message);
Assert.Empty(_decodedHeaders); Assert.Empty(_handler.DecodedHeaders);
} }
[Fact] [Fact]
@ -459,9 +456,9 @@ namespace System.Net.Http.Unit.Tests.HPack
.Concat(new byte[] { 0xff, 0x82, 0x3f }) // 8193 encoded with 7-bit prefix .Concat(new byte[] { 0xff, 0x82, 0x3f }) // 8193 encoded with 7-bit prefix
.ToArray(); .ToArray();
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: this)); HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
Assert.Equal(SR.Format(SR.net_http_headers_exceeded_length, MaxHeaderFieldSize), exception.Message); Assert.Equal(SR.Format(SR.net_http_headers_exceeded_length, MaxHeaderFieldSize), exception.Message);
Assert.Empty(_decodedHeaders); Assert.Empty(_handler.DecodedHeaders);
} }
[Fact] [Fact]
@ -477,9 +474,57 @@ namespace System.Net.Http.Unit.Tests.HPack
.Concat(Encoding.ASCII.GetBytes(string8193)) .Concat(Encoding.ASCII.GetBytes(string8193))
.ToArray(); .ToArray();
decoder.Decode(encoded, endHeaders: true, handler: this); decoder.Decode(encoded, endHeaders: true, handler: _handler);
Assert.Equal(string8193, _decodedHeaders[string8193]); Assert.Equal(string8193, _handler.DecodedHeaders[string8193]);
}
[Fact]
public void DecodesStringLength_IndividualBytes()
{
HPackDecoder decoder = new HPackDecoder(DynamicTableInitialMaxSize, MaxHeaderFieldSize + 1);
string string8193 = new string('a', MaxHeaderFieldSize + 1);
byte[] encoded = _literalHeaderFieldWithoutIndexingNewName
.Concat(new byte[] { 0x7f, 0x82, 0x3f }) // 8193 encoded with 7-bit prefix, no Huffman encoding
.Concat(Encoding.ASCII.GetBytes(string8193))
.Concat(new byte[] { 0x7f, 0x82, 0x3f }) // 8193 encoded with 7-bit prefix, no Huffman encoding
.Concat(Encoding.ASCII.GetBytes(string8193))
.ToArray();
for (int i = 0; i < encoded.Length; i++)
{
bool end = i + 1 == encoded.Length;
decoder.Decode(new byte[] { encoded[i] }, endHeaders: end, handler: _handler);
}
Assert.Equal(string8193, _handler.DecodedHeaders[string8193]);
}
[Fact]
public void DecodesHeaderNameAndValue_SeparateSegments()
{
HPackDecoder decoder = new HPackDecoder(DynamicTableInitialMaxSize, MaxHeaderFieldSize + 1);
string string8193 = new string('a', MaxHeaderFieldSize + 1);
byte[][] segments = new byte[][]
{
_literalHeaderFieldWithoutIndexingNewName,
new byte[] { 0x7f, 0x82, 0x3f }, // 8193 encoded with 7-bit prefix, no Huffman encoding
Encoding.ASCII.GetBytes(string8193),
new byte[] { 0x7f, 0x82, 0x3f }, // 8193 encoded with 7-bit prefix, no Huffman encoding
Encoding.ASCII.GetBytes(string8193)
};
for (int i = 0; i < segments.Length; i++)
{
bool end = i + 1 == segments.Length;
decoder.Decode(segments[i], endHeaders: end, handler: _handler);
}
Assert.Equal(string8193, _handler.DecodedHeaders[string8193]);
} }
public static readonly TheoryData<byte[]> _incompleteHeaderBlockData = new TheoryData<byte[]> public static readonly TheoryData<byte[]> _incompleteHeaderBlockData = new TheoryData<byte[]>
@ -567,9 +612,9 @@ namespace System.Net.Http.Unit.Tests.HPack
[MemberData(nameof(_incompleteHeaderBlockData))] [MemberData(nameof(_incompleteHeaderBlockData))]
public void DecodesIncompleteHeaderBlock_Error(byte[] encoded) public void DecodesIncompleteHeaderBlock_Error(byte[] encoded)
{ {
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: this)); HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
Assert.Equal(SR.net_http_hpack_incomplete_header_block, exception.Message); Assert.Equal(SR.net_http_hpack_incomplete_header_block, exception.Message);
Assert.Empty(_decodedHeaders); Assert.Empty(_handler.DecodedHeaders);
} }
public static readonly TheoryData<byte[]> _huffmanDecodingErrorData = new TheoryData<byte[]> public static readonly TheoryData<byte[]> _huffmanDecodingErrorData = new TheoryData<byte[]>
@ -601,43 +646,89 @@ namespace System.Net.Http.Unit.Tests.HPack
[MemberData(nameof(_huffmanDecodingErrorData))] [MemberData(nameof(_huffmanDecodingErrorData))]
public void WrapsHuffmanDecodingExceptionInHPackDecodingException(byte[] encoded) public void WrapsHuffmanDecodingExceptionInHPackDecodingException(byte[] encoded)
{ {
HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: this)); HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message); Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message);
Assert.IsType<HuffmanDecodingException>(exception.InnerException); Assert.IsType<HuffmanDecodingException>(exception.InnerException);
Assert.Empty(_decodedHeaders); Assert.Empty(_handler.DecodedHeaders);
} }
private void TestDecodeWithIndexing(byte[] encoded, string expectedHeaderName, string expectedHeaderValue) private static void TestDecodeWithIndexing(byte[] encoded, string expectedHeaderName, string expectedHeaderValue)
{ {
TestDecode(encoded, expectedHeaderName, expectedHeaderValue, expectDynamicTableEntry: true); TestDecode(encoded, expectedHeaderName, expectedHeaderValue, expectDynamicTableEntry: true, byteAtATime: false);
TestDecode(encoded, expectedHeaderName, expectedHeaderValue, expectDynamicTableEntry: true, byteAtATime: true);
} }
private void TestDecodeWithoutIndexing(byte[] encoded, string expectedHeaderName, string expectedHeaderValue) private static void TestDecodeWithoutIndexing(byte[] encoded, string expectedHeaderName, string expectedHeaderValue)
{ {
TestDecode(encoded, expectedHeaderName, expectedHeaderValue, expectDynamicTableEntry: false); TestDecode(encoded, expectedHeaderName, expectedHeaderValue, expectDynamicTableEntry: false, byteAtATime: false);
TestDecode(encoded, expectedHeaderName, expectedHeaderValue, expectDynamicTableEntry: false, byteAtATime: true);
} }
private void TestDecode(byte[] encoded, string expectedHeaderName, string expectedHeaderValue, bool expectDynamicTableEntry) private static void TestDecode(byte[] encoded, string expectedHeaderName, string expectedHeaderValue, bool expectDynamicTableEntry, bool byteAtATime)
{ {
Assert.Equal(0, _dynamicTable.Count); var (dynamicTable, decoder) = CreateDecoderAndTable();
Assert.Equal(0, _dynamicTable.Size); var handler = new TestHttpHeadersHandler();
_decoder.Decode(encoded, endHeaders: true, handler: this); Assert.Equal(0, dynamicTable.Count);
Assert.Equal(0, dynamicTable.Size);
Assert.Equal(expectedHeaderValue, _decodedHeaders[expectedHeaderName]); if (!byteAtATime)
if (expectDynamicTableEntry)
{ {
Assert.Equal(1, _dynamicTable.Count); decoder.Decode(encoded, endHeaders: true, handler: handler);
Assert.Equal(expectedHeaderName, Encoding.ASCII.GetString(_dynamicTable[0].Name));
Assert.Equal(expectedHeaderValue, Encoding.ASCII.GetString(_dynamicTable[0].Value));
Assert.Equal(expectedHeaderName.Length + expectedHeaderValue.Length + 32, _dynamicTable.Size);
} }
else else
{ {
Assert.Equal(0, _dynamicTable.Count); // Parse data in 1 byte chunks, separated by empty chunks
Assert.Equal(0, _dynamicTable.Size); for (int i = 0; i < encoded.Length; i++)
{
bool end = i + 1 == encoded.Length;
decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
decoder.Decode(new byte[] { encoded[i] }, endHeaders: end, handler: handler);
}
}
Assert.Equal(expectedHeaderValue, handler.DecodedHeaders[expectedHeaderName]);
if (expectDynamicTableEntry)
{
Assert.Equal(1, dynamicTable.Count);
Assert.Equal(expectedHeaderName, Encoding.ASCII.GetString(dynamicTable[0].Name));
Assert.Equal(expectedHeaderValue, Encoding.ASCII.GetString(dynamicTable[0].Value));
Assert.Equal(expectedHeaderName.Length + expectedHeaderValue.Length + 32, dynamicTable.Size);
}
else
{
Assert.Equal(0, dynamicTable.Count);
Assert.Equal(0, dynamicTable.Size);
} }
} }
} }
public class TestHttpHeadersHandler : IHttpHeadersHandler
{
public Dictionary<string, string> DecodedHeaders { get; } = new Dictionary<string, string>();
void IHttpHeadersHandler.OnHeader(ReadOnlySpan<byte> name, ReadOnlySpan<byte> value)
{
string headerName = Encoding.ASCII.GetString(name);
string headerValue = Encoding.ASCII.GetString(value);
DecodedHeaders[headerName] = headerValue;
}
void IHttpHeadersHandler.OnStaticIndexedHeader(int index)
{
// Not yet implemented for HPACK.
throw new NotImplementedException();
}
void IHttpHeadersHandler.OnStaticIndexedHeader(int index, ReadOnlySpan<byte> value)
{
// Not yet implemented for HPACK.
throw new NotImplementedException();
}
void IHttpHeadersHandler.OnHeadersComplete(bool endStream) { }
}
} }

View File

@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CheckFixedMessage(string protocolName, HttpTransportType transportType, string path) public async Task CheckFixedMessage(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connectionBuilder = new HubConnectionBuilder() var connectionBuilder = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -125,7 +125,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
} }
var protocol = HubProtocols["json"]; var protocol = HubProtocols["json"];
using (var server = await StartServer<Startup>(ExpectedError)) await using (var server = await StartServer<Startup>(ExpectedError))
{ {
var connectionBuilder = new HubConnectionBuilder() var connectionBuilder = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -155,7 +155,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ClientCanConnectToServerWithLowerMinimumProtocol() public async Task ClientCanConnectToServerWithLowerMinimumProtocol()
{ {
var protocol = HubProtocols["json"]; var protocol = HubProtocols["json"];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connectionBuilder = new HubConnectionBuilder() var connectionBuilder = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -185,7 +185,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanSendAndReceiveMessage(string protocolName, HttpTransportType transportType, string path) public async Task CanSendAndReceiveMessage(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
const string originalMessage = "SignalR"; const string originalMessage = "SignalR";
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
@ -214,7 +214,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanSendNull(string protocolName) public async Task CanSendNull(string protocolName)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.LongPolling, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.LongPolling, protocol, LoggerFactory);
try try
@ -243,7 +243,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanStopAndStartConnection(string protocolName, HttpTransportType transportType, string path) public async Task CanStopAndStartConnection(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
const string originalMessage = "SignalR"; const string originalMessage = "SignalR";
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
@ -275,7 +275,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanAccessConnectionIdFromHubConnection(string protocolName, HttpTransportType transportType, string path) public async Task CanAccessConnectionIdFromHubConnection(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -310,7 +310,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanStartConnectionFromClosedEvent(string protocolName, HttpTransportType transportType, string path) public async Task CanStartConnectionFromClosedEvent(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var logger = LoggerFactory.CreateLogger<HubConnectionTests>(); var logger = LoggerFactory.CreateLogger<HubConnectionTests>();
const string originalMessage = "SignalR"; const string originalMessage = "SignalR";
@ -372,7 +372,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task MethodsAreCaseInsensitive(string protocolName, HttpTransportType transportType, string path) public async Task MethodsAreCaseInsensitive(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
const string originalMessage = "SignalR"; const string originalMessage = "SignalR";
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
@ -402,7 +402,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanInvokeFromOnHandler(string protocolName, HttpTransportType transportType, string path) public async Task CanInvokeFromOnHandler(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
const string originalMessage = "SignalR"; const string originalMessage = "SignalR";
@ -442,7 +442,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task StreamAsyncCoreTest(string protocolName, HttpTransportType transportType, string path) public async Task StreamAsyncCoreTest(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -477,7 +477,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanStreamToHubWithIAsyncEnumerableMethodArg(string protocolName) public async Task CanStreamToHubWithIAsyncEnumerableMethodArg(string protocolName)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.WebSockets, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.WebSockets, protocol, LoggerFactory);
try try
@ -523,7 +523,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task StreamAsyncTest(string protocolName, HttpTransportType transportType, string path) public async Task StreamAsyncTest(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -558,7 +558,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task StreamAsyncDoesNotStartIfTokenAlreadyCanceled(string protocolName, HttpTransportType transportType, string path) public async Task StreamAsyncDoesNotStartIfTokenAlreadyCanceled(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -595,7 +595,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task StreamAsyncCanBeCanceled(string protocolName, HttpTransportType transportType, string path) public async Task StreamAsyncCanBeCanceled(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -643,7 +643,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
} }
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>(ExpectedErrors)) await using (var server = await StartServer<Startup>(ExpectedErrors))
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -679,7 +679,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanInvokeClientMethodFromServer(string protocolName, HttpTransportType transportType, string path) public async Task CanInvokeClientMethodFromServer(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
const string originalMessage = "SignalR"; const string originalMessage = "SignalR";
@ -713,7 +713,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task InvokeNonExistantClientMethodFromServer(string protocolName, HttpTransportType transportType, string path) public async Task InvokeNonExistantClientMethodFromServer(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
var closeTcs = new TaskCompletionSource(); var closeTcs = new TaskCompletionSource();
@ -755,7 +755,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanStreamClientMethodFromServer(string protocolName, HttpTransportType transportType, string path) public async Task CanStreamClientMethodFromServer(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -785,7 +785,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanStreamToAndFromClientInSameInvocation(string protocolName, HttpTransportType transportType, string path) public async Task CanStreamToAndFromClientInSameInvocation(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -822,7 +822,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanStreamToServerWithIAsyncEnumerable(string protocolName, HttpTransportType transportType, string path) public async Task CanStreamToServerWithIAsyncEnumerable(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -869,7 +869,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanCancelIAsyncEnumerableClientToServerUpload(string protocolName, HttpTransportType transportType, string path) public async Task CanCancelIAsyncEnumerableClientToServerUpload(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -922,7 +922,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task StreamAsyncCanBeCanceledThroughGetAsyncEnumerator(string protocolName, HttpTransportType transportType, string path) public async Task StreamAsyncCanBeCanceledThroughGetAsyncEnumerator(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -963,7 +963,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task CanCloseStreamMethodEarly(string protocolName, HttpTransportType transportType, string path) public async Task CanCloseStreamMethodEarly(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -1004,7 +1004,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task StreamDoesNotStartIfTokenAlreadyCanceled(string protocolName, HttpTransportType transportType, string path) public async Task StreamDoesNotStartIfTokenAlreadyCanceled(string protocolName, HttpTransportType transportType, string path)
{ {
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -1039,7 +1039,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
} }
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>(ExpectedErrors)) await using (var server = await StartServer<Startup>(ExpectedErrors))
{ {
var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, path, transportType, protocol, LoggerFactory);
try try
@ -1067,7 +1067,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionIfHubMethodCannotBeResolved(string hubProtocolName, HttpTransportType transportType, string hubPath) public async Task ServerThrowsHubExceptionIfHubMethodCannotBeResolved(string hubProtocolName, HttpTransportType transportType, string hubPath)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
try try
@ -1094,7 +1094,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionIfHubMethodCannotBeResolvedAndArgumentsPassedIn(string hubProtocolName, HttpTransportType transportType, string hubPath) public async Task ServerThrowsHubExceptionIfHubMethodCannotBeResolvedAndArgumentsPassedIn(string hubProtocolName, HttpTransportType transportType, string hubPath)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
try try
@ -1121,7 +1121,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionOnHubMethodArgumentCountMismatch(string hubProtocolName) public async Task ServerThrowsHubExceptionOnHubMethodArgumentCountMismatch(string hubProtocolName)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.LongPolling, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.LongPolling, hubProtocol, LoggerFactory);
try try
@ -1148,7 +1148,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionOnHubMethodArgumentTypeMismatch(string hubProtocolName, HttpTransportType transportType, string hubPath) public async Task ServerThrowsHubExceptionOnHubMethodArgumentTypeMismatch(string hubProtocolName, HttpTransportType transportType, string hubPath)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
try try
@ -1175,7 +1175,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionIfStreamingHubMethodCannotBeResolved(string hubProtocolName, HttpTransportType transportType, string hubPath) public async Task ServerThrowsHubExceptionIfStreamingHubMethodCannotBeResolved(string hubProtocolName, HttpTransportType transportType, string hubPath)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
try try
@ -1203,7 +1203,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionOnStreamingHubMethodArgumentCountMismatch(string hubProtocolName, HttpTransportType transportType, string hubPath) public async Task ServerThrowsHubExceptionOnStreamingHubMethodArgumentCountMismatch(string hubProtocolName, HttpTransportType transportType, string hubPath)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
try try
@ -1231,7 +1231,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionOnStreamingHubMethodArgumentTypeMismatch(string hubProtocolName, HttpTransportType transportType, string hubPath) public async Task ServerThrowsHubExceptionOnStreamingHubMethodArgumentTypeMismatch(string hubProtocolName, HttpTransportType transportType, string hubPath)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
try try
@ -1259,7 +1259,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionIfNonStreamMethodInvokedWithStreamAsync(string hubProtocolName, HttpTransportType transportType, string hubPath) public async Task ServerThrowsHubExceptionIfNonStreamMethodInvokedWithStreamAsync(string hubProtocolName, HttpTransportType transportType, string hubPath)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
try try
@ -1286,7 +1286,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionIfStreamMethodInvokedWithInvoke(string hubProtocolName, HttpTransportType transportType, string hubPath) public async Task ServerThrowsHubExceptionIfStreamMethodInvokedWithInvoke(string hubProtocolName, HttpTransportType transportType, string hubPath)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
try try
@ -1313,7 +1313,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
public async Task ServerThrowsHubExceptionIfBuildingAsyncEnumeratorIsNotPossible(string hubProtocolName, HttpTransportType transportType, string hubPath) public async Task ServerThrowsHubExceptionIfBuildingAsyncEnumeratorIsNotPossible(string hubProtocolName, HttpTransportType transportType, string hubPath)
{ {
var hubProtocol = HubProtocols[hubProtocolName]; var hubProtocol = HubProtocols[hubProtocolName];
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
try try
@ -1349,7 +1349,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
}; };
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>(write => write.EventId.Name == "FailedWritingMessage")) await using (var server = await StartServer<Startup>(write => write.EventId.Name == "FailedWritingMessage"))
{ {
var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.WebSockets, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.WebSockets, protocol, LoggerFactory);
var closedTcs = new TaskCompletionSource<Exception>(TaskCreationOptions.RunContinuationsAsynchronously); var closedTcs = new TaskCompletionSource<Exception>(TaskCreationOptions.RunContinuationsAsynchronously);
@ -1396,7 +1396,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
}; };
var protocol = HubProtocols[protocolName]; var protocol = HubProtocols[protocolName];
using (var server = await StartServer<Startup>(write => write.EventId.Name == "FailedWritingMessage")) await using (var server = await StartServer<Startup>(write => write.EventId.Name == "FailedWritingMessage"))
{ {
var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.LongPolling, protocol, LoggerFactory); var connection = CreateHubConnection(server.Url, "/default", HttpTransportType.LongPolling, protocol, LoggerFactory);
var closedTcs = new TaskCompletionSource<Exception>(TaskCreationOptions.RunContinuationsAsynchronously); var closedTcs = new TaskCompletionSource<Exception>(TaskCreationOptions.RunContinuationsAsynchronously);
@ -1436,7 +1436,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
var hubProtocol = HubProtocols.First().Value; var hubProtocol = HubProtocols.First().Value;
var transportType = TransportTypes().First().Cast<HttpTransportType>().First(); var transportType = TransportTypes().First().Cast<HttpTransportType>().First();
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory); var connection = CreateHubConnection(server.Url, hubPath, transportType, hubProtocol, LoggerFactory);
await connection.StartAsync().OrTimeout(); await connection.StartAsync().OrTimeout();
@ -1453,7 +1453,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[MemberData(nameof(TransportTypes))] [MemberData(nameof(TransportTypes))]
public async Task ClientCanUseJwtBearerTokenForAuthentication(HttpTransportType transportType) public async Task ClientCanUseJwtBearerTokenForAuthentication(HttpTransportType transportType)
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
async Task<string> AccessTokenProvider() async Task<string> AccessTokenProvider()
{ {
@ -1496,7 +1496,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
return writeContext.Exception is HttpRequestException; return writeContext.Exception is HttpRequestException;
} }
using (var server = await StartServer<Startup>(ExpectedErrors)) await using (var server = await StartServer<Startup>(ExpectedErrors))
{ {
var hubConnection = new HubConnectionBuilder() var hubConnection = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1518,7 +1518,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[MemberData(nameof(TransportTypes))] [MemberData(nameof(TransportTypes))]
public async Task ClientCanUseJwtBearerTokenForAuthenticationWhenRedirected(HttpTransportType transportType) public async Task ClientCanUseJwtBearerTokenForAuthenticationWhenRedirected(HttpTransportType transportType)
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var hubConnection = new HubConnectionBuilder() var hubConnection = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1546,7 +1546,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[MemberData(nameof(TransportTypes))] [MemberData(nameof(TransportTypes))]
public async Task ClientCanSendHeaders(HttpTransportType transportType) public async Task ClientCanSendHeaders(HttpTransportType transportType)
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var hubConnection = new HubConnectionBuilder() var hubConnection = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1577,7 +1577,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[Fact] [Fact]
public async Task UserAgentIsSet() public async Task UserAgentIsSet()
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var hubConnection = new HubConnectionBuilder() var hubConnection = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1619,7 +1619,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[Fact] [Fact]
public async Task UserAgentCanBeCleared() public async Task UserAgentCanBeCleared()
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var hubConnection = new HubConnectionBuilder() var hubConnection = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1654,7 +1654,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[Fact] [Fact]
public async Task UserAgentCanBeSet() public async Task UserAgentCanBeSet()
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var hubConnection = new HubConnectionBuilder() var hubConnection = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1690,7 +1690,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[WebSocketsSupportedCondition] [WebSocketsSupportedCondition]
public async Task WebSocketOptionsAreApplied() public async Task WebSocketOptionsAreApplied()
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
// System.Net has a HttpTransportType type which means we need to fully-qualify this rather than 'use' the namespace // System.Net has a HttpTransportType type which means we need to fully-qualify this rather than 'use' the namespace
var cookieJar = new System.Net.CookieContainer(); var cookieJar = new System.Net.CookieContainer();
@ -1724,7 +1724,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[Fact] [Fact]
public async Task CheckHttpConnectionFeatures() public async Task CheckHttpConnectionFeatures()
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var hubConnection = new HubConnectionBuilder() var hubConnection = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1760,7 +1760,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[Fact] [Fact]
public async Task UserIdProviderCanAccessHttpContext() public async Task UserIdProviderCanAccessHttpContext()
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var hubConnection = new HubConnectionBuilder() var hubConnection = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1791,7 +1791,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[Fact] [Fact]
public async Task NegotiationSkipsServerSentEventsWhenUsingBinaryProtocol() public async Task NegotiationSkipsServerSentEventsWhenUsingBinaryProtocol()
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
var hubConnectionBuilder = new HubConnectionBuilder() var hubConnectionBuilder = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1821,7 +1821,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[Fact] [Fact]
public async Task StopCausesPollToReturnImmediately() public async Task StopCausesPollToReturnImmediately()
{ {
using (var server = await StartServer<Startup>()) await using (var server = await StartServer<Startup>())
{ {
PollTrackingMessageHandler pollTracker = null; PollTrackingMessageHandler pollTracker = null;
var hubConnection = new HubConnectionBuilder() var hubConnection = new HubConnectionBuilder()
@ -1869,7 +1869,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
writeContext.EventId.Name == "ReconnectingWithError"; writeContext.EventId.Name == "ReconnectingWithError";
} }
using (var server = await StartServer<Startup>(ExpectedErrors)) await using (var server = await StartServer<Startup>(ExpectedErrors))
{ {
var connection = CreateHubConnection( var connection = CreateHubConnection(
server.Url, server.Url,
@ -1931,7 +1931,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
writeContext.EventId.Name == "ReconnectingWithError"; writeContext.EventId.Name == "ReconnectingWithError";
} }
using (var server = await StartServer<Startup>(ExpectedErrors)) await using (var server = await StartServer<Startup>(ExpectedErrors))
{ {
var connection = new HubConnectionBuilder() var connection = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -1991,7 +1991,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
writeContext.EventId.Name == "ReconnectingWithError"; writeContext.EventId.Name == "ReconnectingWithError";
} }
using (var server = await StartServer<Startup>(ExpectedErrors)) await using (var server = await StartServer<Startup>(ExpectedErrors))
{ {
var connectionBuilder = new HubConnectionBuilder() var connectionBuilder = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)

View File

@ -35,7 +35,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[MemberData(nameof(TransportTypes))] [MemberData(nameof(TransportTypes))]
public async Task ClientUsingOldCallWithOriginalProtocol(HttpTransportType transportType) public async Task ClientUsingOldCallWithOriginalProtocol(HttpTransportType transportType)
{ {
using (var server = await StartServer<VersionStartup>()) await using (var server = await StartServer<VersionStartup>())
{ {
var connectionBuilder = new HubConnectionBuilder() var connectionBuilder = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -67,7 +67,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[MemberData(nameof(TransportTypes))] [MemberData(nameof(TransportTypes))]
public async Task ClientUsingOldCallWithNewProtocol(HttpTransportType transportType) public async Task ClientUsingOldCallWithNewProtocol(HttpTransportType transportType)
{ {
using (var server = await StartServer<VersionStartup>()) await using (var server = await StartServer<VersionStartup>())
{ {
var connectionBuilder = new HubConnectionBuilder() var connectionBuilder = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)
@ -100,7 +100,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[MemberData(nameof(TransportTypes))] [MemberData(nameof(TransportTypes))]
public async Task ClientUsingNewCallWithNewProtocol(HttpTransportType transportType) public async Task ClientUsingNewCallWithNewProtocol(HttpTransportType transportType)
{ {
using (var server = await StartServer<VersionStartup>()) await using (var server = await StartServer<VersionStartup>())
{ {
var httpConnectionFactory = new HttpConnectionFactory( var httpConnectionFactory = new HttpConnectionFactory(
Options.Create(new HttpConnectionOptions Options.Create(new HttpConnectionOptions
@ -166,7 +166,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
return writeContext.LoggerName == typeof(HubConnection).FullName; return writeContext.LoggerName == typeof(HubConnection).FullName;
} }
using (var server = await StartServer<VersionStartup>(ExpectedErrors)) await using (var server = await StartServer<VersionStartup>(ExpectedErrors))
{ {
var connectionBuilder = new HubConnectionBuilder() var connectionBuilder = new HubConnectionBuilder()
.WithLoggerFactory(LoggerFactory) .WithLoggerFactory(LoggerFactory)

View File

@ -13,7 +13,6 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests
public class TimerAwaitableTests public class TimerAwaitableTests
{ {
[Fact] [Fact]
[QuarantinedTest]
public async Task FinalizerRunsIfTimerAwaitableReferencesObject() public async Task FinalizerRunsIfTimerAwaitableReferencesObject()
{ {
var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);

View File

@ -78,7 +78,7 @@
<PropertyGroup> <PropertyGroup>
<!-- Pass the Java Package Version down to Gradle --> <!-- Pass the Java Package Version down to Gradle -->
<GradleOptions Condition="'$(ContinuousIntegrationBuild)' == 'true'">$(GradleOptions) -PpackageVersion="$(PackageVersion)"</GradleOptions> <GradleOptions>$(GradleOptions) -PpackageVersion="$(PackageVersion)"</GradleOptions>
<HelixCommand>chmod +x ./gradlew &amp;&amp; ./gradlew $(GradleOptions) test</HelixCommand> <HelixCommand>chmod +x ./gradlew &amp;&amp; ./gradlew $(GradleOptions) test</HelixCommand>
<HelixCommand Condition="'$(IsWindowsHelixQueue)' == 'true'">call gradlew $(GradleOptions) test</HelixCommand> <HelixCommand Condition="'$(IsWindowsHelixQueue)' == 'true'">call gradlew $(GradleOptions) test</HelixCommand>
</PropertyGroup> </PropertyGroup>

View File

@ -6,6 +6,6 @@ package com.microsoft.signalr;
class Version { class Version {
public static String getDetailedVersion() { public static String getDetailedVersion() {
return "99.99.99-dev"; return "5.0.0-dev";
} }
} }

View File

@ -5,7 +5,9 @@ using System;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Win32; using Microsoft.Win32;
@ -13,7 +15,7 @@ namespace FunctionalTests
{ {
public class Program public class Program
{ {
public static void Main(string[] args) public static Task Main(string[] args)
{ {
string url = null; string url = null;
for (var i = 0; i < args.Length; i++) for (var i = 0; i < args.Length; i++)
@ -27,65 +29,69 @@ namespace FunctionalTests
} }
} }
var hostBuilder = new WebHostBuilder() var hostBuilder = new HostBuilder()
.ConfigureLogging(factory => .ConfigureWebHost(webHostBuilder =>
{ {
factory.AddConsole(options => webHostBuilder
.ConfigureLogging(factory =>
{ {
options.IncludeScopes = true; factory.AddConsole(options =>
options.TimestampFormat = "[HH:mm:ss] ";
options.UseUtcTimestamp = true;
});
factory.AddDebug();
factory.SetMinimumLevel(LogLevel.Debug);
})
.UseKestrel((builderContext, options) =>
{
options.ConfigureHttpsDefaults(httpsOptions =>
{
bool useRSA = false;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{ {
// Detect Win10+ options.IncludeScopes = true;
var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion"); options.TimestampFormat = "[HH:mm:ss] ";
var major = key.GetValue("CurrentMajorVersionNumber") as int?; options.UseUtcTimestamp = true;
var minor = key.GetValue("CurrentMinorVersionNumber") as int?; });
factory.AddDebug();
factory.SetMinimumLevel(LogLevel.Debug);
})
.UseKestrel((builderContext, options) =>
{
options.ConfigureHttpsDefaults(httpsOptions =>
{
bool useRSA = false;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
// Detect Win10+
var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
var major = key.GetValue("CurrentMajorVersionNumber") as int?;
var minor = key.GetValue("CurrentMinorVersionNumber") as int?;
if (major.HasValue && minor.HasValue) if (major.HasValue && minor.HasValue)
{
useRSA = true;
}
}
else
{ {
useRSA = true; useRSA = true;
} }
}
else
{
useRSA = true;
}
if (useRSA) if (useRSA)
{ {
// RSA cert, won't work on Windows 8.1 & Windows 2012 R2 using HTTP2, and ECC won't work in some Node environments // RSA cert, won't work on Windows 8.1 & Windows 2012 R2 using HTTP2, and ECC won't work in some Node environments
var certPath = Path.Combine(Directory.GetCurrentDirectory(), "testCert.pfx"); var certPath = Path.Combine(Directory.GetCurrentDirectory(), "testCert.pfx");
httpsOptions.ServerCertificate = new X509Certificate2(certPath, "testPassword"); httpsOptions.ServerCertificate = new X509Certificate2(certPath, "testPassword");
} }
else else
{ {
// ECC cert, works on Windows 8.1 & Windows 2012 R2 using HTTP2 // ECC cert, works on Windows 8.1 & Windows 2012 R2 using HTTP2
var certPath = Path.Combine(Directory.GetCurrentDirectory(), "testCertECC.pfx"); var certPath = Path.Combine(Directory.GetCurrentDirectory(), "testCertECC.pfx");
httpsOptions.ServerCertificate = new X509Certificate2(certPath, "testPassword"); httpsOptions.ServerCertificate = new X509Certificate2(certPath, "testPassword");
} }
}); });
}) })
.UseContentRoot(Directory.GetCurrentDirectory()) .UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration() .UseIISIntegration()
.UseStartup<Startup>(); .UseStartup<Startup>();
if (!string.IsNullOrEmpty(url)) if (!string.IsNullOrEmpty(url))
{ {
Console.WriteLine($"Forcing URL to: {url}"); Console.WriteLine($"Forcing URL to: {url}");
hostBuilder.UseUrls(url); webHostBuilder.UseUrls(url);
} }
});
hostBuilder.Build().Run(); return hostBuilder.Build().RunAsync();
} }
} }
} }

View File

@ -13,11 +13,13 @@ using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Cors.Infrastructure; using Microsoft.AspNetCore.Cors.Infrastructure;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Hosting.Server.Features; using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.SignalR.Tests; using Microsoft.AspNetCore.SignalR.Tests;
using Microsoft.AspNetCore.Testing; using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
@ -305,7 +307,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests
[WebSocketsSupportedCondition] [WebSocketsSupportedCondition]
public async Task MapConnectionHandlerWithWebSocketSubProtocolSetsProtocol() public async Task MapConnectionHandlerWithWebSocketSubProtocolSetsProtocol()
{ {
var host = BuildWebHost<MyConnectionHandler>("/socket", using var host = BuildWebHost<MyConnectionHandler>("/socket",
options => options.WebSockets.SubProtocolSelector = subprotocols => options => options.WebSockets.SubProtocolSelector = subprotocols =>
{ {
Assert.Equal(new[] { "protocol1", "protocol2" }, subprotocols.ToArray()); Assert.Equal(new[] { "protocol1", "protocol2" }, subprotocols.ToArray());
@ -314,7 +316,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests
await host.StartAsync(); await host.StartAsync();
var feature = host.ServerFeatures.Get<IServerAddressesFeature>(); var feature = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>();
var address = feature.Addresses.First().Replace("http", "ws") + "/socket"; var address = feature.Addresses.First().Replace("http", "ws") + "/socket";
var client = new ClientWebSocket(); var client = new ClientWebSocket();
@ -377,44 +379,52 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests
} }
} }
private IWebHost BuildWebHost(Action<IEndpointRouteBuilder> configure) private IHost BuildWebHost(Action<IEndpointRouteBuilder> configure)
{ {
return new WebHostBuilder() return new HostBuilder()
.UseKestrel() .ConfigureWebHost(webHostBuilder =>
.ConfigureServices(services =>
{ {
services.AddConnections(); webHostBuilder
.UseKestrel()
.ConfigureServices(services =>
{
services.AddConnections();
})
.Configure(app =>
{
app.UseRouting();
app.UseEndpoints(endpoints => configure(endpoints));
})
.UseUrls("http://127.0.0.1:0");
}) })
.Configure(app =>
{
app.UseRouting();
app.UseEndpoints(endpoints => configure(endpoints));
})
.UseUrls("http://127.0.0.1:0")
.Build(); .Build();
} }
private IWebHost BuildWebHost<TConnectionHandler>(string path, Action<HttpConnectionDispatcherOptions> configureOptions) where TConnectionHandler : ConnectionHandler private IHost BuildWebHost<TConnectionHandler>(string path, Action<HttpConnectionDispatcherOptions> configureOptions) where TConnectionHandler : ConnectionHandler
{ {
return new WebHostBuilder() return new HostBuilder()
.UseUrls("http://127.0.0.1:0") .ConfigureWebHost(webHostBuilder =>
.UseKestrel()
.ConfigureServices(services =>
{ {
services.AddConnections(); webHostBuilder
}) .UseUrls("http://127.0.0.1:0")
.Configure(app => .UseKestrel()
{ .ConfigureServices(services =>
app.UseRouting();
app.UseEndpoints(routes =>
{ {
routes.MapConnectionHandler<TConnectionHandler>(path, configureOptions); services.AddConnections();
})
.Configure(app =>
{
app.UseRouting();
app.UseEndpoints(routes =>
{
routes.MapConnectionHandler<TConnectionHandler>(path, configureOptions);
});
})
.ConfigureLogging(factory =>
{
factory.AddXunit(_output, LogLevel.Trace);
}); });
}) })
.ConfigureLogging(factory =>
{
factory.AddXunit(_output, LogLevel.Trace);
})
.Build(); .Build();
} }
} }

View File

@ -9,16 +9,16 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Hosting.Server.Features; using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Testing; using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Testing;
namespace Microsoft.AspNetCore.SignalR.Tests namespace Microsoft.AspNetCore.SignalR.Tests
{ {
public abstract class InProcessTestServer : IDisposable public abstract class InProcessTestServer : IAsyncDisposable
{ {
internal abstract event Action<LogRecord> ServerLogged; internal abstract event Action<LogRecord> ServerLogged;
@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
public abstract string Url { get; } public abstract string Url { get; }
public abstract void Dispose(); public abstract ValueTask DisposeAsync();
} }
public class InProcessTestServer<TStartup> : InProcessTestServer public class InProcessTestServer<TStartup> : InProcessTestServer
@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
{ {
private readonly ILoggerFactory _loggerFactory; private readonly ILoggerFactory _loggerFactory;
private readonly ILogger _logger; private readonly ILogger _logger;
private IWebHost _host; private IHost _host;
private IHostApplicationLifetime _lifetime; private IHostApplicationLifetime _lifetime;
private readonly IDisposable _logToken; private readonly IDisposable _logToken;
private readonly IDisposable _extraDisposable; private readonly IDisposable _extraDisposable;
@ -91,15 +91,18 @@ namespace Microsoft.AspNetCore.SignalR.Tests
// We're using 127.0.0.1 instead of localhost to ensure that we use IPV4 across different OSes // We're using 127.0.0.1 instead of localhost to ensure that we use IPV4 across different OSes
var url = "http://127.0.0.1:0"; var url = "http://127.0.0.1:0";
_host = new WebHostBuilder() _host = new HostBuilder()
.ConfigureLogging(builder => builder .ConfigureWebHost(webHostBuilder =>
{
webHostBuilder
.ConfigureLogging(builder => builder
.SetMinimumLevel(LogLevel.Trace) .SetMinimumLevel(LogLevel.Trace)
.AddProvider(new ForwardingLoggerProvider(_loggerFactory))) .AddProvider(new ForwardingLoggerProvider(_loggerFactory)))
.UseStartup(typeof(TStartup)) .UseStartup(typeof(TStartup))
.UseKestrel() .UseKestrel()
.UseUrls(url) .UseUrls(url)
.UseContentRoot(Directory.GetCurrentDirectory()) .UseContentRoot(Directory.GetCurrentDirectory());
.Build(); }).Build();
_logger.LogInformation("Starting test server..."); _logger.LogInformation("Starting test server...");
var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30)); var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
@ -116,7 +119,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
_logger.LogInformation("Test Server started"); _logger.LogInformation("Test Server started");
// Get the URL from the server // Get the URL from the server
_url = _host.ServerFeatures.Get<IServerAddressesFeature>().Addresses.Single(); _url = _host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single();
_lifetime = _host.Services.GetRequiredService<IHostApplicationLifetime>(); _lifetime = _host.Services.GetRequiredService<IHostApplicationLifetime>();
_lifetime.ApplicationStopped.Register(() => _lifetime.ApplicationStopped.Register(() =>
@ -144,12 +147,19 @@ namespace Microsoft.AspNetCore.SignalR.Tests
return builder.ToString(); return builder.ToString();
} }
public override void Dispose() public override async ValueTask DisposeAsync()
{ {
_extraDisposable?.Dispose(); try
_logger.LogInformation("Shutting down test server"); {
_host.Dispose(); _extraDisposable?.Dispose();
_loggerFactory.Dispose(); _logger.LogInformation("Start shutting down test server");
}
finally
{
await _host.StopAsync();
_host.Dispose();
_loggerFactory.Dispose();
}
} }
private class ForwardingLoggerProvider : ILoggerProvider private class ForwardingLoggerProvider : ILoggerProvider

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>

View File

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

View File

@ -1,29 +1,35 @@
// 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO; using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace JwtSample namespace JwtSample
{ {
public class Program public class Program
{ {
public static void Main(string[] args) public static Task Main(string[] args)
{ {
new WebHostBuilder() return Host.CreateDefaultBuilder(args)
.ConfigureLogging(factory => .ConfigureWebHost(webHostBuilder =>
{ {
factory.AddConsole(); webHostBuilder
factory.AddFilter("Console", level => level >= LogLevel.Information); .ConfigureLogging(factory =>
factory.AddDebug(); {
factory.AddConsole();
factory.AddFilter("Console", level => level >= LogLevel.Information);
factory.AddDebug();
})
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>();
}) })
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build() .Build()
.Run(); .RunAsync();
} }
} }
} }

View File

@ -3,9 +3,11 @@
using System.IO; using System.IO;
using System.Net; using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using SignalRSamples.Hubs; using SignalRSamples.Hubs;
@ -13,36 +15,40 @@ namespace SignalRSamples
{ {
public class Program public class Program
{ {
public static void Main(string[] args) public static Task Main(string[] args)
{ {
var config = new ConfigurationBuilder() var config = new ConfigurationBuilder()
.AddCommandLine(args) .AddCommandLine(args)
.Build(); .Build();
var host = new WebHostBuilder() var host = Host.CreateDefaultBuilder(args)
.UseConfiguration(config) .ConfigureWebHost(webHostBuilder =>
.UseSetting(WebHostDefaults.PreventHostingStartupKey, "true")
.ConfigureLogging(factory =>
{ {
factory.AddConsole(); webHostBuilder
}) .UseConfiguration(config)
.UseKestrel(options => .UseSetting(WebHostDefaults.PreventHostingStartupKey, "true")
{ .ConfigureLogging((c, factory) =>
// Default port
options.ListenLocalhost(5000);
// Hub bound to TCP end point
options.Listen(IPAddress.Any, 9001, builder =>
{ {
builder.UseHub<Chat>(); factory.AddConfiguration(c.Configuration.GetSection("Logging"));
}); factory.AddConsole();
}) })
.UseContentRoot(Directory.GetCurrentDirectory()) .UseKestrel(options =>
.UseIISIntegration() {
.UseStartup<Startup>() // Default port
.Build(); options.ListenLocalhost(5000);
host.Run(); // Hub bound to TCP end point
options.Listen(IPAddress.Any, 9001, builder =>
{
builder.UseHub<Chat>();
});
})
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>();
}).Build();
return host.RunAsync();
} }
} }
} }

View File

@ -2,29 +2,35 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO; using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace SocialWeather namespace SocialWeather
{ {
public class Program public class Program
{ {
public static void Main(string[] args) public static Task Main(string[] args)
{ {
var host = new WebHostBuilder() var host = Host.CreateDefaultBuilder(args)
.UseSetting(WebHostDefaults.PreventHostingStartupKey, "true") .ConfigureWebHost(webHostBuilder =>
.ConfigureLogging(factory =>
{ {
factory.AddConsole(); webHostBuilder
factory.AddFilter("Console", level => level >= LogLevel.Information); .UseSetting(WebHostDefaults.PreventHostingStartupKey, "true")
.ConfigureLogging(factory =>
{
factory.AddConsole();
factory.AddFilter("Console", level => level >= LogLevel.Information);
})
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>();
}) })
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build(); .Build();
host.Run(); return host.RunAsync();
} }
} }
} }

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