Commit Graph

657 Commits

Author SHA1 Message Date
Matt Mitchell ae430f3dab Merged PR 12027: [internal/release/5.0] Feed update
Feed update
2021-01-14 15:33:07 +00:00
Hao Kung 6108c0d03e
Fix SignInResult with default scheme (#27531)
Description
Fixes #27494

A community PR introduced new overloads to ControllerBase for SignIn. The new overload throws due to an existing check which blocks when the scheme is null. The fix is to remove this unnecessary check. Note SignOutResult already had test coverage for this usage and is unaffected

Customer Impact
The bug was reported by a customer trying to use the new overload. The fix enables the method to be used.

Regression?
No

Risk
Low as this is a new API, and the api was unuseable in its current form.
2020-11-13 12:02:59 -08:00
Doug Bunting 415875625c
[release/5.0] Update API baseline files (#27653)
* Move all PublicAPI.Unshipped.txt files to PublicAPI.Shipped.txt
- we have now shipped this API surface

* Add eng/PublicAPI.empty.txt file
- make it easier to add new implementation projects

* Add missing public API baseline files
- #26784 part 1/2
- a few unexpected files turned up missing beyond the #26784 list…

* Reference Microsoft.CodeAnalysis.PublicApiAnalyzers more often
- #27484 part 2/2
- emit errors when API baseline files are missing
- update categorization of some projects
  - specification tests are not implementation projects
    - but _were_ project reference providers (keep that)
  - correct `$(IsTestAssetProject)` setting for Razor shims et cetera
  - correct `$(IsSampleProject)` setting for casing of some Sample directories
  - Microsoft.AspNetCore.Analyzer.Testing should be treated as test asset
- add `$(AddPublicApiAnalyzers)` property to support overrides
  - e.g. for `msbuild` task projects and tools

nit:
- remove useless `$(IsTestProject)` setting in a specification test project
- wrap some long `Condition`s

* Do not run public API analyzer in `RazorCoreCompile` target

* Remove old `$(EnableApiCheck)` settings
- property does nothing
- also remove a dangling ApiCheck comment
2020-11-12 10:28:52 -08:00
Eric StJohn 4d47720df2
Ensure AppLocalResolver handles package with multiple libs (#27751)
* Ensure AppLocalResolver handles package with multiple libs

This was failing to pass references to a package which contains more
than one lib.

* Use `AppBaseCompilationAssemblyResolver` in `DiagnosticProject`

* Fix, then reduce use of `TestPathUtilities.GetSolutionRootDirectory(...)` (#27404)

- do not traverse up past the `$(RepoRoot)` when running tests locally
  - if `$(RepoRoot)` is reached, search down for named `*.slnf` file
  - find `*.slnf` file when `$(OutputPath)` is under artifacts/bin/
- analyzer test projects publish needed files anyhow
  - remove `GetProjectDirectory()` helpers

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
2020-11-12 10:09:40 -08:00
Doug Bunting 8399c9f3f9
!!! Correct condition controlling `public` API analysis !!! (#26797)
* !!! Correct condition controlling `public` API analysis !!!
-  #26785 demonstrated analyzers were inoperable

* Remove unused `public` API files

* Update `public` API files
- three Components files were missing `#nullable enable`
- `nullable` annotations missing or out-of-date elsewhere

* Ignore `public` API files completely during source build
- do not warn about unused files

* Update more `public` API files
2020-10-12 11:07:18 -07:00
Hao Kung 5e2259f4bb
Add MVC.Core api docs (#26469)
* Add docs

* Add api docs

* Add xml doc

* Reenable warnings on identity projects

* Razor pages docs

* Add doc

* Missed files

* Add docs

* Apply suggestions from code review

Co-authored-by: Safia Abdalla <safia@microsoft.com>

* Apply suggestions from code review

Co-authored-by: Safia Abdalla <safia@microsoft.com>

* PR feedback

* Update src/Mvc/Mvc.Core/src/ConsumesAttribute.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update src/Mvc/Mvc.Core/src/ModelBinding/Validation/ValidationVisitor.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update src/Mvc/Mvc.Core/src/Routing/UrlHelperBase.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update src/Mvc/Mvc.Core/src/ModelBinding/Validation/ValidationVisitor.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update src/Mvc/Mvc.Core/src/Infrastructure/FileResultExecutorBase.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update src/Mvc/Mvc.RazorPages/src/DependencyInjection/MvcRazorPagesMvcCoreBuilderExtensions.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update src/Mvc/Mvc.Core/src/Routing/UrlHelperBase.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update src/Mvc/Mvc.RazorPages/src/DependencyInjection/MvcRazorPagesMvcCoreBuilderExtensions.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update src/Mvc/Mvc.Core/src/Routing/UrlHelperBase.cs

Co-authored-by: Pranav K <prkrishn@hotmail.com>

* Update ValidationVisitor.cs

Co-authored-by: Safia Abdalla <safia@microsoft.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-10-01 16:02:15 -07:00
Pranav K da3f97b0ad
Fix client validation for record types (#26159)
* Fix client validation for record types

Server validation for record types uses metadata from parameters
when validating record type properties. However client validation
does not use the parameter to harvest client validation attributes.

In the absence of this change, validation on parameters would require server
round trips which is unexcepted and not at parity with validation applied
to properties on regular classes or record types.

Validation experience with record types is subpar and requires server
round trips.

No. This feature is new to 5.0.

Low. The change is isolated to record types and does not affect other code paths. We have
unit and functional test coverage to verify this change.

* Correctly dispose app after use
2020-09-22 22:02:49 -07:00
Javier Calvarro Nelson b1e1aabc9d [Mvc] Fix global state in controller and action endpoint data sources.
* Create data sources "per router" instance.
* Make a global shared order sequence "per router" for conventional and
  controller and page routes.
* Create DynamicControllerEndpointSelector and DynamicPageEndpointSelector
  instances per data source.
2020-09-12 10:03:32 -07:00
Javier Calvarro Nelson a17842a2e4 [Mvc] Add support for order in dynamic controller routes (#25073)
* Order defaults to 1 same as conventional routes
* An incremental order is applied to dynamic routes as they are defined.
2020-09-12 10:03:32 -07:00
Pranav K 09160a779f
Use JsonSerializerDefaults instead of specifying individual options (#25747)
This lets MVC use the defaults as specified by System.Text.Json. Right now, these defaults are identical
to the two properties that were removed. However this allows MVC to pick up new S.T.J defaults in 6.0 including when
users attempt to use a 6.0 versioned package with 5.0
2020-09-10 11:54:00 -07:00
Pranav K 12c016567c
Reject control characters in IsLocalUrl check (#25378)
Fixes https://github.com/dotnet/aspnetcore/issues/18109
2020-09-02 23:37:46 -07:00
Safia Abdalla bb62621f37
Add guard checks to PageLoaderMatcherPolicy when loader returns asynchronously (#25370) 2020-08-31 10:16:36 -07:00
Artak 0ebd5f040b
Merge pull request #25277 from dotnet/prkrishn/nullability-feedback
Address nullability feedback
2020-08-28 15:30:22 -07:00
Pranav K 7686c0b4e7
Record type follow ups: (#25218)
* Record type follow ups:

* Throw an error if a record type property has validation metadata
* Disallow TryUpdateModel on a top-level record type
* Ignore previously specified model value when binding a record type
* Unskip record type tests
* Clean up record type detection

* Update src/Mvc/Mvc.Abstractions/src/Resources.resx

Co-authored-by: James Newton-King <james@newtonking.com>

* Fixup tests

* Update src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelMetadata.cs

* Update src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelMetadata.cs

* Update src/Mvc/Mvc.Abstractions/src/Resources.resx

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>

* Update src/Mvc/Mvc.Core/src/Resources.resx

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
2020-08-28 09:42:11 -07:00
Pranav K 87a51a358a
Merge branch 'release/5.0' into prkrishn/nullability-feedback 2020-08-26 16:38:48 -07:00
Pranav K 00bbb78d3c
Address nullability feedback
Fixes https://github.com/dotnet/aspnetcore/issues/25275
2020-08-26 09:55:27 -07:00
Javier Calvarro Nelson 402dc41d33
[Blazor] Render Blazor Webassembly components from MVC (#25203)
* Server pieces

* Changes for prerendering

* Discover client components

* tmp

* Cleanup

* Cleanups

* Undo changes

* Remove unwanted changes

* Move interop class to its own file

* Cleanup unwanted changes

* Add test rendering multiple client-side components

* Unit tests and E2E tests

* Cleanups

* Addressed feedback

* Rename Client to WebAssembly in RenderMode

* Update generated js files

* Cleaned up JS and addressed feedback

* Client->WebAssembly and other feedback

* Unify component discovery code and use webassembly instead of 'client'

* Update js files

* Fix tests
2020-08-25 09:30:24 -07:00
Pranav K 78a587b02e
Guard against client disconnect exceptions that appear when reading body (#25146)
* Guard against client disconnect exceptions that appear when performing ReadFormAsync

Reading the request body may throw an exception. This change adds some extra guards
for this and presents this as a 4xx response rather than a 5xx response.

* Add some tests

* Fixup test
2020-08-25 09:29:50 -07:00
Pranav K 3e8c5c48f0
Add support for views + SingleFileExe (#24925)
* Add support for views + SingleFileExe
2020-08-20 19:46:58 -07:00
Martin Costello b22512de0e
Right-size Lists when created (#23714)
Create new instances of List<T> with an appropriate capacity for the items that will be added.
Use Array.Empty<T>() where appropriate, rather than create an empty list and then return it.
2020-08-19 09:45:52 -07:00
Pranav K ad8a927e85
Changes per discussion. Add a test 2020-08-18 17:56:59 -07:00
Pranav K 2f0cf8d3e9
Add support for views + SingleFileExe 2020-08-18 17:52:37 -07:00
Pranav K 2d6fd453e2 Allow ProblemDetails \ ValidationProblemDetails to be more testable
Fixes https://github.com/dotnet/aspnetcore/issues/15166
2020-08-18 16:57:29 -07:00
Pranav K 512a49c401
Add support for model binding DateTime as UTC (#24893)
* Add support for model binding DateTime as UTC

Fixes https://github.com/dotnet/aspnetcore/issues/11584

* Make test work in other TZs

* Changes per PR comments

* Cleanup unused exception code path, fix doc comments
* Clean up usage of variables
* Adjust logging to be consistent

* Apply suggestions from code review
2020-08-18 04:04:27 +00:00
Youssef Victor 60cb3bb5c4
Fix warnings in analyzer packages (#24837) 2020-08-13 14:49:47 -07:00
Mark Seemann 9f0ae10cab
[Mvc] Remove 'absolute' from documentation of Action (#23695)
The generated urls are host relative in most cases, so correcting the documentation to reflect that.
2020-08-13 09:18:29 -07:00
Levi Broderick bbf7c8780c
Clean up some usage of SHA1 and SHA256 in the code base (#24696)
* AntiForgery: Use SHA256 one-shot

* AuthN: Use SHA256 one-shot APIs

* MVC/Razor: Cleanup SHA256 references

* WebSockets: Use SHA1 one-shots

* dotnet-openapi: Use preferred SHA256 factory

* SignalR: Prefer RNG.Fill over RNG.GetBytes
2020-08-10 14:26:41 -07:00
dotnet-maestro[bot] 927ddab349
[master] Update dependencies from dotnet/runtime dotnet/efcore (#24717)
* Update dependencies from https://github.com/dotnet/runtime build 20200808.3

System.ComponentModel.Annotations , System.Diagnostics.DiagnosticSource , System.Diagnostics.EventLog , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Options , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Primitives , Microsoft.Extensions.Internal.Transport , Microsoft.Extensions.Http , Microsoft.Extensions.Hosting , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.Configuration.Xml , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Hosting.Abstractions , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.Platforms , Microsoft.Win32.Registry , Microsoft.Win32.SystemEvents , Microsoft.NETCore.App.Internal , Microsoft.NETCore.App.Ref , System.Drawing.Common , System.Text.Encodings.Web , System.Text.Json , System.Threading.Channels , System.Windows.Extensions , System.ServiceProcess.ServiceController , System.Security.Principal.Windows , System.IO.Pipelines , System.Net.Http.Json , System.Net.Http.WinHttpHandler , System.Net.WebSockets.WebSocketProtocol , System.Reflection.Metadata , System.Resources.Extensions , System.Runtime.CompilerServices.Unsafe , System.Security.AccessControl , System.Security.Cryptography.Cng , System.Security.Cryptography.Pkcs , System.Security.Cryptography.Xml , System.Security.Permissions
 From Version 5.0.0-rc.1.20406.11 -> To Version 5.0.0-rc.1.20408.3

* Update dependencies from https://github.com/dotnet/runtime build 20200809.3

System.ComponentModel.Annotations , System.Diagnostics.DiagnosticSource , System.Diagnostics.EventLog , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Options , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Primitives , Microsoft.Extensions.Internal.Transport , Microsoft.Extensions.Http , Microsoft.Extensions.Hosting , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.Configuration.Xml , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Hosting.Abstractions , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.Platforms , Microsoft.Win32.Registry , Microsoft.Win32.SystemEvents , Microsoft.NETCore.App.Internal , Microsoft.NETCore.App.Ref , System.Drawing.Common , System.Text.Encodings.Web , System.Text.Json , System.Threading.Channels , System.Windows.Extensions , System.ServiceProcess.ServiceController , System.Security.Principal.Windows , System.IO.Pipelines , System.Net.Http.Json , System.Net.Http.WinHttpHandler , System.Net.WebSockets.WebSocketProtocol , System.Reflection.Metadata , System.Resources.Extensions , System.Runtime.CompilerServices.Unsafe , System.Security.AccessControl , System.Security.Cryptography.Cng , System.Security.Cryptography.Pkcs , System.Security.Cryptography.Xml , System.Security.Permissions
 From Version 5.0.0-rc.1.20406.11 -> To Version 5.0.0-rc.1.20409.3

* Update dependencies from https://github.com/dotnet/efcore build 20200810.1

Microsoft.EntityFrameworkCore.Tools , Microsoft.EntityFrameworkCore.SqlServer , dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.InMemory
 From Version 5.0.0-rc.1.20406.4 -> To Version 5.0.0-rc.1.20410.1

* Update dependencies from https://github.com/dotnet/efcore build 20200810.2

Microsoft.EntityFrameworkCore.Tools , Microsoft.EntityFrameworkCore.SqlServer , dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.InMemory
 From Version 5.0.0-rc.1.20406.4 -> To Version 5.0.0-rc.1.20410.2

* React to S.T.Json changes

* Update LangVersion=9.0 in the repo to use T?
* Remove LangVersion project project files

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-08-10 19:50:18 +00:00
David Fowler 24f35bc76f
Update ReferenceEqualityComparer.cs (#24728)
We don't support running on mono 4.x anymore
2020-08-10 09:08:45 -07:00
dotnet-maestro[bot] f52077f599
[master] Update dependencies from dotnet/runtime dotnet/efcore (#24496)
* React to SDK changes

* Skip instead of quar

* Rely on transitive Microsoft.Bcl.AsyncInterfaces since it's now part of DependencyInjection.
    - This was introduced as part of: https://github.com/dotnet/runtime/pull/40189
    - Prior to this we'd get version conflicts for our referenced Bcl.AsyncInterfaces.

* Update global.json
    - move to RC1 SDK

* React to runtime nullability changes with DataAnnotations.
    - ValidationResult was updated to declare its nullability: a9009db46e (diff-8e86bc8fee3eb0242c5b8368dfabe065)

* Stop using HttpRequestMessage.Properties in favor of non-obsoleted HttpRequestMessage.Options.
    - Introduced in 3eda592cf4

* Stop using more HttpRequestMessage.Properties in Component's web assembly project.
    - Introduced in dotnet/runtime@3eda592

* Update dependencies from https://github.com/dotnet/runtime build 20200804.16

System.ComponentModel.Annotations , System.Diagnostics.DiagnosticSource , System.Diagnostics.EventLog , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Options , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Primitives , Microsoft.Extensions.Internal.Transport , Microsoft.Extensions.Http , Microsoft.Extensions.Hosting , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.Configuration.Xml , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Hosting.Abstractions , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.Platforms , Microsoft.Win32.Registry , Microsoft.Win32.SystemEvents , Microsoft.NETCore.App.Internal , Microsoft.NETCore.App.Ref , System.Drawing.Common , System.Text.Encodings.Web , System.Text.Json , System.Threading.Channels , System.Windows.Extensions , System.ServiceProcess.ServiceController , System.Security.Principal.Windows , System.IO.Pipelines , System.Net.Http.Json , System.Net.Http.WinHttpHandler , System.Net.WebSockets.WebSocketProtocol , System.Reflection.Metadata , System.Resources.Extensions , System.Runtime.CompilerServices.Unsafe , System.Security.AccessControl , System.Security.Cryptography.Cng , System.Security.Cryptography.Pkcs , System.Security.Cryptography.Xml , System.Security.Permissions
 From Version 5.0.0-rc.1.20370.4 -> To Version 5.0.0-rc.1.20404.16

* Ignitor to 5.0

* Constants

* Update dependencies from https://github.com/dotnet/efcore build 20200805.3

Microsoft.EntityFrameworkCore.Tools , Microsoft.EntityFrameworkCore.SqlServer , dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.InMemory
 From Version 5.0.0-rc.1.20372.13 -> To Version 5.0.0-rc.1.20405.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
Co-authored-by: wtgodbe <wigodbe@microsoft.com>
Co-authored-by: N. Taylor Mullen <nimullen@microsoft.com>
Co-authored-by: Justin Kotalik <jukotali@microsoft.com>
2020-08-05 18:42:25 -07:00
WuYafeng 748798889b
Fix:ControllerLinkGeneratorExtensions.GetAmbientValues throws NullReferenceException (#24576)
- related issue #24412
- add null check on GetAmbientValues(HttpContext)
2020-08-05 09:33:31 -07:00
David Fowler 1f5149a663
Implement CopyToAsync in the FileBufferingReadStream (#24499)
* Implement CopyToAsync in the FileBufferingReadStream
- overrride Span and Memory overloads and implement array overloads in terms of those overloads.
- Implemented CopyToAsync (but not CopyTo)
- Added tests

Fixes #24032
2020-08-03 14:14:42 -07:00
William Godbe cf728173d1
Quarantine failing test (#24415)
* Quarantine failing test

* Update DefaultControllerFactoryTest.cs
2020-07-29 15:51:44 -07:00
Tanay Parikh b094ecddf0
Create PublicAPI.Unshipped.txt (#24299)
* Updated PublicAPI.Unshipped

* Improve record type detection

Support both forms of Clone methods to detect record types

Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-07-25 00:44:58 +00:00
Tanay Parikh 3ea1fc7aac
Merge pull request #24258 from dotnet-maestro-bot/merge/release/5.0-preview8-to-master
[automated] Merge branch 'release/5.0-preview8' => 'master'
2020-07-24 11:11:33 -07:00
Doug Bunting 918d953767
Use Microsoft.CodeAnalysis.PublicApiAnalyzers (#24188)
* Use Microsoft.CodeAnalysis.PublicApiAnalyzers
    - #4259 1/2
    - followup 2/3 for 5266918ed2
    - includes baselines for 16 MVC projects
      - will automated further additions in another PR
    - suppress warnings that may cause back-compat problems if fixed

nit: sort `@(LatestPackageReference)` a bit better
2020-07-24 09:45:11 -07:00
Pranav K 088a6fa1ec
Add support for binding record types (#23976)
* Add support for binding record types

* PR feedback

* PR changes

* Changes per PR comments

* Changes per PR comments

* Update src/Mvc/Mvc.Core/src/Resources.resx

* Apply suggestions from code review

* Add some more tests

* Undo blazor.server.js changes

* Fixup test
2020-07-24 08:45:06 -07:00
Ryan Nowak 6f37e8a552
[Mvc] Improved route value transformer (#21481)
* Apply suggestions from code review

Cleaned up error messages. Thanks @jamesnk, I totally overlooked the content.

Co-authored-by: James Newton-King <james@newtonking.com>

Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
Co-authored-by: James Newton-King <james@newtonking.com>
2020-07-22 15:44:51 -07:00
Doug Bunting 5266918ed2
Use Roslyn to create ref/ assemblies (#23403)
* Remove all ref/ projects

* Remove GenAPI infrastructure

* Remove notion of a reference assembly project
  - remove `$(IsReferenceAssemblyProject)`, `$(ReferenceReferenceAssemblies)` and `$(ReferenceImplementationAssemblies)`
    - remove unnecessary `$(NoWarn)` settings

nits:
- remove a few misleading comments
- wrap some long lines

* Move .0 package version workaround into Versions.props
  - touch up SharedFramework.External.props

* Expose `%(LatestPackageReference.RTMVersion)` metadata
  - automate use of properties in the `@(LatestPackageReference)` item group to make this maintainable
    - add a couple of special cases at the bottom of eng/Dependencies.props
    - add one more `$(...PackageVersion)` property to avoid yet-another special case

* Enable Roslyn reference assemblies
  - exclude ref/ assembly from packages other than targeting pack
  - update Microsoft.AspNetCore.App.Ref.csproj
    - `%(IsReferenceAssembly)` and `%(ReferenceGrouping)` metadata no longer relevant
    - only ref/ assemblies are in `@(ReferencePathWithRefAssemblies)` item group

nits:
  - remove now-unnecessary workaround
    - issues with TFM transition are behind us
  - clean up Microsoft.AspNetCore.App.Runtime.csproj slightly
    - use `GeneratePathProperty="true"`
        - reorder item / property settings for meta-expansion
    - correct spelling errors and phrasing in comments

* Update documentation to reflect recent changes
  - remove CrossRepoBreakingChanges.md; was tied to old TeamCity infrastructure
    - also much less relevant given repo merges
  - adjust details and examples in ReferenceResolution.md
    - reflect repo merges, Dependencies.props changes, and current Maestro++ channels
    - add a few more details e.g. specific files where Version.Details.xml versions are used

* !fixup! Remove another irrelevant doc file

* !fixup! Address PR review suggestions
  - convert a couple of warnings to errors
  - use consistent casing for Microsoft.NETCore.App.Runtime.* packages
  - reduce `%(LatestPackageReference.Version)` metadata special cases
  - add and improve comments e.g.
    - improve comments about `$(*V0PackageVersion)` properties
    - improve placement of comments about item removal in ResolveReferences.targets
    - confirmed `$(*V0PackageVersion)` property list is complete

nits:
- fix solution example in ReferenceResolution.md
- remove item group definition for `@(LatestPackageReference)`
- remove `%(LatestPackageReference.VersionName)` metadata after use; large item group
    - similarly, remove `%(LatestPackageReference.RTMVersion)` when not needed; just complicates `Condition`s

When I squash, I must remember this fixes
- #14801
- dotnet/aspnetcore-internal#2693

* Actually use `%(LatestPackageReference.RTMVersion)` metadata
  - gather RTM package references in a new project
    - a (very) separate project to work around package conflict resolution
    - empty `Test` target works around Arcade's testing approach
  - new target in ResolveReferences.targets updates relevant assembly paths to use the RTM packages
    - done as soon as possible after `ResolvePackageAssets` determines the paths
    - done for all compilation inputs, not just ref/ assemblies
2020-07-17 13:35:17 -07:00
Sean G. Wright d05427580b
Update MiddlewareFilterBuilder.cs (#23793)
Comment grammar typo for _pipelinesCache
2020-07-14 17:29:49 -07:00
Kahbazi 9d7c3aff96
[Mvc] Adds SignIn and SignOut method overloads without authentication scheme to ControllerBase (#23604) 2020-07-14 10:58:13 -07:00
Kevin Pilch 3117f43c33
Migrate to single sln file + slnf files (#23581) 2020-07-08 15:27:22 -07:00
Kevin Pilch 1da13e6501
Enable FxCop Analyzers for the repo (#23709)
All rules are currently disabled, except for one that I enabled for
src/Http via a new ".editorconfig" file I added there.

Other changes:

* Allow editorconfigs in MVC and Razor to flow to the root
* Consolidate a few editorconfig settings
* Tweak Ruleset config in Azure/AzureAD where it clashed.

Addresses the beginning of #9620, but it's a fair chunk of work to
enable most rules through the whole repo. That can be done directory by
directory and rule by rule by dropping .editorconfig files though.
2020-07-08 15:26:22 -07:00
Steve Sanderson 53588b45dc Updates to IComponentActivator PR 2020-07-07 19:27:21 +01:00
Mladen Macanović dae55edfec Add IComponentActivator 2020-07-07 19:27:21 +01:00
Martin Costello fd1f1c3559
Use preferred overloads of string.Split() (#23712)
* Use preferred overloads of string.Split

* Revert TrimEntries for netstandard2.0

Revert usage of StringSplit.TrimEntries for projects that target netstandard2.0.

Co-authored-by: Levi Broderick <levib@microsoft.com>
2020-07-06 16:49:38 -07:00
msftbot[bot] a738d1ccfb
Merge pull request #23717 from dotnet-maestro-bot/merge/release/5.0-preview7-to-master
[automated] Merge branch 'release/5.0-preview7' => 'master'
2020-07-06 23:41:07 +00:00
Ajay Bhargav B 7412976b4c
Update Roslyn package versions (#23630)
* Update Roslyn package versions

* Fixes

* Fix analyzer warnings

* Fix root cause for analyzer warnings

* Fixed RuntimeCompilation test

* Add back nowarns
2020-07-06 14:35:10 -07:00
Pranav K 9a4e6cf97c
Merge remote-tracking branch 'origin/release/5.0-preview7' 2020-07-02 11:42:14 -07:00
dotnet-maestro[bot] a4dd539b40
[master] Update dependencies from dotnet/runtime (#23563)
* Update dependencies from https://github.com/dotnet/runtime build 20200630.14

System.ComponentModel.Annotations , System.Diagnostics.DiagnosticSource , System.Diagnostics.EventLog , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Options , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Internal.Transport , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Primitives , Microsoft.Extensions.Http , Microsoft.Extensions.Hosting , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Hosting.Abstractions , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.Configuration.Xml , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Configuration.Json , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.Platforms , Microsoft.Win32.Registry , Microsoft.Win32.SystemEvents , Microsoft.NETCore.App.Internal , Microsoft.NETCore.App.Ref , System.Drawing.Common , System.Security.Principal.Windows , System.ServiceProcess.ServiceController , System.Text.Encodings.Web , System.Text.Json , System.Threading.Channels , System.Windows.Extensions , System.Security.Permissions , System.Security.Cryptography.Xml , System.Security.Cryptography.Pkcs , System.IO.Pipelines , System.Net.Http.Json , System.Net.Http.WinHttpHandler , System.Net.WebSockets.WebSocketProtocol , System.Reflection.Metadata , System.Runtime.CompilerServices.Unsafe , System.Security.Cryptography.Cng
 From Version 5.0.0-preview.8.20328.6 -> To Version 5.0.0-preview.8.20330.14

* React to obsoletion

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
2020-07-01 15:57:26 +00:00