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

There is a newer version of this package available.
See the version list below for details.
Install-Package ExpressionToCodeLib -Version 1.3.0
dotnet add package ExpressionToCodeLib --version 1.3.0
<PackageReference Include="ExpressionToCodeLib" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ExpressionToCodeLib --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Supports Inferring enum constants in expressions such as "someVar == MyEnum.AMember"; Marked PAssertFailedException as obsolete (breaking change) since it is not necessarily thrown by PAssert on assertion failure.

Dependencies

This package has no dependencies.

Version History

Version Downloads Last updated
3.2.0 1,190 2/10/2019
3.1.0 3,882 7/10/2018
3.1.0-alpha 164 7/10/2018
3.0.0 340 6/27/2018
3.0.0-beta1 166 6/26/2018
3.0.0-alpha4 157 6/15/2018
3.0.0-alpha3 166 6/15/2018
3.0.0-alpha2 155 6/12/2018
3.0.0-alpha1 159 6/3/2018
2.7.0 5,063 2/19/2018
2.6.0 226 2/16/2018
2.6.0-signed 240 2/16/2018
2.5.1 4,984 10/30/2017
2.5.0 540 9/20/2017
2.4.1 245 8/23/2017
2.4.0 461 6/1/2017
2.3.0 229 6/1/2017
2.2.0 300 5/10/2017
2.1.0 260 5/5/2017
2.0.0 277 4/26/2017
2.0.0-beta7 226 4/10/2017
2.0.0-beta6 216 3/30/2017
2.0.0-beta5 234 3/30/2017
2.0.0-beta4 221 3/26/2017
2.0.0-beta3 203 3/26/2017
2.0.0-beta2 356 1/25/2017
2.0.0-alpha9 242 1/25/2017
2.0.0-alpha6 755 7/29/2016
2.0.0-alpha4 349 2/24/2016
2.0.0-alpha 270 2/7/2016
1.5.4 7,811 7/7/2015
1.5.3 1,963 6/15/2015
1.5.2 809 3/22/2015
1.5.1 475 3/10/2015
1.5.0 550 3/7/2015
1.4.8 970 1/21/2015
1.4.7 412 1/11/2015
1.4.6 1,987 8/30/2014
1.4.5 2,118 5/29/2014
1.4.4 3,805 4/9/2013
1.4.3 493 4/5/2013
1.4.2 462 3/29/2013
1.4.1 449 3/26/2013
1.4.0 471 3/12/2013
1.3.0 499 3/11/2013
1.2.0 480 3/8/2013
1.1.0.1 470 3/7/2013
1.1.0 469 3/7/2013
Show less