Commit Graph

429 Commits

Author SHA1 Message Date
Pranav K 33a0f7a0db Replace NotNullAttribute with thrown exceptions 2015-09-16 22:06:25 -07:00
Pranav K 0376550f2d Replace SymbolLookupCache with comparing FullNames for symbols. 2015-09-16 21:43:51 -07:00
Pranav K 381c055e2f Removing NotNullAttribute from Microsoft.AspNet.Razor 2015-09-14 11:58:28 -07:00
N. Taylor Mullen f71f9fb679 Rename `TargetElementAttribute` => `HtmlTargetElementAttribute`.
- Nearly every other `TagHelper` related element targeting attribute has `Html` a part of its name. With this rename, the attribute will be consistent.

#516
2015-09-13 19:14:08 -07:00
Ryan Nowak fcadbc9095 React to BufferedHtmlContent changes
This changes all TagHelperContent methods to assume that input has NOT
YET been encoded.
2015-09-13 13:49:05 -07:00
N. Taylor Mullen 4fd866f340 Update `RestrictChildrenAttribute`s properties and parameters to have consistent names.
- Other attributes such as `TargetElement` have names referring to tag names as "tags". This update makes both attributes more consistent.

#517
2015-09-13 11:57:48 -07:00
Pranav K 9ab9a330ed Adding NeutralResourcesLanguageAttribute 2015-09-10 18:26:46 -07:00
Ajay Bhargav Baaskaran 88f4153fd9 Added timeout to regex 2015-09-10 11:24:13 -07:00
Ajay Bhargav Baaskaran e2881b0eca Extra newline no longer rendered at the end of a code block
- #485
- Using a flag to consume whitespace and newline at the end of a verbatim block
- Added tests to validate nested blocks
2015-09-10 10:39:37 -07:00
Doug Bunting 493e5521b8 Build break: Mock `TypeInfo` as well to get 4 tests working
- as of aspnet/aspnet.xunit@5a12e89 xUnit uses `TypeInfo` more often
2015-09-09 22:49:12 -07:00
Pranav K 9a7be69a0d Produce ITypeInfo \ IPropertyInfo using CodeAnalysis symbol tree 2015-09-09 16:34:12 -07:00
Pranav K 231e8a9cf4 Create an abstraction model for TypeInfo for tag helper discovery. 2015-09-08 17:37:08 -07:00
Ajay Bhargav Baaskaran 08c8f9f7ba Parse the whitespace surrounding equals in attribute correctly
- #123
 - Handled the corresponding cases in tag helper scenarios
 - Added unit and code generation tests
2015-09-08 11:43:37 -07:00
Doug Bunting 6568de38d1 Two quick fixes
- add missing closing quote in a resource
- cleanup `project.json` files
  - remove some package references that are found transitively
2015-09-08 08:39:03 -07:00
N. Taylor Mullen d458e8ecb2 Change HTML in nested C# blocks to properly handle dots.
- Prior to this change adding a `.` after an implicit expression would result in compile errors due to Razor thinking the `.` was part of the C# (normally not the case).
- Added a code generation and unit tests to validate behavior.

#491
2015-09-07 19:18:09 -07:00
N. Taylor Mullen f843aec538 Update tests to reflect new length provided `RazorError`s.
- Added new tests to validate `TagHelperDescriptorResolver` properly calculates assembly location.

#386
2015-09-02 12:05:53 -07:00
N. Taylor Mullen ad5bfc5b66 Change `RazorError`s to consistently provide error lengths.
- Updated `TagHelper` errors to no longer highlight the entire tag as an error, instead just the tag name is marked as an error. This is now consistent with nested tags in `@{ ... }` errors.
- Updated `RazorError` and corresponding error logging constructs to disallow creation without providing lengths.
- Updated `TagHelperDescriptorResolver` and related classes to properly determine assembly locations within directives. This allows for exact error locations in the `@addTagHelper` directive.

#386
2015-09-02 12:05:51 -07:00
N. Taylor Mullen 43fce8c927 Adjust tokenizer to understand environment based newlines. 2015-09-01 01:41:48 -07:00
N. Taylor Mullen 09bcc67955 Update tests to use `Environment.NewLine` for source locations. 2015-09-01 01:32:21 -07:00
Ajay Bhargav Baaskaran 39dda01f47 [Fixes #484] Attributes parsed correctly when newlines precedes attributes 2015-08-28 14:59:24 -07:00
N. Taylor Mullen d0688a7e00 Add the ability for `TagHelper`s to exist inside templates.
- Previously doing `@<mytaghelper />` was invalid due to how we constructed templates lambdas.

#489
2015-08-21 16:51:47 -07:00
N. Taylor Mullen dbcc5e240a Change `GetHashCode()` for `CaseSensitiveTagHelperDescriptorComparer` to order values.
- Ordered `RequiredAttributes`, `AllowedChildren` and `Attributes`.

#489
2015-08-21 15:20:57 -07:00
N. Taylor Mullen 55760b4fcb Add copy constructor to `TagHelperAttribute`.
- Added test to validate copy constructor does its job.

#492
2015-08-20 22:09:46 -07:00
N. Taylor Mullen f7d42ebe80 Update 'build.sh' to pull Sake from v2 NuGet feed. 2015-08-20 20:46:20 -07:00
N. Taylor Mullen 0d05d394ca Update 'build.cmd' to pull Sake from v2 NuGet feed. 2015-08-20 15:37:22 -07:00
N. Taylor Mullen 5ed77e2b64 Update NuGet feed from v2 => v3. 2015-08-19 14:53:25 -07:00
N. Taylor Mullen 432ddbd467 Update `.travis.yml` to run on OSX.
- Added `MONO_THREADS_PER_CPU=2000` environment variable to ensure `dnu restore` completes successfully.
2015-08-18 20:03:51 -07:00
Pranav K b360f66326 Updating to aspnetlitedev. 2015-08-18 14:00:20 -07:00
Pranav K 1ab94f0891 Merge branch 'release' into dev 2015-08-18 14:00:20 -07:00
Pranav K ef0456183b Updating to aspnetliterelease. 2015-08-18 14:00:20 -07:00
Pranav K c693b69793 Merge branch 'release' into dev 2015-08-17 14:48:18 -07:00
Pranav K d45b0a27e9 Updating to release NuGet.config. 2015-08-17 14:48:16 -07:00
Troy Dai 72ce66a300 Update packages' versions 2015-08-17 11:13:06 -07:00
Ajay Bhargav Baaskaran dad3e3ade3 [Fixes #441] Removed constructors from TagHelperAttributeDescriptor and
TagHelperDescriptor
2015-08-16 18:09:07 -07:00
N. Taylor Mullen 96f1090ff1 Fix Travis.
- Fixed test that had newlines but indexes not based on them.
2015-08-15 10:07:02 -07:00
N. Taylor Mullen cf1355245f Add `RestrictChildrenAttribute` specific `TagHelperDescriptorFactory` tests.
- We covered invalid tag names in the attribute but not the full end-to-end descriptor factory resolution piece.

#255
2015-08-14 23:52:50 -07:00
N. Taylor Mullen 465ff9713d Add ability for `TagHelper`s to specify restricted children.
- Specifying the `RestrictChildrenAttribute` enables `TagHelper`s to only allow other `TagHelper`s targeting specified names to be in the children.
- Used the `null` value to indicate that `AllowedChildren` was not specified and therefore everything is allowed. This is the default.
- Added name verification to name values to ensure that no bad values pass through the system.
- Added parsing tests to validate a mixture of content generates errors when expected.

#255
2015-08-14 23:13:57 -07:00
Pranav K 3361507c29 Remove ability to specify ignored '@' in the middle of non-string
TagHelper bound attributes.

Fixes #436
2015-08-14 18:12:31 -07:00
Ajay Bhargav Baaskaran 156f859edc Removed constructors from TagHelperAttributeDesignTimeDescriptor,
TagHelperDesignTimeDescriptor and TagHelperDirectiveDescriptor
2015-08-14 11:42:51 -07:00
N. Taylor Mullen e9292a0e30 Add ability to write start tag only `TagHelper` elements.
- To write a start tag only `TagHelper` you can now utilize the `TagStructure` property on the `TargetElement` attribute. If none is specified it'll be treated as unspecified and default to old behavior of being start/end tag or self-closing.
- Added `TagMode` to showcase what the user initially wrote in their Razor document. This way `TagHelper`s can flow end-to-end in thesame format as they were written with.
- Updated code generation to specify `TagMode` instead of the boolean self-closing.
- Updated existing tests to move from `SelfClosing` => `TagMode`.
- Added `TagStructure` related tests to the set of tests that we currently have for `TagHelperBlockRewriter` and `TagHelperParseTreeRewriter`.

#450
2015-08-13 16:18:06 -07:00
Ajay Bhargav Baaskaran 71c4c8dac6 [Fixes #428] Removed newlines at the end of razor comments 2015-08-13 15:06:09 -07:00
Kiran Challa b6765d370c Enable pinning build script 2015-08-12 05:29:04 -07:00
Chris R 713c16810c #481 React to CoreCLR Cryptography package changes. 2015-08-11 14:52:23 -07:00
sornaks 168fcbb9c1 Replacing BufferedEntryCollection with BufferedHtmlContent so any IHtmlContent can be added to a TagHelperContent.
- Introducing a new logic to calculate IsEmpty/IsWhitespace.
- Making Buffer private in DefaultTagHelperContent.
- Making SetContent non-abstract.
2015-08-10 14:54:10 -07:00
N. Taylor Mullen 4604c807c4 Add ability for unbound complex `TagHelper` attributes to flow through MVC attribute resolution system.
- Today MVC has specific rules about resolving Razor attribute values. Ex: `true` => attribute name being used as attribute value. This change ensures that unbound complex `TagHelper` attribute use that same logic.
- Added configuration to `GeneratedTagHelperContext` for `AddHtmlAttributeValues`.
- Had to be careful with code generating `AddHtmlAttributeValues`. In the case of `data-`; they can appear as complex attributes but may not contain any pieces that are `DynamicAttributeBlockChunk`s. Had to protect against this scenario.
- Updated existing test files.
- Added a new code gen test case to showcase the various use-cases of unbound dynamic `TagHelper` attributes.

#247
2015-08-10 11:29:22 -07:00
Troy Dai fa9f2ace5f Update CoreCLR versions 2015-08-04 10:15:31 -07:00
N. Taylor Mullen 48a6b567d6 Remove ~/ handling from core Razor.
- Removed parsing, chunk generation and code generation.
- Removed related tests.
- Did not modify existing unrelated tests with ~/ since it's just plain text and may be valid for end-users.

#427
2015-07-31 15:55:29 -07:00
N. Taylor Mullen a8fd85db1e Add ability to execute child content more than once.
- Added a boolean overload that specifies whether the user wants to retrieve cached content.
- Added tests to validate `TagHelperExecutionContext` `GetChildContentAsync` and that `TagHelperContext` passes the appropriate values through.

#459
2015-07-31 15:23:49 -07:00
Dejan Paležević 6a285ce70a Removed unnecessary blank line 2015-07-30 16:56:49 +02:00
N. Taylor Mullen 3b5692a5a5 Removed extra IVT from `Microsoft.AspNet.Razor`.
- Added tests to validate `IsStringProperty` on `TagHelperAttributeDescriptor`s.

#464
2015-07-28 14:58:59 -07:00