Commit Graph

57 Commits

Author SHA1 Message Date
N. Taylor Mullen b1b1da0781 Add Microsoft.AspNet.Razor.Runtime src and test project.
#136
2014-10-09 12:50:52 -07:00
N. Taylor Mullen 950828cbab Refactored CodeGeneratorContext to CodeBuilderContext.
- Needed to separate the context's of "generation" and "building" to enable the communication of the TagHelperProvider.
2014-10-09 12:50:49 -07:00
N. Taylor Mullen 20824f37e0 Add tests to verify TagHelperParseTreeVisitor.
- Added tests to validate TagHelperParseTreeVisitor when dealing with valid HTML elements.

#71
2014-10-09 12:50:45 -07:00
N. Taylor Mullen bb3ad0ede4 Fix test to work with TH rewriters.
- Added understanding to the ParserTestBase for TagHelperBlock's
- Added a helper class MarkupTagHelperBlock to make building test TagHelpers easier.
- Fixed some existing tests that "new"d up the RazorParser and didn't obide by the new contract (to provide optimizers).

#71
2014-10-09 12:50:42 -07:00
Pranav K 83da8e257d Generate code for expressions in design time to enable intellisense
Fixes #80
2014-10-08 09:53:27 -07:00
David Fowler 9bb460d5ab Fixup references 2014-10-05 12:04:53 -07:00
David Fowler 6607fa5fdb Updated target framework 2014-10-04 02:53:12 -07:00
David Fowler 01605cd695 Fixed project.json casing 2014-10-04 02:52:07 -07:00
David Fowler 8d6684ab09 Renamed Project.json to Project.json2 2014-10-04 02:52:07 -07:00
Pranav K f913d8929f Updating CSharpCodeVisitor to generate implicit expressions on a single
line

Fixing 151
2014-10-01 17:20:00 -07:00
Pranav K d58a6c8c1b Don't calculate checksum in design time mode 2014-09-29 15:33:33 -07:00
Pranav K 5369842384 Ensure pragma checksum is prepended to generated file
Fixes #160
2014-09-29 14:45:26 -07:00
Pranav K 11ee402eec Reviving support for instrumentation in CSharpCodeVisitor
Fixes #42
2014-09-22 17:59:29 -07:00
N. Taylor Mullen 489caed17c Validate Tag Helper registration system functionality.
- This involved adding tests to cover GetTagHelpers methods on the default tag helper descriptor provider.

#70
2014-09-08 17:14:31 -07:00
N. Taylor Mullen a9f6a63e7f Test nested tags in script tag fix.
#115
2014-09-08 17:08:45 -07:00
David Fowler 947ec326e0 Updated to use the new target framework in project.json 2014-08-28 23:43:51 -07:00
N. Taylor Mullen acefdf5f2e Fix tests to work with new TagBlock parsing format.
- These are the fixes to the tests that could not be fixed by altering the core parsing code base.
- Most involve adding TagBlock's, breaking out existing markup blocks and altering some AcceptedCharacter formats.
- Was able to loosen the restrictions on AcceptedCharacter's to allow the body of html tags to accept any character.

#75
2014-08-27 14:13:36 -07:00
N. Taylor Mullen 6114d5d269 Modify parser to group html begin/end elements.
- Added a "Tag" block type.
- Wrapped all begin/end elements in a "Tag" Markup block.

#75
2014-08-26 14:53:09 -07:00
Ryan Nowak ff944e5948 Fix for Razor #84 - Optimize GetSourceLocation
GetSourceLocation is frequently called to determine the location mappings
between the original document and the generated code.

The old implementation did a number of ToString and replace operations to
simplify the math on tracking the position - which put it front and center
in our performance measurements - about 25% of all execution time in a
sampling profile of our perf test.

The new code tracks position as code is written, and avoids allocations.
After these changes GetSourceLocation doesn't show up in the profile.
2014-08-20 13:22:23 -07:00
David Fowler 430105e713 Removed source files from the project 2014-08-15 09:24:16 -07:00
David Fowler 0d1f308753 Renamed configurations to frameworks in project.json 2014-07-13 22:00:23 -07:00
David Fowler 50a281b92d Fixed build break due to adding configurations 2014-07-10 09:56:18 -07:00
David Fowler e4911323a6 React to resource changes
#59
2014-06-25 23:48:19 -07:00
Brice Lambson c0fe1428b2 Bump version to 4.0.0-* 2014-06-19 16:44:54 -07:00
N. Taylor Mullen 8099dcda63 Remove error for "@" in nested codeblocks.
Also removed the corresponding test and resource for this change.

#64
2014-06-18 14:51:31 -07:00
N. Taylor Mullen 879a50846a Transition Microsoft.AspNet.Razor.Test from csproj to kproj.
The largest sub-segment change was removing the Microsoft.TestCommon project.  Ultimately it involved touching every test file and re-mapping them to use Xunit directly instead of a helper class which was initially ported over for legacy reasons.  Lastly how files were embedded before included the full path to the embedded file; currently there is no path associated with the embedded files so had to make modifications to account for this.  This is a temporary change and I left comments in the locations where we'll need to uncomment out old code once embeded files act the same as they used to.

#18
2014-06-04 14:58:04 -07:00
Pranav K 4f255f8583 Changes for @inject support
Fixes #35
2014-06-03 14:20:11 -07:00
N. Taylor Mullen e324ddb19f Add partial parsing test for await.
#45
2014-05-15 10:52:04 -07:00
N. Taylor Mullen 9bd2fdecac Modified tests to account for await accepting dots.
#45
2014-05-15 10:52:01 -07:00
N. Taylor Mullen 662dc087bd Addressed code review comments.
#28
2014-05-09 14:49:02 -07:00
N. Taylor Mullen 32f6f4df00 Modify tests to account for new generated output.
Added pragma warning disable 1998 to surrounded generated execute method.

#28
2014-05-09 11:09:45 -07:00
N. Taylor Mullen 20c91146f1 Remove copyright header from generated test files. 2014-05-09 11:08:22 -07:00
N. Taylor Mullen 570760ddc7 Modified tests to account for new code generation.
#30
2014-05-09 11:06:30 -07:00
Andrew Peters 477141564f Updating copyright headers 2014-05-08 23:01:26 -07:00
anpete 6c2130239f Update file headers 2014-05-01 17:40:52 -07:00
Pranav K 9c4a6e901d Modifying DefineSection to generate HelperResult types 2014-04-01 18:32:37 -07:00
N. Taylor Mullen 4cfef3c6d1 Add tests to verify flexibility of await keyword.
Added sample files to evaluate accuracy of generated code for the await keyword.  Also added a line mapping test to ensure that we're mapping the keyword correctly.
2014-03-18 12:37:16 -07:00
N. Taylor Mullen aef8a79081 Update tests to verify async rendering.
Also changed naming of the CreateBuilder method in the Razor language to CreateCodeBuilder.
2014-03-17 11:29:19 -07:00
N. Taylor Mullen b1c49a2535 Remove CodeDOM from net45 Razor.
Removed all System.CodeDOM related code from net45.  This involved modifying some existing code paths and most of all reducing the complexity of all of the CodeGenerators.  Added some factory creation methods to build CodeBuilders.  Ran code analysis and made adjustments to pass analysis.
2014-03-14 16:05:23 -07:00
N. Taylor Mullen 6ea8d7721b Re-applied code review changes for formatting fix.
The previous fix was accidentally overridden.  Also changed how we
render chunk block's children.  New way avoids casts and removes logic
from base.
2014-03-05 11:24:06 -08:00
N. Taylor Mullen b6082d1523 Modify tests to account for no indent helpers.
Modified outputs of generated files to not indent helpers.  Also fixed LineMapping verifications.
2014-03-04 12:05:59 -08:00
N. Taylor Mullen f5759635b1 Modify tests to account for no indent helpers.
Modified outputs of generated files to not indent helpers.  Also fixed LineMapping verifications.
2014-02-26 11:12:12 -08:00
N. Taylor Mullen 49ffb5ae81 Map semicolon's in using statements.
This allows for users to write "@using System;" and still have proper intellisense and mapping.  Also removed some legacy code that I came across when running tests.
2014-02-25 14:14:02 -08:00
N. Taylor Mullen f43a17369c Transition tests to use new CodeTree.
Previously they would use CodeDOM dependent concepts.
2014-02-13 15:03:19 -08:00
N. Taylor Mullen 8db45f7564 Add user-based padding support.
Added a CSharpPaddingBuilder based on the existing
CodeGeneratorPaddingHelper to allow accurate padding within the generated
C# files.  Also created tests based on the existing PaddingTest tests to
verify padding functionality.
2014-02-12 12:07:39 -08:00
Pranav K 63e55ce776 Updating resx strings to use tt format 2014-02-12 10:11:23 -08:00
N. Taylor Mullen d85927166b Remove unneeded chunk data.
Instead lets keep utilizing the Context's state to properly generate a C# file.
2014-02-10 11:49:49 -08:00
N. Taylor Mullen 57e0ef4774 Revert changes to CSharpDesignTimeHelpersVisitor.
Without the initial code tree acceptance you end up stack overflowing.  Also removed a validation check that ensures that there's always a base type (not true).
2014-02-04 11:59:50 -08:00
Pranav K 57854b2cc0 Refactoring CSharpCodeWriter
* Using CodeGeneratorContext to pass around metadata.
* Tweaks in CSharpCodeWriter to use the right type name
* Adding a sample unit test
2014-02-03 17:04:09 -08:00
Pranav K 1634c74ff4 Remove and sort usings across the solution 2014-01-31 10:24:07 -08:00