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.
Added newlines inbetween ending line pragma's and code. Without the extra line the document does not format correctly. Separated expression and statement padding functionality. Statements need to have 1 less padding to account for the transition. Changed how runtime and design time code generates to enable accurate debugging experiences in runtime and functional formatting experiences during design time.
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.
.NET FX Team will not be adding Char.GetUnicodeCategory because it breaks layering. We cannot have a dependency form System.Runtime.dll to System.Globalization.dll.
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.
This involved adding more boiler plate to the base of the visitor classes such as a Writer and a Context. By following this contract for new visitors we'll ensure that visitors have enough information to add new features to Razor.
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).
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.