Commit Graph

73 Commits

Author SHA1 Message Date
N. Taylor Mullen 2800c4938a Disable async await warnings in empty Execute method.
Also removed a confusing CSharpCodeWriting method.

#28
2014-05-09 11:09:41 -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
N. Taylor Mullen 9b267dadbd Modify line pragma formatting supporters.
Modified the dummy line pragmas arround expression chunk blocks to be accurate to avoid bad error messages.

#30
2014-05-09 11:06:28 -07:00
Andrew Peters 477141564f Updating copyright headers 2014-05-08 23:01:26 -07:00
Eilon Lipton 756661d4cc Create LICENSE.txt 2014-05-08 16:34:16 -07:00
Louis DeJardin 09d066cec1 Updating build scripts 2014-05-02 15:07:37 -07:00
Louis DeJardin 90b64298d5 Updating build scripts 2014-05-02 14:45:22 -07:00
anpete 6c9899b586 Merge branch 'dev' of github.com:aspnet/Razor into dev 2014-05-01 17:41:03 -07:00
anpete 6c2130239f Update file headers 2014-05-01 17:40:52 -07:00
N. Taylor Mullen c4f034e8ad Re-updated version to System.IO.FileSystem. 2014-05-01 17:10:57 -07:00
N. Taylor Mullen 039c304d25 Upgrade FileSystem dependency. 2014-05-01 17:01:58 -07:00
N. Taylor Mullen 9abd67da4b Cleaned up some code writer code.
Modified the ToString override to be GenerateCode and fixed how it cached.
2014-04-22 15:21:09 -07:00
Pranav K 9c4a6e901d Modifying DefineSection to generate HelperResult types 2014-04-01 18:32:37 -07:00
Pranav K 3ce198249d Updating CoreCLR package versions 2014-03-27 18:42:51 -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 50314ca7e5 Add the ability for users to await expressions.
This enabled things like @await Foo().  We special case the await keyword and allow another snippet of code to follow it.
2014-03-18 12:37:07 -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 5912475a24 Change Execute rendering to be async.
Added the using statement required for async rendering.
2014-03-17 11:28:43 -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
David Fowler 10c10ab2e7 Added required packages for K 2014-03-07 02:46:45 -08: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 549e36b803 Fix CodeGeneration process to format correctly within cshtml.
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.
2014-03-04 12:06:00 -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 9f05cf8fbb Write helper method template functions with no indent.
Also removed capturing of the LineMapping (wasn't being used) for the CSharpHelperVisitor.
2014-02-26 11:12:02 -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
David Fowler c28b1c538d Merge pull request #12 from nguerrera/dev
Remove #if NET45 for GetUnicodeCategory and just use CharUnicodeInfo everywhere.
2014-02-18 10:51:53 -08:00
Nick Guerrera 2bdbd49966 Remove #if NET45 for GetUnicodeCategory and just use CharUnicodeInfo everywhere.
.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.
2014-02-17 23:28:52 -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 da192d7c96 Fix scoping spacing for pragmas and curly braces.
If the writer did not write anything it would throw when attempting to do .Last().
2014-02-13 14:32:04 -08:00
N. Taylor Mullen cadc2fc67e Add comparison methods to mapping classes.
This involved adding Equals and == methods to LineMapping.cs and MappingLocation.cs.
2014-02-13 14:32:02 -08:00
N. Taylor Mullen fa342287ad Move semicolon out from pragma for usings. 2014-02-13 14:32:00 -08:00
N. Taylor Mullen 2ff6c12347 Move helper function accessor code outside pragma. 2014-02-13 14:31:58 -08:00
N. Taylor Mullen dcf35ca20b Add padding support to the functions directive.
Exposed the CreateCodeMapping method on the CSharpCodeVisitor.
2014-02-13 14:31:38 -08:00
Pranav K 3afb31b78b Modify SetBaseTYpeCodeGenerator to use value from BaseType instead of
parsed content
2014-02-13 12:45:04 -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 ff80c86e0c Fixed common resources resx. 2014-02-10 11:57:49 -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
David Fowler 47b09a9f31 Workaround myget being down 2014-02-07 10:08:47 -08:00
N. Taylor Mullen bc3d32ec74 Modify base Visitor class to be more generic.
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.
2014-02-04 14:56:00 -08:00
N. Taylor Mullen a9d4cd9089 Remove Snippet dependency
No need to have a snippet class when we only ever use the value of a snippet and only ever have one.
2014-02-04 14:53:52 -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 68bb44d73e Updating Resx designer file to minimize conflicts after resx change 2014-02-03 13:33:00 -08:00
Pranav K 12fa69c7bc Updating build.cmd to cache NuGet.exe 2014-02-02 08:18:43 -08:00
Pranav K 1634c74ff4 Remove and sort usings across the solution 2014-01-31 10:24:07 -08:00
N. Taylor Mullen 7f0878c1b8 Comment ifdefs and fix K10 functionality 2014-01-30 15:50:20 -08:00
Pranav K 9f80b7d1c8 Relocation resx file to root so that it's correctly embedded 2014-01-29 22:23:45 -08:00