pauldeen79.ExpressionFramework.Domain 0.7.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package pauldeen79.ExpressionFramework.Domain --version 0.7.3
NuGet\Install-Package pauldeen79.ExpressionFramework.Domain -Version 0.7.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="pauldeen79.ExpressionFramework.Domain" Version="0.7.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add pauldeen79.ExpressionFramework.Domain --version 0.7.3
#r "nuget: pauldeen79.ExpressionFramework.Domain, 0.7.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install pauldeen79.ExpressionFramework.Domain as a Cake Addin
#addin nuget:?package=pauldeen79.ExpressionFramework.Domain&version=0.7.3

// Install pauldeen79.ExpressionFramework.Domain as a Cake Tool
#tool nuget:?package=pauldeen79.ExpressionFramework.Domain&version=0.7.3

ExpressionFramework

Evaluates expressions.

Example:

var expression = new FieldExpression("Name");
var context = new { Name = "Hello world!" };
var result = expression.Evaluate(context).Value;
// generates: Hello world!

See unit tests for more examples.

Code generation

I am currently not storing generated files in the code repository. To generate, simply run the console project from either Visual Studio (hit F5) or a command prompt. This will replace almost all generated code.

There are some files (evaluatables, expressions, operators and aggregators) being generated for the first time only. This is known as code scaffolding, which happens when you add a new evaluatable, expression, operator or aggregator type.

Code generation

I am currently not storing generated files in the code repository. To generate, you have to trigger the code generation tool from either Visual Studio (hit F5) or a command prompt. This will replace all generated code.

I am using t4plus, which is a dotnet global tool, so it can run on all environments. The models and code generation are stored in an assembly which is also added to the solution. Note that there is no project reference to this project, it is only needed at build time.

At this moment, I am not using automatic code generation after changing code generation models or providers. This can be enabled, but is a bit cumbersome in build pipelines. First, the file system isn't updated fast enough, so the build will not succeed on a fresh cloned instance. Second, Sonar runs the post build command in a Docker image, and this image doesn't know how to load the code generation tool. Because of these problems, I have commented the post build event. You may uncomment it if you find yourself constantly re-generating stuff.

Command to install t4plus:

dotnet tool install --global pauldeen79.TextTemplateTransformationFramework.T4.Plus.Cmd --version 0.2.5

Command to build code generation project (example where you are in the root directory):

dotnet build -c Debug src/ExpressionFramework.CodeGeneration/ExpressionFramework.CodeGeneration.csproj

Command to run code generation (example where you are in the root directory):

Invoke-Expression "t4plus assembly -a $(Resolve-Path "src/ExpressionFramework.CodeGeneration/bin/Debug/net7.0/ExpressionFramework.CodeGeneration.dll") -p $(Resolve-Path "src") -u $(Resolve-Path "src/ExpressionFramework.CodeGeneration/bin/Debug/net7.0")"

Note that the -a argument of the t4plus assembly command currently requires a fully qualified path to the code generation assembly.

You can use the following post build event in the code generation project to run it automatically after changing code generation models or providers:

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
  <Exec Command="t4plus assembly -a $(TargetDir)ExpressionFramework.CodeGeneration.dll -p $(TargetDir)../../../../ -u $(TargetDir)" />
</Target>

Note that if you use a post build event, this will cause SonarCloud to fail because t4plus is not available in the docker image where the code analysis runs. To fix this, you need the following PowerShell script:

((Get-Content -path src/ExpressionFramework.CodeGeneration/ExpressionFramework.CodeGeneration.csproj -Raw) -replace 't4plus','echo') | Set-Content -Path src/ExpressionFramework.CodeGeneration/ExpressionFramework.CodeGeneration.csproj
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on pauldeen79.ExpressionFramework.Domain:

Package Downloads
pauldeen79.QueryFramework.Abstractions

Package Description

pauldeen79.ExpressionFramework.Domain.Specialized

Package Description

pauldeen79.ExpressionFramework.Parser

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.7.5 395 5/9/2024
0.7.4 417 5/3/2024
0.7.3 238 5/3/2024
0.7.2 231 5/2/2024
0.7.1 527 4/17/2024
0.6.3 494 3/22/2024
0.6.2 391 3/15/2024
0.6.1 1,160 11/24/2023
0.6.0 795 11/19/2023
0.5.15 948 9/13/2023
0.5.14 317 9/9/2023
0.5.13 218 9/9/2023
0.5.12 850 5/28/2023
0.5.9 315 5/11/2023
0.5.8 824 5/11/2023
0.5.7 264 5/11/2023
0.5.6 258 5/11/2023
0.5.5 240 5/11/2023
0.5.4 1,219 5/9/2023
0.5.3 214 5/9/2023
0.5.2 231 5/9/2023
0.5.1 230 5/6/2023
0.4.7 389 4/12/2023
0.4.6 254 4/10/2023
0.4.5 229 4/9/2023
0.4.4 239 4/9/2023
0.4.3 283 4/7/2023
0.4.2 260 4/6/2023
0.4.1 462 12/31/2022
0.4.0 464 9/17/2022