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

No packages depend on ExpressionToCodeLib.

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

This package has no dependencies.

Version Downloads Last updated
3.5.0 41 03/13/2024
3.4.1 29 05/28/2024
3.4.0 25 05/28/2024
3.3.0 29 05/28/2024
3.2.0 32 05/28/2024
3.1.0 26 05/28/2024
3.1.0-alpha 27 05/30/2024
3.0.0 22 05/28/2024
3.0.0-beta1 26 05/30/2024
3.0.0-alpha4 26 05/28/2024
3.0.0-alpha3 26 05/28/2024
3.0.0-alpha2 31 05/28/2024
3.0.0-alpha1 29 05/28/2024
2.7.0 28 05/28/2024
2.6.0 27 05/28/2024
2.6.0-signed 29 05/28/2024
2.5.1 29 05/28/2024
2.5.0 29 05/28/2024
2.4.1 28 05/28/2024
2.4.0 29 05/28/2024
2.3.0 28 05/28/2024
2.2.0 29 05/22/2024
2.1.0 28 05/28/2024
2.0.0 29 05/28/2024
2.0.0-beta7 27 05/22/2024
2.0.0-beta6 26 05/30/2024
2.0.0-beta5 27 05/30/2024
2.0.0-beta4 30 05/28/2024
2.0.0-beta3 28 05/28/2024
2.0.0-beta2 31 05/28/2024
2.0.0-alpha9 31 05/28/2024
2.0.0-alpha6 27 05/28/2024
2.0.0-alpha4 27 05/28/2024
2.0.0-alpha 25 05/22/2024
1.5.4 26 05/28/2024
1.5.3 26 05/28/2024
1.5.2 24 05/28/2024
1.5.1 27 05/28/2024
1.5.0 29 05/28/2024
1.4.8 25 05/28/2024
1.4.7 25 05/28/2024
1.4.6 28 05/28/2024
1.4.5 27 05/28/2024
1.4.4 28 05/28/2024
1.4.3 24 05/28/2024
1.4.2 26 05/28/2024
1.4.1 30 05/28/2024
1.4.0 27 05/28/2024
1.3.0 25 05/28/2024
1.2.0 29 05/28/2024
1.1.0.1 27 05/28/2024
1.1.0 29 05/28/2024