Commit Graph

36440 Commits

Author SHA1 Message Date
Doug Bunting 5c8dfef15e
Change `CollectionModelBinder` and `ComplexTypeModelBinder` to enforce `[BindRequired]`
- #8180
- add an error when binding fails for top-level model
  - same case as when MVC creates "default" / empty model i.e. `ParameterBinder` can't detect this
- update `CollectionModelBinder` subclasses and the various providers as well
- controlled by existing `MvcOptions.AllowValidatingTopLevelNodes` option

smaller issue:
- change `ModelBinding_MissingBindRequiredMember` resource to mention parameters too
2018-09-21 11:08:16 -07:00
ASP.NET CI 89ea0391d8 Updating submodule(s)
IISIntegration => d31bc9c064

[auto-updated: submodules]
2018-09-21 18:06:13 +00:00
Pavel Krymets d31bc9c064
Merge pull request #1427 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-21 10:55:05 -07:00
ASP.NET CI f4c98fe86e Updating submodule(s)
IISIntegration => f808bdc331

[auto-updated: submodules]
2018-09-21 16:37:21 +00:00
Pavel Krymets f808bdc331
Disconnect the disconnect handler when request processing ends (#1413) 2018-09-21 09:13:39 -07:00
ASP.NET CI 9d61c2decb Updating submodule(s)
SignalR => ef3d3b1cdd

[auto-updated: submodules]
2018-09-21 16:04:45 +00:00
BrennanConroy ef3d3b1cdd
[TS] Change websocket library in Node (#2989) 2018-09-21 08:58:54 -07:00
ASP.NET CI 741b05ced9 Updating submodule(s)
IISIntegration => 3784548494

[auto-updated: submodules]
2018-09-21 08:42:54 -07:00
Pavel Krymets 3784548494
Merge pull request #1419 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-21 08:38:16 -07:00
ASP.NET CI 1a4b6a1cd1 Updating submodule(s)
IISIntegration => 14aebebbaa

[auto-updated: submodules]
2018-09-21 15:31:15 +00:00
Justin Kotalik 14aebebbaa
Remove using environment variables for specifying tests. (#1410) 2018-09-21 08:26:20 -07:00
ASP.NET CI e2aab3cc7b Updating submodule(s)
EntityFrameworkCore => 86377a92c9bdaf3a210318c32903c19176a76724

[auto-updated: submodules]
2018-09-21 01:28:19 -07:00
ASP.NET CI 8c0ad93273 Updating submodule(s)
AADIntegration => 14c5fcdb50
AuthSamples => 31bb166372
AzureIntegration => 312221df2f
BasicMiddleware => 6699804fe9
Diagnostics => 8fb6c2a50a
EntityFrameworkCore => 31aec93278d089878867b3279587cd0de6f19f12
Hosting => 13d9774e7a
HttpClientFactory => 95c1cb0907ac3f66b9ebc982b7b3413a073636f6
Identity => 4e0c9f4038
IISIntegration => d463b5e613
JavaScriptServices => 587ead92e4
Mvc => 61386d5f67
Options => 0caa14df0239df24a9711a59900583abaf8fb286
Razor => a898f98a7f
Routing => c559498632
Scaffolding => 3808f07f672c0c5416f547959cc6b8efe2ab5e21
SignalR => 4dfd93c1d7
Templating => a140f38810

[auto-updated: submodules]
2018-09-20 16:51:56 -07:00
Pranav K 31bb166372
Reference Microsoft.NET.Sdk.Razor in projects with Razor files 2018-09-20 16:42:13 -07:00
Pranav K 14c5fcdb50
Reference Microsoft.NET.Sdk.Razor in projects with Razor files 2018-09-20 16:39:50 -07:00
Pranav K 312221df2f
Reference Microsoft.NET.Sdk.Razor in projects with Razor files 2018-09-20 16:13:39 -07:00
ASP.NET CI 744a042da3 Updating submodule(s)
Routing => 0d44670c9f

[auto-updated: submodules]
2018-09-20 15:29:28 -07:00
James Newton-King 0d44670c9f
Merge branch 'merge/release/2.2-to-master' 2018-09-20 15:24:52 -07:00
Pranav K 4e0c9f4038
Reference Microsoft.NET.Sdk.Razor in projects with Razor files 2018-09-20 15:17:20 -07:00
Ryan Brandenburg a140f38810 Enhancments 2018-09-20 14:52:16 -07:00
Ryan Brandenburg 44c3e5d4ac
Titles in h1 (#1966)
Titles in h1
2018-09-20 14:51:41 -07:00
Ryan Nowak f601b6d3d2 Fix #1450 Skip compilation on non-C# projects
This change skips our 'temp' compilation that we do to implement 2-phase
build for defining components in .cshtml when the project is not C# OR
when the project has no .cshtml files.

This should make the rest of the build-time Blazor functionality work
for non-C# projects.

This should also make the build faster when you have the Blazor targets
imported in a C# project with no .cshtml files.
2018-09-20 14:27:08 -07:00
BrennanConroy 4dfd93c1d7
[TS] Wait for handshake response (#2983) 2018-09-20 14:23:43 -07:00
ASP.NET CI eba9610477 Updating submodule(s)
SignalR => 7f4c23b72d

[auto-updated: submodules]
2018-09-20 21:21:46 +00:00
Mikael Mengistu 7f4c23b72d
Merge release/2.2 2018-09-20 14:16:22 -07:00
Pranav K 587ead92e4
Reference Microsoft.NET.Sdk.Razor in projects with Razor files 2018-09-20 13:55:13 -07:00
MikaelMengistu a2e5e8755f Merge branch 'release/2.2' 2018-09-20 13:48:33 -07:00
BrennanConroy f0a34a4ca4
Clone Windows Identity in LongPolling connections (#2985) 2018-09-20 13:39:25 -07:00
ASP.NET CI 8d602b75b3 Updating submodule(s)
BasicMiddleware => db7c2bf70c

[auto-updated: submodules]
2018-09-20 20:35:37 +00:00
Pranav K 61386d5f67
Reference Microsoft.NET.Sdk.Razor in projects with Razor files 2018-09-20 13:21:45 -07:00
Pranav K a898f98a7f Print an error when using Razor build with an older version of the Sdk 2018-09-20 13:14:06 -07:00
Chris Ross db7c2bf70c
Merge pull request #366 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-20 13:13:22 -07:00
ASP.NET CI 12d2d01593 Updating submodule(s)
SignalR => e683b81dfe

[auto-updated: submodules]
2018-09-20 20:00:45 +00:00
Mikael Mengistu bf1aa1d818
Make tests classes and HubMessageType enum package private in the Java client(#2992) 2018-09-20 12:44:19 -07:00
James Newton-King c559498632
Make parameter transformer test verifiable (#804) 2018-09-20 12:41:29 -07:00
Pavel Krymets d463b5e613
Fix ReaderThrowsResetExceptionOnInvalidBody (#1420) 2018-09-20 12:38:35 -07:00
BrennanConroy e683b81dfe Merge branch 'release/2.2' 2018-09-20 12:29:13 -07:00
ASP.NET CI 4b4419e310 Updating submodule(s)
Diagnostics => db826f13ed

[auto-updated: submodules]
2018-09-20 19:26:24 +00:00
Ryan Nowak 100382bf71 Add Type Inference for Generic-Typed Components
This change allows you to use generic-typed components without
explicitly specify type arguments.

**Before:**
```
<Grid Items="@MyItems" TItem="Person">
...
</Grid>
```

**After:**
```
<Grid Items="@MyItems">
...
</Grid>
```

Where possible, the type of the component will be inferred based on the
values passed to component parameters. This won't work like magic, you
have to specify parameters that provide type arguments for all of the
component's type parameters.

This is a best effort system, and it's largely based on the limitations
and behaviours of generic type inference in C#. We think it will work
well with most Blazor features and for most reasonable components. You
should not forget it's easy to specify type arguments, because you may
still have to in some cases.

In particular you may notice issues if you are trying to use a generic
typed component where all of the parameters are delegates or templates.
Type inference for delegates/lambdas in C# is based on the context. Any
time you combine generics and delegates it's easy to get into a scenario
where the compiler won't infer the correct type, or will give up.

----
The type inference feature works by generating a 'thunk' method in
*caller* that can act as a site for type inference (C# does not support
inference on constructors).

For our grid example above, the non-inferenced code will look something
like:
```
builder.OpenComponent<Grid<Person>>(0);
builder.AddAttribute(1, "Items", MyItems);
builder.CloseComponent();
```

Note that we can only write the type `Grid<Person>` because you wrote
`Person` in your code. What you type in the `TItem` attribute value gets
inserted into the generated code such that it fills in the generic type
parameter.

On the other hand, if you want is to infer the type, we have to do some
compiler magic. That looks like:
```
__Blazor.(long generated name).TypeInference.CreateGrid_0();
...

// elsewhere in the file
internal static class TypeInference
{
    public static void CreateGrid_0<TItem>(RenderTreeBuilder builder,
    int seq, int __seq0, global::System.Collections.Generic.List<TItem>
    __arg0)
        {
	        builder.OpenComponent<Grid<TItem>>(seq);
		        builder.AddAttribute(__seq0, "Items", __arg0);
			        builder.CloseComponent();
				    }
				    }
				    ```

				    This allows us to rely on the C#
				    compiler for itype inference.
2018-09-20 12:19:26 -07:00
Ryan Nowak db826f13ed
Merge pull request #484 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-20 12:18:26 -07:00
melnikov77 6699804fe9 Do not compress response if it is already compressed (#305) (#365) 2018-09-20 12:01:06 -07:00
ASP.NET CI 842f0c696c Updating submodule(s)
Mvc => 5b9ef5972c
Routing => 0bb28edc63

[auto-updated: submodules]
2018-09-20 11:53:29 -07:00
Ryan Nowak 0bb28edc63
Merge pull request #803 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-20 11:36:48 -07:00
Ryan Nowak 54ef2ef2a8
Merge branch 'master' into merge/release/2.2-to-master 2018-09-20 11:15:51 -07:00
Ryan Nowak 5b9ef5972c Merge branch 'release/2.2' 2018-09-20 11:08:03 -07:00
Ryan Nowak 8fb6c2a50a Allow cancellation to propagate 2018-09-20 11:04:35 -07:00
ASP.NET CI f9146b8fcf Updating BuildTools from 3.0.0-alpha1-20180911.2 to 3.0.0-alpha1-20180919.1
[auto-updated: buildtools]
2018-09-20 10:54:33 -07:00
ASP.NET CI 4c622acc06 Updating submodule(s)
Diagnostics => 4cecbc668a
EntityFrameworkCore => 02e2952057d23122f6182ebd9d4eaf04c34104c9
Hosting => 73e66999cd
HttpClientFactory => e0b77f9f5fcb720147af56432904ca1a7785a398
IISIntegration => ca0b9ee512
Options => 8703443d45ab1f9bc36aedb967d065269abeca58

[auto-updated: submodules]
2018-09-20 10:54:24 -07:00
Mikael Mengistu f88b7ce044
Move Java chat sample to samples package (#2974) 2018-09-20 10:33:16 -07:00
Ryan Brandenburg 48e66d3d10 Pin System.Memory to 4.5.0 2018-09-20 10:30:57 -07:00