ExpressionToCodeLib 1.4.0
See the version list below for details.
dotnet add package ExpressionToCodeLib --version 1.4.0
NuGet\Install-Package ExpressionToCodeLib -Version 1.4.0
<PackageReference Include="ExpressionToCodeLib" Version="1.4.0" />
paket add ExpressionToCodeLib --version 1.4.0
#r "nuget: ExpressionToCodeLib, 1.4.0"
// Install ExpressionToCodeLib as a Cake Addin
#addin nuget:?package=ExpressionToCodeLib&version=1.4.0
// Install ExpressionToCodeLib as a Cake Tool
#tool nuget:?package=ExpressionToCodeLib&version=1.4.0
Generates valid, readable C# from an Expression Tree, and can annotate that code with runtime values. This can be useful for code generation and for unit testing: ExpressionToCode detects NUnit, xUnit.NET and MSTest and uses their assertions if available, and a normal Exception otherwise (so it runs fine outside those specific unit testing frameworks too).
ExpressionToCode was inspired by Power Asssert.NET. It differs from PowerAssert.NET by supporting a much larger portion of the lambda syntax and to respect C#'s normal operator precedence, in addition to general polish.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40-client is compatible. |
This package has no dependencies.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.5.2 | 113 | 3/22/2015 |
1.5.1 | 41 | 3/10/2015 |
1.5.0 | 117 | 3/7/2015 |
1.4.8 | 161 | 1/21/2015 |
1.4.7 | 1 | 1/11/2015 |
1.4.6 | 159 | 8/30/2014 |
1.4.5 | 144 | 5/29/2014 |
1.4.4 | 276 | 4/9/2013 |
1.4.3 | 90 | 4/5/2013 |
1.4.2 | 78 | 3/29/2013 |
1.4.1 | 96 | 3/26/2013 |
1.4.0 | 109 | 3/12/2013 |
1.3.0 | 88 | 3/11/2013 |
1.2.0 | 97 | 3/8/2013 |
1.1.0.1 | 51 | 3/7/2013 |
1.1.0 | 77 | 3/7/2013 |
Better layout in the face of non-fixed-width rendering: Although fixed-width rendering is the only way to be sure the subexpression annotations line up with the actual expression, ExpressionToCode now uses a mixture of normal spaces and en spaces in the subexpression annotation so that the alignment is roughly OK in many cases even with variable width fonts.
Supports inferring char constants in expressions such as "someVar == 'b'" (C# compiles these as integer constants, heuristics are used to identify those integers that were likely chars in the original code).