Commit Graph

298 Commits

Author SHA1 Message Date
Andrew Stanton-Nurse 98ce12714a
Update XML docs for OnStarting (#19534) 2020-03-18 13:58:46 -07:00
James Newton-King 56a64a6ff0
Avoid string allocation when converting zero (#19732) 2020-03-12 09:52:12 +13:00
John Luo f05e019271
Merge branch 'master' into johluo/migrate-logging-testing 2020-03-04 22:17:06 -08:00
John Luo c181547864 Migration fixup for Logging.Testing 2020-03-04 22:10:12 -08:00
Sedat Kapanoglu 7e139c9b5f
Add HeaderNames.XRequestedWith = "X-Requested-With" (#19470)
* Add HeaderNames.XRequestedWith = "X-Requested-With"

X-Requested-With is the standard for differentiating AJAX requests and is commonly used. Having this in HeaderNames would prevent typos related to typing this header name. I couldn't find any rationale about excluding this but there might be legitimate reasons like discouraging the use of HTTP headers or differentiating AJAX requests, etc. Please reject this if that's the case.

* Replace "X-Requested-With" references with HeaderNames.XRequestedWith

The only remaining instance is WebSocketsTransport.cs in
SignalR\clients\csharp\Http.Connections.Client which doesn't have
Microsoft.Net in its references. I didn't want to impose a new
dependency as its risky.

* Fix the order of using statements

* Add XRequestedWith to the ref assembly
2020-03-03 15:45:50 -08:00
Justin Kotalik ee8d8439dd
Fix HttpResponseStreamWriter (#19216) 2020-02-21 16:16:44 -08:00
John Luo a5fc9defc4 Regenerate ref assemblies 2020-02-20 16:53:07 -08:00
John Luo 5f9f1ce183 Merge branch 'master' into johluo/migrating-extensions 2020-02-20 16:44:06 -08:00
John Luo 7d1f5d8c0b Updates for extensions migrations
- Multi-target ObjectPool
- Move Embedded.Manifest.Task.Internal.Entry to the public namespace
- Remove ref assemblies from AspNetCore.Testing
- Skip TestPathUtilitiesTest since it's a pattern we want to migrate away from
- Fix FileProviders.Abstractions version in Embedded.*.nuspec
- Add workarounds for project references to FileProviders.Embedded
2020-02-20 14:00:29 -08:00
Doug Bunting c2ee4ae820
Re-enable source build job
- change ref/ projects to build only the default TFM during source builds
  - avoid errors restoring packages like Microsoft.BCL.AsyncInterfaces
  - may also speed up source builds slightly
2020-02-19 22:46:22 -08:00
Brennan Conroy 2d066dcd3e Apply some fixes 2020-02-19 14:18:29 -08:00
Hao Kung 607a6b4f8a
Merge branch 'master' into halter73/mega-merge 2020-02-18 16:51:15 -08:00
Ajay Bhargav Baaskaran f2dd6d4598 Add back DownloadFile.cs
Revert Razor.Runtime.Manual.cs and regenerate ref assemblies
2020-02-18 15:52:34 -08:00
Ajay Bhargav Baaskaran b92f4231e8 Todos 2020-02-18 13:47:25 -08:00
Stephen Halter 88073f86ff Merge branch 'release/3.1' into master 2020-02-18 13:46:51 -08:00
samsosa 2a52168115
Remove HostString.Port string alloc in HostString.cs (#19082)
https://github.com/dotnet/aspnetcore/issues/19064
2020-02-16 23:07:32 -08:00
Stephen Halter f3e2b4d4d1
Keep Pipe readable after FormPipeReader error (#18939) 2020-02-14 09:36:57 -08:00
Doug Bunting a6c43b14a1
Mark AspNetCore projects that aren't packaged explicitly (#18767)
* Mark AspNetCore projects that aren't packaged explicitly
- avoid NU5104 warnings due to confusing versioning
- `$(IsShippingPackage)` was semantically incorrect in any case

* Remove redundant `$(IsShippingPackage)` settings in `$(IsAspNetCoreApp)` projects
- default is `true` for all implementation projects

* Use `$(IsPackable)` when deciding how `$(IsAspNetCoreApp)` projects are handled
- remove all use of `$(IsShippingPackage)` for shared framework composition
- update documentation to match these changes

nits:
- remove odd default for `$(IsPackable)` in Directory.Build.targets
  - no longer relevant since all `$(IsAspNetCoreApp)` projects are `$(IsShippingPackage)` too
- include more information in docs/ProjectProperties.md

* Add direct System.Text.Json references
- avoid MSB3277 warnings
2020-02-13 15:51:27 -08:00
Alessio Franceschelli 6e0a4fcfdd
Added Write/WriteLine ReadOnlySpan/ReadOnlyMemory overrides to HttpResponseStreamWriter (#18451) 2020-02-08 22:04:01 -08:00
Nick Kirby d6cb79e64a
Use FirstSpan instead of calling First.Span (#18615) 2020-01-31 12:51:40 -08:00
Matyas Richter 58a107b27e Don't throw exception while flushing ReferenceReadStream #18503 (#18548) 2020-01-25 07:26:26 -08:00
davidnx 237b697320 Use StatusCodes.Status404NotFound instead of 404 (#18453)
This is a minor change to improve consistency and use `StatusCodes` members instead of raw harcoded status code numbers. It may help beginners browsing through the code-base to find where the default 404 response comes from for unmatched requests.
2020-01-20 16:28:56 +00:00
James Newton-King df712cc4a9
Add HttpProtocol (#18049) 2020-01-16 13:35:47 +13:00
John Luo 9522e1dd2e Multi-target all shared framework projects with netcoreapp3.1 (#17998)
- regen ref
2020-01-15 12:08:17 -08:00
Chris Ross ad8ecf96a1 React to runtime/594 Encoder.Convert change (#17747) 2020-01-15 11:07:50 -08:00
William Godbe 6ec28e8715
Fix setter for CandidateState.Values in reference assembly (#18278) 2020-01-15 11:02:08 -08:00
Maher Jendoubi 116799fa70 Contributing: Fixed some typos (#18331) 2020-01-14 08:58:52 -08:00
Kahbazi 5f169dce14 Fix missing cors middleware exception message (#17892)
* Fix missing cors middleware exception message

* Update unit test expected error message

* Update integration test expected error message
2020-01-09 14:26:37 -08:00
Kevin Pilch 0517745c08 aspnet/AspNetCore -> dotnet/aspnet
Except aspnet/AspNetCore-Internal.
2020-01-08 16:40:11 -08:00
Martin Costello b6b5319bab Use UnixEpoch for cookie deletion (#18126)
Use the DateTimeOffset.UnixEpoch field instead of a new DateTime value when deleting cookies.
2020-01-04 12:39:53 -08:00
Kahbazi adb12f23d0 Use AppendJoin(...) instead of Append(string.Join(...)) on StringBuilder (#18007) 2020-01-02 08:05:54 -08:00
Doug Bunting 3a67489398
Add missing `_dummy` and `_dummyPrimitive` fields
- probably need to double-check for similar gaps in 'release/3.0' branch
2019-12-13 12:13:15 -08:00
Doug Bunting 7256b353b3
Update `internal` types and members in *.Manual.cs files
- match changes that are in 'release/3.1' but not 'release/3.0'
  - e.g. `StaticComponentRenderer`'s namespace change and newly-added members
- redo GenAPI exclusions
  - remove some unecessary workarounds getting in the way of keeping up w/ API changes
  - add more GenAPI exclusions, enabling `--all` without hitting dotnet/arcade#4488
2019-12-13 12:10:44 -08:00
Doug Bunting 7ba757265f
Merge branch 'release/3.1' into merge/release/3.0-to-release/3.1
- upgrade Arcade SDK to '1.0.0-beta.19607.3'
- regenerate eng/ProjectReferences.props and ref/ projects
2019-12-11 20:03:03 -08:00
Andrew Stanton-Nurse eb113093cd
Clarify docs on HttpRequest.PathBase (#17639) 2019-12-11 13:50:03 -08:00
Eddy Nakamura 5ff9ed68d1 updating inline <code> to <c> (#17611)
* updating inline "code" tag to "c" tag

* Apply suggestions from code review

Co-Authored-By: Andrew Stanton-Nurse <andrew@stanton-nurse.com>

* reverting tag

* reverting tag

* reverting entire file
2019-12-11 11:47:38 -08:00
Doug Bunting cf6b5028c3
Improve generation and use of ref/ projects (#17311)
* Remove useless src/PackageArchive files
- not used outside 2.x branches

* Improve use of ref/ assemblies
- compile against ref/ assemblies but do not change package metadata
  - update the metadata of implementation projects to include the ref/ assembly path
  - update `@(ReferenceAssembly)` metadata for Extensions packages, not `@(PackageReference)`
  - can be disabled using `$(CompileUsingReferenceAssemblies)` e.g. when generating ref/ projects
- include ref/ projects in source build by default
  - remove `$(ExcludeFromSourceBuild)` overrides from ref/ project files
- use latest package references and use project references even when _not_ building the targeting packs
- restore previous `@(Reference)` -> `@(PackageReference)` logic
  - add build-only Microsoft.Internal.Extensions.Refs package reference in most cases
- remove IndirectReferences.props and `@(_ExtensionInternalRefAssemblies)`; no longer needed

* Improve ref/ project generation
- use ../src/**/AssemblyInfo.cs files instead of including attributes in *.Manual.cs files
  - for same reason, copy `@(InternalsVisibleto)` items from src/ to ref/ projects
- use eng/targets/CSharp.ReferenceAssembly.props instead of ref/Directory.Build.props files
- use TFM-specific *.Manual.cs files in ref/ project files instead of ref/Directory.Build.props files

optimizations and usability improvements:
- add `$(BuildMainlyReferenceProviders)` property to focus on reference providers when generating ref/ projects
- disable `$(UseReferenceAssemblyInImplementation)` to avoid using ref/ projects while generating them

nits:
- clean up whitespace and remove blank lines in ref/ project files

* Perform smaller cleanup
- remove `$(IsTargetingPackPatching)`; use only `$(IsTargetingPackBuilding)`
- remove `$(DisableServicingFeatures)`; enable the servicing features we need
  - suppress baseline references even in servicing builds
- restore `$(AdditionalGenApiCmdOptions)`; useful when updating *.Manual.cs files

nits:
- simplify conditions using `$(HasReferenceAssembly)`
- correct spelling in comments
- shorten long lines

* Use a response file for GenAPI commands
- work around dotnet/arcade#4021 and help with additional ref assemblies
- mimic 111462e0c2 and integrate w/ other changes here

* Undo some manual ref/ project changes
- now done automatically or centrally
- remove manual `[TypeForwardedTo]` and `[InternalsVisibleTo]` attributes
  - fully qualify a type now that `using` is gone
- remove dupe `@(Compile)` items for *.Manual.cs files; included in the ref/ project files
- remove redundant `$(AllowUnsafeBlocks)` and `$(NoWarn)` settings

nits:
- rename a *.Manual.cs file that's not TFM-specific
- remove `private` members

* Correct use of `@(ProjectReference)` items for reference providers
- use `@(Reference)` instead

* Remove recently-added `@(Compile)` and `@(Reference)` items
- were added due to missing `[InternalsVisibleTo]` attributes in ref/ assemblies or as early workarounds
  - plus, now transitive references **Just Work™️**
- expose `ClosedGenericMatcher` in the usual (*.Manual.cs) way
- also undo Microsoft.Extensions.ApiDescription.Server workaround

* Remove `private` members from ref/ *.Manual.cs files
- not useful and bloat the ref/ assemblies

* Cleanup warnings
- avoid "CSC warning CS2008: No source files specified." building site extensions
- correct warnings (as errors) about `RenderToStringResult` being obsolete
  - add Microsoft.AspNetCore.SpaServices.Tests to Middleware solution

* Remove `@(RuntimeHostConfigurationOption)` workarounds
- deps files are unaffected by new ref/ assembly handling and test projects aren't special-cased
- also execute a test previously skipped due to deps file problems

* Regenerate ref/ projects
- pick up the latest generation changes

(unclear why Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.cs changed but works)

* Fill in missing `internal` types 1 of n
- rename Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs; need `RenderTreeFrame` type everywhere
- add types needed in unit and perf tests to *.Manual.cs files

* Clean up recent commits
- remove recently-added `private` members
- restore `_dummyPrimitive` fields in Microsoft.AspNetCore.Server.HttpSys.Manual.cs

* Add *.Manual.cs files for more projects

* !fixup! fields in *.Manual.cs `struct`s
- GenAPI sometimes generates `_dummy` and `_dummyPrimitive` fields _instead of_ visible members
- what GenAPI generates sometimes have the right length but actual fields don't hurt
  - that is, using the real fields corrects both the visible API and `struct`s' sizes

nits:
- consolidate `namespace`s in Microsoft.AspNetCore.Mvc.Core.Manual.cs

* Remove special case for generating ref/ projects on non-Windows
- referenced issue was closed with no action but workaround still not required
- no tabs in generated content

* Only create ref/ projects for assemblies in the shared framework
- restrict when `$(HasReferenceAssembly)` is `true` by default
- add warnings when `$(IsAspNetCoreApp)` or `$(HasReferenceAssembly)` have unexpected values

* Remove "extra" ref/ projects
- associated implementation projects no longer have `$(HasReferenceAssembly)` set to `true`

* Add a few GenAPI exclusions
- see dotnet/arcade#4488
- generation for these members leads to NREs

* Add more `internal` types and members
- Identity/Core
- Identity/Extensions.Core
- Mvc/Mvc.ViewFeatures

* Add direct dependencies to work around CS1705 errors
- add direct references to some test and sample projects to make intent clear i.e. address CS1705 root cause
  - these projects must use implementation assemblies for those direct references
  - requirement also applies to anything depending on them e.g. functional tests
  - for simplicity, use `$(CompileUsingReferenceAssemblies)` instead of targeted `@(Reference)` metadata
- leads to ~40 projects that do not themselves add ref/ metadata
  - this is _not_ transitive i.e. it applies only to projects that override `$(CompileUsingReferenceAssemblies)`

* nits: Remove a few more `private` members in *.Manual.cs files

* !fixup! correct namespaces of a few types in *.Manual.cs files

* Try another way to fix Microsoft.AspNetCore.Blazor.Build.Tests

* Try another way to fix missing targets in Web.JS.npmproj
2019-12-11 07:36:59 -08:00
Andrew Stanton-Nurse 06a85e5db2
Dairai/add http class descriptions (#17349) 2019-12-05 09:28:29 -08:00
Dairai Nyabando a71aa8a5bc Correcting closing XML remark tag
#17349
2019-12-04 22:54:00 -05:00
Dairai Nyabando 10d5a0ba62 Correcting XML closing tags
#17349
2019-12-04 20:07:14 -05:00
Roman Marusyk 032625cd32 Change "lower-case to "lowercase" in xml comments (#17499) 2019-12-01 12:45:28 -08:00
Dairai Nyabando ed5a43d5ad updating the return statements for specific methods
#17349
2019-11-25 22:20:29 -05:00
Mehmet Can Kamar d59868b2d4 BindingAddress is customized for unix socket urls #10782 test… (#12112) 2019-11-25 09:18:16 -08:00
Günther Foidl 9e67b7b22e Use C#'s ReadOnlySpan static data optimization in more places (#14447) 2019-11-24 18:04:26 -08:00
Dairai Nyabando 7c8d0f89f8 Additional class and methods description changes including adding class references and inheriting docs
#17349
2019-11-23 18:27:12 -05:00
Dairai Nyabando d2f2ed99fc Updating method descriptions as per review suggestions
#17349
2019-11-23 17:23:18 -05:00
Dairai Nyabando 5dcb568df0 Updating descriptions to add parameters
#17204
2019-11-22 22:27:55 -05:00
Chris Ross 6902b14471 [3.1.x] Backport HttpContext.Items fix (#17237) 2019-11-22 15:24:27 -08:00
Dairai Nyabando 66613b194d Updating descriptions for HTTP classes
#17204
2019-11-22 00:04:16 -05:00
André Silva 8d1c8005d8 Fixes QueryHelpers.AddQueryString() throws when one of the dictionary values is null #16647 (#17177) 2019-11-18 16:03:44 -08:00