Commit Graph

36576 Commits

Author SHA1 Message Date
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
Ryan Brandenburg 9e7c3d6110 Remove duplicate CompilerServicesUnsafe 2018-09-20 10:19:35 -07:00
Ryan Nowak 5c4c746797 Reaction PR from routing rename 2018-09-20 10:15:50 -07:00
Ryan Nowak a657c3bdf2 Updates to Parameter Transformer
- Rename -> IOutboundParameterTransformer
- Make it operate on object
- Implementing caching for constraints/tranformers for link generation
(cached as part of TemplateBinder)
2018-09-20 10:15:42 -07:00
Pavel Krymets d28468ca8f
Override IIS headers in inproc (#1409) 2018-09-20 09:21:34 -07:00
Pavel Krymets ca0b9ee512
Merge pull request #1417 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-20 07:06:11 -07:00
Steve Sanderson b2f73492f5 Fix method wiping (#1448)
* Fix wiping assemblies that contain references to others in same directory

* Fix generated IL for reporting calls to wiped methods

* Add E2E test for method wiping
2018-09-20 10:20:37 +01:00
Ryan Nowak 4cecbc668a
Merge pull request #481 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-19 19:12:35 -07:00
Peter Marcu bd2c692702 add arm64 sharedfx builds 2018-09-19 18:30:23 -07:00
Ryan Nowak 787283ec2f
Merge branch 'master' into merge/release/2.2-to-master 2018-09-19 18:23:12 -07:00
Pavel Krymets b08b237927
StopServer before asserting TestSink (#1416) 2018-09-19 17:20:29 -07:00
Pavel Krymets 375d037946
Add applicationInitialization tests (#1402) 2018-09-19 16:32:24 -07:00
Pavel Krymets 4661a8de66
Merge pull request #1403 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-19 16:24:45 -07:00
BrennanConroy 6ba5e87b45
Allow CancellationToken in streaming hub methods (#2818) 2018-09-19 15:21:07 -07:00
Ryan Nowak 4259b65c16
Use options for registering health checks (#479)
* Use options for registering health checks

This change pivots to use options for registering health checks. We get
a few pretty nice things out of this, and it unblocks some of our
requirements.

Now all registration methods support the application developer
configuring the name, failure-status, and tags for each health check.
This is a requirment, that we weren't really satisfying - which is what
led to this redesign. In support of this health checks now return pass/fail,
and the service is responsible for assigning the status.

----

Health check authors that need configuration data (connection string as
an example) now have three ways to do this depending on their
requirements.
1. Create an instance and register that (easiest)
2. Use Type Activation and pass parameters (middle)
3. Use named options (richest)

We expect most health checks to need/want some kind of configuration -
which 1) works pretty well to solve. However many other health checks
will need DI + configuration. It was also a gap that we didn't have a
good way to use named options, when it's such a good fit for our
scenarios.

Added new registration methods for type activation that allow you to
pass parameters for 2).

Added a context type that allows the running health check access to its
registration for 3).

----

Redesigned and renamed how status gets reported. Health checks return
pass/fail result, but the overall HealthReport includes entries of a
different type. This seems fine because there isn't really a way to
consume a HealthCheckResult directly - the service is the only consumer.

----

Added support for tags. This was easy to add now that we have a separate
registration type, and it's quite handy for building filters (see
sample).

* HARDER BETTER STRONGER FASTER
2018-09-19 14:48:34 -07:00