Commit Graph

1084 Commits

Author SHA1 Message Date
N. Taylor Mullen ebe8ab4612 Rename TagHelperBoundAttributeDescriptorBuilder => BoundAttributeDescriptorBuilder.
#1369
2017-05-19 12:44:07 -07:00
N. Taylor Mullen 9bc9f0ef05 Rename HtmlCase => HtmlConventions.
- Moved the invalid non-whitespace html character entries from the various builders into the new HtmlConventions class.
- Updated test file name.
2017-05-19 12:36:55 -07:00
Ryan Nowak 6b1117caa9 Make this type internal 2017-05-19 11:34:51 -07:00
N. Taylor Mullen 30231979e8 React to rel/15.3 display name changes. 2017-05-19 11:29:48 -07:00
N. Taylor Mullen 2eb443acb6 Merge branch 'rel/15.3' into dev
# Conflicts:
#	src/Microsoft.AspNetCore.Razor.Language/Legacy/CSharpCodeParser.cs
#	src/Microsoft.AspNetCore.Razor.Language/TagHelperDescriptorBuilder.cs
#	src/Microsoft.CodeAnalysis.Razor/ViewComponentTagHelperDescriptorFactory.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpDirectivesTest.cs
#	test/Microsoft.CodeAnalysis.Razor.Test/ViewComponentTagHelperDescriptorFactoryTest.cs
2017-05-19 11:23:00 -07:00
N. Taylor Mullen 5aababce6e Remove magic string keys from TH builders.
- Replaced the magic strings with extension methods that produce the same behavior as the string keys did.
- Added tests to validate new extension methods.

#1307
2017-05-19 11:15:38 -07:00
Ryan Nowak 315221c758 Re-enable some skipped tests
The underlying bug in this area has been fixed.
2017-05-19 10:18:17 -07:00
Ryan Nowak f4f291a7f2 PR feedback 2017-05-19 09:47:55 -07:00
Ryan Nowak 2a88d6efcf Fix aspnet/Mvc#6296 sanitize class and namespace
The new @namespace directive isn't sanitizing class and namespace names
when generating them. This means that a file-system-legal character like
'-' will show up in a class name, and that's not good.

Note that the old code paths (document classifiers) already had tests for
this and did it properly. It was only missing from @namespace.
2017-05-19 08:54:24 -07:00
N. Taylor Mullen 4c98b7f8f3 Make ViewComponentTagHelper's display name nicer.
- Went from `__Generated__SomeViewComponentTagHelper` to `SomeViewComponentTagHelper`.
- Updated `TagHelperDescriptorBuilder` to allow setting of `DisplayName`.
- Added `TagHelperDescriptorBuilderTest` class to verify new `DisplayName` additions.
- Updated `ViewComponentTagHelperDescriptorFactoryTest` expectations.

#1251
2017-05-18 14:48:59 -07:00
N. Taylor Mullen 03f3975360 Allow directive string tokens to be colorized.
- Without a directive string token having a `SpanKind.Code` it cannot have any sort of C# coloring associated with it.
- Updated tests to reflect new `SpanKind` expectations.

#1269
2017-05-18 10:36:54 -07:00
Ryan Nowak e391ac7a3c Split options into ParserOptions and CodeGenerationOptions 2017-05-18 10:22:39 -07:00
Ryan Nowak 5a1090f324 Api Cleanup for language services
Created internal + public versions of
- BlockKind
- SpanKind
- AcceptedCharacters

That way these types are only exposed through the VS apis and not
through the runtime API surface.

Also deleted RazorEditorParser. Yep. It's going to take significant work
to just port it to the language services assembly. Let's reevaluate this
when we get closer to the next foundational update.
2017-05-17 22:09:01 -07:00
Ryan Nowak 94aaa3db9e Configure xunit for better display 2017-05-17 20:31:37 -07:00
Ryan Nowak 811ea019a5 Fixes #1245 - Make TemplateCodeExtension public
This removes the hardcoding of an MVC type from Razor.
2017-05-17 20:25:06 -07:00
Ryan Nowak f96b22ffc3 Bump VSIX version up to 15.4.XXXXX 2017-05-17 13:38:32 -07:00
N. Taylor Mullen 657c2a8da3 Merge branch 'rel/15.3' into dev
# Conflicts:
#	test/Microsoft.AspNetCore.Mvc.Razor.Extensions.Test/IntegrationTests/CodeGenerationIntegrationTest.cs
2017-05-17 11:24:32 -07:00
Ajay Bhargav Baaskaran 7bd13061b5 Set the chunk generator of non-string tag helper attributes to ExpressionChunkGenerator 2017-05-17 11:17:01 -07:00
N. Taylor Mullen b8ea008151 Make extensible directive type token rendering allow value types.
- Instead of rendering a null assigning statement for a type token we now render a `default(TTypeToken)`. With this approach type tokens can be value types without creating a design time error.
- Re-generated baseline files to reflect new directive token code generation.

#1176
2017-05-17 10:31:16 -07:00
N. Taylor Mullen 19f895b9ad Validate line mappings for integration tests in Razor.Extensions.
- Split line mapping validation into its own method.
- Prior to this we were calling the wrong method in our design time code generation integration tests within the Razor.Extensions test project.
- Re-generated line mapping baselines to conform with the cshtml files for Razor.extensions code generation integration tests.

#1351
2017-05-17 10:20:36 -07:00
Ryan Brandenburg b96a486650 Compile CodeGeneration tests 2017-05-16 16:26:47 -07:00
Ryan Nowak ad294fb4ba Add a new THProvider api
This change adds an API for Tag Helper discovery.

I also got rid of the 'design time' flag for the provider as an
experimental change. We need to think through the consequences of this
before committing to it. Right now I've left those tests failing until we
can make a decision.

This change decouples VCTH discovery a bit more, but we're still not ready
to move that into a the MVC extensions assembly. For that we need the
ability to discover the MVC extensibility.
2017-05-16 14:59:37 -07:00
N. Taylor Mullen 577511945b Merge branch 'rel/15.3' into dev 2017-05-16 14:54:36 -07:00
N. Taylor Mullen a18b96cbf3 Suppress unneeded dlls from Razor VSIX
#1349
2017-05-16 14:53:25 -07:00
N. Taylor Mullen 9fe7c77d30 Move TagHelperBinding out of Legacy.
- Added additional properties to the class to make it more production ready.

#1092
2017-05-16 11:06:07 -07:00
N. Taylor Mullen 01ec2202b2 Remove assembly name filter from THD API.
- This parameter was always passed `null` by tooling in the past.

#1279
2017-05-16 11:06:07 -07:00
N. Taylor Mullen 8616cf5dd0 Reduce catch all element completion usage.
- This makes it so if you have catch all `TagHelperDescriptor`s their completions don't apply to every existing completion. Instead, they now only apply to already TagHelperified completions and existing completions that are prefixed with a non-empty TagHelperPrefix.
- Updated existing test to have new expectations.
- Added new test to validate non-empty tag helper prefix case.

#1230
2017-05-16 11:06:05 -07:00
Nate McMaster 5856517be7 Remove workaround from test csproj files 2017-05-15 12:52:58 -07:00
Ryan Nowak 2167e4151e Fix #1311 add a base class for features 2017-05-12 21:15:59 -07:00
Ryan Nowak 72fe4cc952 Fix #1330 - make TagHelpers static class internal 2017-05-12 18:15:43 -07:00
Ryan Nowak fd3a34b000 Remove RazorIRBuilder.Document 2017-05-12 18:12:30 -07:00
Ryan Nowak 2ec2b98f83 Fix #1312 - make ExecuteCore protected 2017-05-12 17:54:09 -07:00
N. Taylor Mullen 3830a1b7ac Rename the BoundAttributeDescriptor builder.
- ITagHelperBoundAttributeDescriptor => TagHelperBoundAttributeDescriptorBuilder

#1306
2017-05-12 17:39:45 -07:00
Ryan Nowak 2b9c69bed8 Fixes #1308 and #1315
Misc project item cleanup
2017-05-12 17:33:49 -07:00
Ryan Nowak a1a560ddda Fix #1314 - remove namespaces from options 2017-05-12 17:26:08 -07:00
Ryan Nowak a8dd0355d0 Remove default usings
This change removes the default usings for 'System' and
'System.Threading.Tasks' and adds them to the MVC template engine.

This is preparation for removing this feature from the razor options, I
wanted to get all of the intentional diff out of the way.
2017-05-12 17:08:58 -07:00
Ajay Bhargav Baaskaran 8cf7d248e7 [Issue #1318] Renamed RuntimeTarget to CodeTarget 2017-05-12 16:32:55 -07:00
Ajay Bhargav Baaskaran da1296244b [Issue #1316] Seal RazorTemplateEngineOptions 2017-05-12 16:32:52 -07:00
Ajay Bhargav Baaskaran 7e447c33ea [Issue #1317] Rename HasAnyErrors to HasErrors in tag helper descriptor api 2017-05-12 16:32:50 -07:00
Ajay Bhargav Baaskaran 8fbe301dc0 [Issue #1319] Make TagHelperRenderingContext internal 2017-05-12 16:32:48 -07:00
Ajay Bhargav Baaskaran 2274aaeead [Issue #1320] Make preallocated IR nodes internal 2017-05-12 16:32:46 -07:00
Ryan Nowak 86d045c667 Fix #1305 move instrumentation to MVC 2017-05-12 16:14:17 -07:00
Nate McMaster 682d630fa2 Upgrade test framework versions and fix issues with tests 2017-05-12 15:41:49 -07:00
Ryan Nowak b9dabd24be Fix #1309 make CSharpDocument abstract 2017-05-12 14:23:30 -07:00
Ryan Nowak b17e506ce8 Some API cleanup around directivest 2017-05-12 13:27:28 -07:00
Ryan Nowak ab98c5d837 Fix #1322 #1328 #1310 #1325
This are mechanical API Cleanup issues.
2017-05-12 13:11:16 -07:00
N. Taylor Mullen 870b264039 Remove usage of old `ServiceHubServiceBase` ctor.
- The change wasn't exactly what was expected. The core `ServiceHub` is still what calls into our `Stream`, `IServiceProvider` overload (as intended) which means we needed to call down into the proper basetype constructor to start using Roslyn's non-obsolete one.
- Had to manually start the `StreamJsonRpc` property to work around race conditions in the ServiceHub APIs.

#976
2017-05-11 21:42:40 -07:00
Ajay Bhargav Baaskaran b44d59ca36 Remove Redirect writers 2017-05-11 15:38:54 -07:00
Ryan Nowak d3e37f20ce Add some new IR nodes
This adds the basics of a few new node types. I'll do a follow up to start
using these so we can eliminate some misuse of the statement node.
2017-05-11 14:52:31 -07:00
Ryan Nowak 2afe2e1627 Rename RazorMethodDeclaration -> MethodDeclaration 2017-05-11 10:22:45 -07:00