Commit Graph

111 Commits

Author SHA1 Message Date
David Fowler 0d1f308753 Renamed configurations to frameworks in project.json 2014-07-13 22:00:23 -07:00
N. Taylor Mullen c7545a0354 Add a virtual BuildClassDeclaration method to CSharpCodeBuilder.
This extensibility point needs to be an override and not a pure visitor due to how the class declaration is created (only 1 right way to write the class).

#76
2014-06-27 10:26:52 -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 9a6a3af450 Transition Microsoft.AspNet.Razor from csproj to kproj.
Needed to modify some source to use new resx format.

#32
2014-06-04 14:58:01 -07:00
N. Taylor Mullen dd90767036 Fix build warnings in razor repo.
This involved indicating that we really wanted to hide certain methods.

#43
2014-06-04 14:25:13 -07:00
Pranav K 4f255f8583 Changes for @inject support
Fixes #35
2014-06-03 14:20:11 -07:00
N. Taylor Mullen d0541ad5b2 Modify await keyword to accept dots.
When doing Html.Foo we used to not accept the "." and then group the rest of the line together at the end.

#45
2014-05-15 10:51:59 -07:00
Yishai Galatzer bd7045b258 Cleanup assemblyinfo.cs + .gitignore 2014-05-11 08:54:40 -07:00
N. Taylor Mullen 662dc087bd Addressed code review comments.
#28
2014-05-09 14:49:02 -07:00
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 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
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 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 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 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
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
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 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
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
David Fowler b1ff6d32d3 Fixed up resources. 2014-01-27 21:30:53 -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
David Fowler c1321773a7 Removed csproj files. 2014-01-25 17:24:15 -08:00
David Fowler be66f594af Updated project files. 2014-01-25 02:27:44 -08:00
David Fowler 854cb87b42 Updated version 2014-01-24 01:21:42 -08:00
David Fowler 77dd7e40eb Updated build. 2014-01-23 23:12:34 -08:00
David Fowler 084d6e3544 Added initial build. 2014-01-21 20:17:07 -08:00
N. Taylor Mullen af14969b54 Added tests project. 2014-01-18 14:18:55 -08:00
N. Taylor Mullen 72e37d7ac6 Update code to be the latest bits. 2014-01-17 15:43:57 -08:00
David Fowler 50179ad99b Removed uneeded dependencies. 2014-01-11 23:06:03 -08:00
David Fowler ff854e3e15 Initial commit. 2014-01-11 20:12:30 -08:00