- 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
- 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
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.
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
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.
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.
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.
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.
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).