Commit Graph

37 Commits

Author SHA1 Message Date
N. Taylor Mullen e5e4a22966 Update LICENSE.txt and license header on files. 2015-05-01 13:58:52 -07:00
Doug Bunting 3f7c75e299 Remove and sort `using`s; reacting to #320 change
- automated pass then restore any `using`s the compiler needs
- in a couple of cases, make `using` conditional
2015-04-07 17:08:09 -07:00
Doug Bunting e469b26b45 Rationalize some names and namespaces
- #320
- `ParserErrorSink` -> `ErrorSink`
- move `ErrorSink`, `RazorError`, and `SourceLocation` to root namespace
- move `RazorErrorTest` and `SourceLocationTest` to root test namespace
2015-04-07 17:08:03 -07:00
N. Taylor Mullen 7d7b2795e1 Change tests to utilize Environment.NewLine.
- Normalized newlines for code generation tests. We default all tests to use \r\n. This way we can have a consistent test experience cross plat.
- For tests that expected indexes that were affected by new lines I modified them to account for cross plat scenarios.
- Added a few test classes to ensure we could normalize newlines for codegen tests.

#106
2015-04-03 23:50:21 -07:00
N. Taylor Mullen 04276b5ddf Update aspnet50/aspnetcore50 => dnx451/dnxcore50. 2015-03-08 12:54:58 -07:00
Doug Bunting 26afdbd889 Plumb `ParserErrorSink` through to `CodeBuilderContext`
- precursor for #129
- remove unused `GeneratorResults` ctor to avoid duplicating `ParserResults` code

nit: make a few `ParserResults` properties immutable
- also change `ParserErrors` type to `IEnumerable<RazorError>`
2015-01-15 16:31:33 -08:00
Doug Bunting 26034fb5b2 Apply VS' FormatDocument and RemoveAndSort to all *.cs files
- #EngineeringDay

Did not change any files under test/Microsoft.AspNet.Razor.Test/TestFiles
- avoiding need to redo hashes
2014-11-20 14:43:16 -08:00
Doug Bunting 0f724a51df Delete trailing whitespace
- #EngineeringDay
- Total replaced: 506  Matching files: 118

Did not change any files under test/Microsoft.AspNet.Razor.Test/TestFiles
- avoiding need to redo hashes
2014-11-20 14:16:32 -08:00
N. Taylor Mullen 7ab25918e0 Add tests to validate @removetaghelper functionality.
- Added utility methods to construct valid SyntaxTreeNodes that represent the @removetaghelper directive.
- Added parse level unit tests to validate the @removetaghelper generates an accurate SyntaxTreeNode.
- Added parse level unit tests to validate the @removetaghelper throws with bad formats.
- Added TagHelperRegistration unit tests to validate the AddOrRemoveTagHelperCodeGenerators are understood and affect the descriptors found.
- Added Designtime mapping tests to validate correct source mappings are made to ensure proper coloring and lack-of C# intellisense.
- Added end-to-end tests to validate @removetaghelper can essentially disable TagHelpers on a page.

#112
2014-10-29 11:31:00 -07:00
Pranav K 21d64b4ae2 MQ: Cleanup to use var 2014-10-22 15:35:43 -07:00
Pranav K 473f642dde Modifying tests to run in both in aspnet50 and aspnetcore50
* Additionally trimming references from project.json
2014-10-19 21:18:43 -07:00
N. Taylor Mullen f8020e8e85 Make @addtaghelper directive not be nested.
- Whenever we encounter an @addtaghelper directive we add it to the CodeTree at the top level (not nested in any chunk blocks).
- Added a test to validate that @addtaghelper inside of a ChunkBlock doesn't add to the ChunkBlock's children.

#195.
2014-10-15 12:10:27 -07:00
NTaylorMullen b37b11d4b6 Add tests to validate TagHelperDescriptorResolver.
- Tested the descriptor resolver and its underlying dependencies (TagHelperTypeResolver and TagHelperDescriptorFactory).

#99
#158
2014-10-09 12:57:52 -07:00
N. Taylor Mullen 7db4ed7f7e Add tests to validate @addtaghelper directive.
- Fixed existing tests to work with new RazorParser.
- Validated directive syntax tree creation, errors and code generation.

#111
2014-10-09 12:57:46 -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
Pranav K 11ee402eec Reviving support for instrumentation in CSharpCodeVisitor
Fixes #42
2014-09-22 17:59:29 -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
David Fowler e4911323a6 React to resource changes
#59
2014-06-25 23:48:19 -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 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
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
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 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 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
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
N. Taylor Mullen 73dae5fcaa Added an output validator to make a best-effort attempt at validating old and new codeDOM/codeTree output. 2014-01-28 17:05:48 -08:00
N. Taylor Mullen 3a214ab213 ifdef all of the razor bits that are reliant on non-coreclr bits.
Big thing we're missing is Char.GetUnicodeCategory(...) and Thread.Yield.  Tried to do my best to fill in the blanks.  Ripped out VB.
2014-01-27 18:52:02 -08:00
N. Taylor Mullen 521a5c8517 Start to add a CodeTree codegen.
This addition will eventually replace CodeDOM to allow for the k10 project to build.  It is a new type of codegeneration method that is highly extensible.
2014-01-27 16:46:17 -08:00