Commit Graph

36507 Commits

Author SHA1 Message Date
Chris Ross 54c1122582
Change HTTP projects to target netcoreapp3.0 #3754 (#4625) 2018-12-14 09:36:57 -08:00
Steve Sanderson 343208331d
Replace AssignToProperties with SetParameterProperties, which also clears unspecified parameter properties (imported from Blazor PR 1108) (#4797) 2018-12-14 17:07:07 +00:00
Steve Sanderson 3757908b14
Fallback for Components router (imported from Blazor PR 1534) (#4794) 2018-12-14 17:06:47 +00:00
Steve Sanderson e768a78c2b
Ensure ComponentBase async lifecycle methods return non-null task (imported from Blazor PR 1620) (#4790) 2018-12-14 17:06:30 +00:00
Steve Sanderson 8a9df6c873
HttpClientJsonExtensions better handling for failed requests (imported from Blazor PR 1660) (#4788) 2018-12-14 17:06:03 +00:00
Steve Sanderson 93127b39e8
Overload UriHelper to forceLoad the page (imported from Blazor PR 1154) (#4786) 2018-12-14 17:05:45 +00:00
Steve Sanderson 8fbb9fb0e6
Add support for binding decimal? double? float? long? int? bool? (imported from Blazor PR 1658) (#4600) 2018-12-14 17:05:22 +00:00
Steve Sanderson 1e404a5acf
fix for dispose (#4596) 2018-12-14 17:04:41 +00:00
Steve Sanderson 71bcac06ad
fixing type of property Detail based on standard. (#4595) 2018-12-14 17:04:26 +00:00
Ryan Nowak 341636b05d Convert Razor to netcoreapp3.0 2018-12-14 08:17:27 -08:00
BrennanConroy 74dbb4ff4f
Register callback before start (#4581) 2018-12-13 21:30:48 -08:00
BrennanConroy 4950495dc4
Fix IE 11 handshake split (#4575) 2018-12-13 21:30:17 -08:00
Ajay Bhargav Baaskaran 59ada30959 Merge branch 'ajbaaska/merge-22-to-master' 2018-12-13 17:34:41 -08:00
Mikael Mengistu 42afc62acf
Update src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs
Co-Authored-By: ajaybhargavb <ajaybhargavb@gmail.com>
2018-12-13 16:51:00 -08:00
Nate McMaster 538af1091c
Update src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs
Co-Authored-By: ajaybhargavb <ajaybhargavb@gmail.com>
2018-12-13 16:39:37 -08:00
Nate McMaster 6e3e48d456
Update src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs
Co-Authored-By: ajaybhargavb <ajaybhargavb@gmail.com>
2018-12-13 16:39:27 -08:00
Ben Adams b2731d652d .IndexOf(...) >= 0 to .Contains(...) (#4688) 2018-12-14 12:40:09 +13:00
Cédric Luthi 4a9a96cef7 Make the ResultStatusCodes property null-resettable 2018-12-13 14:09:21 -08:00
Cédric Luthi 74d900ea56 Add setter to HealthCheckOptions.ResultStatusCodes
All other properties (`Predicate`, `ResponseWriter` and `AllowCachingResponses`) have a setter but `ResultStatusCodes` doesn't.

Without a setter, reusing the same status to http status code mapping is impossible and leads to duplicate code that looks like this:

```csharp
private static void ConfigureHealthChecks(IApplicationBuilder app, HealthCheckServiceOptions options)
{
    app.UseHealthChecks("/health", new HealthCheckOptions
    {
        ResultStatusCodes =
        {
            [HealthStatus.Healthy] = StatusCodes.Status200OK,
            [HealthStatus.Degraded] = StatusCodes.Status400BadRequest,
            [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
        }
    });
    foreach (var name in options.Registrations.Select(e => e.Name))
    {
        app.UseHealthChecks($"/health/{name}", new HealthCheckOptions
        {
            Predicate = registration => registration.Name == name,
            ResultStatusCodes =
            {
                [HealthStatus.Healthy] = StatusCodes.Status200OK,
                [HealthStatus.Degraded] = StatusCodes.Status400BadRequest,
                [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
            }
        });
    }
}
```

With a setter, this code could be rewritten in a *don't repeat yourself* (DRY) way:

```csharp
private static void ConfigureHealthChecks(IApplicationBuilder app, HealthCheckServiceOptions options)
{
    var resultStatusCodes = new Dictionary<HealthStatus, int>
    {
        [HealthStatus.Healthy] = StatusCodes.Status200OK,
        [HealthStatus.Degraded] = StatusCodes.Status400BadRequest,
        [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
    };
    app.UseHealthChecks("/health", new HealthCheckOptions
    {
        ResultStatusCodes = resultStatusCodes
    });
    foreach (var name in options.Registrations.Select(e => e.Name))
    {
        app.UseHealthChecks($"/health/{name}", new HealthCheckOptions
        {
            Predicate = registration => registration.Name == name,
            ResultStatusCodes = resultStatusCodes
        });
    }
}
```
2018-12-13 14:09:21 -08:00
James Newton-King 35d8ee6cdf
Require nodejs 10 and update build docs (#4805) 2018-12-14 10:58:03 +13:00
Ajay Bhargav Baaskaran 0ecc6bc0b5 Merge branch 'release/2.2' into ajbaaska/merge-22-to-master 2018-12-13 12:06:48 -08:00
John Luo 6d2f2483d2
Remove obsolete session apis (#4609)
* Remove obsolete session apis

* Add breaking changes json updates
2018-12-12 17:35:40 -08:00
Mikael Mengistu 9e76bec6e1
Fix CORS Functional Tests (#4610) 2018-12-12 14:36:14 -08:00
Chris Ross 49d5525352
Change Hosting projects to target netcoreapp3.0 #3754 (#4611) 2018-12-12 13:34:57 -08:00
James Newton-King ac1b5c58b0
Fix NU1105 errors in HttpAbstractions.sln (#4608) 2018-12-13 10:15:01 +13:00
Ajay Bhargav Baaskaran 5e6c2208fd Merge branch 'release/2.1' into release/2.2 2018-12-12 13:14:20 -08:00
Ajay Bhargav Baaskaran ad3835c3e2
Removed unnecessary projects (#4586) (#4612) 2018-12-12 12:59:04 -08:00
Justin Kotalik 74753428e9
Add Vs install script (#4607) 2018-12-12 15:57:00 -05:00
Chris Ross a08f4b5a83
ResponseCompression DisposeAsync BasicMiddleware/#247 (#4604) 2018-12-12 11:32:36 -08:00
Ajay Bhargav Baaskaran 98f2973880
Removed unnecessary projects (#4586) 2018-12-12 10:41:06 -08:00
Justin Kotalik 226f2c0c2c
Adds MinimumReadThreshold to StreamPipeReader. (#4372) 2018-12-12 13:09:15 -05:00
Chris Ross 12966c63a6
Change DataProtection projects to target netcoreapp3.0 #3754 (#4473) 2018-12-12 10:04:36 -08:00
Chris Ross 6d442c1e3d
Upgrade Kestrel to target netcoreapp3.0 #3754 (#4405) 2018-12-12 08:16:00 -08:00
Nate McMaster 87629bbad9
Update Middleware.sln and Kestrel.sln to workaround NU1105 error 2018-12-11 18:19:36 -08:00
Nate McMaster d12827e609
Merge branch 'release/2.2' 2018-12-11 18:04:58 -08:00
Kahbazi 19276ce01c Remove nameof from log events 2018-12-12 07:19:32 +05:30
Nate McMaster d53b5569ae
Merge branch 'release/2.1' into release/2.2 2018-12-11 17:47:37 -08:00
Mikael Mengistu ff385f71c5
Check connectionState in stop so we don't null ref (#4557) 2018-12-11 16:22:06 -08:00
dotnet-maestro-bot 38785d0be9 [automated] Merge branch 'release/2.1' => 'release/2.2' (#4577)
* Workaround problems when opening solution files in Visual Studio (#4569)

Changes:

* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore

* Convert Session to use Reference and move to Middleware folder (#4576)

* Add RoutingSample.Web to HttpAbstractions.sln
2018-12-11 16:13:20 -08:00
seancpeters 21488b2b04 Add a workaround for a bug in `dotnet tool install` and the scaffolding command line tool (#4580) 2018-12-11 15:53:10 -08:00
Chris Ross 97cdbfb1a1
Change middleware projects to target netcoreapp3.0 #3754 (#4472) 2018-12-11 15:41:36 -08:00
Nate McMaster 719ff08409
Add RoutingSample.Web to HttpAbstractions.sln 2018-12-11 14:58:05 -08:00
John Luo 3acdfb3d26
Convert Session to use Reference and move to Middleware folder (#4576) 2018-12-11 14:56:42 -08:00
Nate McMaster 5151e7b1ed
Workaround problems when opening solution files in Visual Studio (#4569)
Changes:

* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore
2018-12-11 14:05:21 -08:00
Chris Ross 7fdd930f50
Change IIS projects to target netcoreapp3.0 (#4371)
* Change IIS projects to target netcoreapp3.0 #3754
2018-12-11 13:46:46 -08:00
Pavel Krymets 7f1f7a5256
Change runtime site extension to ship by default (#4572) 2018-12-11 10:48:55 -08:00
Chris Ross 99901fbad5
Move Identity.Core and Identity.Stores to NetCoreApp3.0 #3754 (#4523) 2018-12-11 10:23:01 -08:00
Steve Sanderson 24840e3465
Razor Components template (#4333) 2018-12-11 11:40:42 +00:00
James Newton-King 0c9eda1f4a
Update templates to use endpoint routing (#4500) 2018-12-11 18:24:14 +13:00
James Newton-King c6fa808a91
Change consumes behavior to ignore requests with no content type (#4459) 2018-12-11 17:55:20 +13:00