Skip to main content
ExpressionToCodeLib package icon

ExpressionToCodeLib

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.

Total Downloads
504.7K
504,708
Published
Jan 25, 2017
Latest stable version

Install

.NET CLI
dotnet add package ExpressionToCodeLib --version 2.0.0-alpha9
Package Manager Console
Install-Package ExpressionToCodeLib -Version 2.0.0-alpha9
PackageReference
<PackageReference Include="ExpressionToCodeLib" Version="2.0.0-alpha9" />

Frameworks

No framework metadata available.

Dependencies

No declared dependencies.

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.