Expressif 0.1.15

There is a newer version of this package available.
See the version list below for details.
dotnet add package Expressif --version 0.1.15
                    
NuGet\Install-Package Expressif -Version 0.1.15
                    
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="Expressif" Version="0.1.15" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Expressif" Version="0.1.15" />
                    
Directory.Packages.props
<PackageReference Include="Expressif" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Expressif --version 0.1.15
                    
#r "nuget: Expressif, 0.1.15"
                    
#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.
#addin nuget:?package=Expressif&version=0.1.15
                    
Install as a Cake Addin
#tool nuget:?package=Expressif&version=0.1.15
                    
Install as a Cake Tool

Expressif

Expressif is the variable substitution syntax, initially designed for NBi.io.

Expressif allows you to define variables and transformation of these variables (functions), in plain text, which can then be interpreted by the engine. The syntax for the definition of the expression transforming the variable is similar to:

@myVariable | text-to-lower | text-to-pad-right(@myCount, *)

Logo

About | Quickstart | Installing | Functions

About

Social media: twitter badge

Releases: nuget licence badge

Dev. activity: GitHub last commit Still maintained GitHub commit activity

Continuous integration builds: Build status Tests

Status: stars badge Bugs badge Features badge Top language

Quickstart

var factory = new ExpressionFactory();
var expression = factory.Instantiate("text-to-lower");
var result = expression.Execute("Nikola Tesla")
Debug.WriteLine(result); // returns "nikola tesla"

Some functions required arguments, you can specify them between the brackets after the function name. Note that literal textual values don't required quotes surronding the values.

var factory = new ExpressionFactory();
var expression = factory.Instantiate("text-to-remove-chars(a)");
var result = expression.Execute("Nikola Tesla")
Debug.WriteLine(result); // returns "Nikol Tesl"

You can chain the functions to apply to the initial value by using the operator pipe (|). The functions are executed from left to right.

var factory = new ExpressionFactory();
var expression = factory.Instantiate("text-to-lower | text-to-remove-chars(a)");
var result = expression.Execute("Nikola Tesla")
Debug.WriteLine(result); // returns "nikol tesl"

It's possible to use variables as function parameters. the name of the variables must always start by an arobas (@)

var context = new Context();
context.Variables.Add("myChar", 'k');

var factory = new ExpressionFactory(context);
var expression = factory.Instantiate("text-to-lower | text-to-remove-chars(@myChar)");
var result = expression.Execute("Nikola Tesla")
Debug.WriteLine(result); // returns "niola tesla"

In addition to the variables that must be scalar values (text, numeric, dateTime ...), you can also add a property-object to the context. An property-object can be a pure C# object, a Dictionnary, a List or a DataRow. You can access the properties of the property-object based on the property's name with the syntax [property-name]

var context = new Context();
context.PropertyObject.Set(new {CharToBeRemoved = 't'});

var factory = new ExpressionFactory(context);
var expression = factory.Instantiate("text-to-lower | text-to-remove-chars([CharToBeRemoved])");
var result = expression.Execute("Nikola Tesla")
Debug.WriteLine(result); // returns "nikola esla"

or based on its position with the syntax #index (where index is positive number).

var context = new Context();
context.CurrentObject.Set(new List() {'e', 's'});

var factory = new ExpressionFactory(context);
var expression = factory.Instantiate("text-to-lower | text-to-remove-chars(#1)");
var result = expression.Execute(""Nikola Tesla"")
Debug.WriteLine(result); // returns "nikola tela"

It's also possible to use a function's result as the value of a parameter for another function. To achieve this the function as a parameter must be surrounded by curly braces {...}

var context = new Context();
context.Variable.Add("myVar", 6)
context.CurrentObject.Set(new List() {15, 8, 3});

var factory = new ExpressionFactory(context);
var expression = factory.Instantiate("text-to-lower | text-to-skip-last-chars( {@myVar | numeric-to-subtract(#2) }));
var result = expression.Execute(""Nikola Tesla"")
Debug.WriteLine(result); // sub-function returns 6-3 = 3 and the main function returns "nikola te"

Installing

Install in the usual .NET fashion:

Install-Package Expressif

Functions

TBC

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Expressif:

Package Downloads
NBi.Extensibility

Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Expressif:

Repository Stars
Seddryck/NBi
NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Access. The main goal of this framework is to let users create tests with a declarative approach based on an Xml syntax. By the means of NBi, you don't need to develop C# or Java code to specify your tests! Either, you don't need Visual Studio or Eclipse to compile your test suite. Just create an Xml file and let the framework interpret it and play your tests. The framework is designed as an add-on of NUnit but with the possibility to port it easily to other testing frameworks.
Version Downloads Last Updated
1.10.19 141 6/14/2025
1.10.18 153 6/4/2025
1.10.17 103 5/30/2025
1.10.16 129 5/23/2025
1.10.15 142 5/22/2025
1.10.13 208 4/2/2025
1.10.12 181 3/9/2025
1.10.11 386 1/20/2025
1.10.10 119 1/20/2025
1.10.9 115 1/10/2025
1.10.8 115 12/31/2024
1.10.7 110 12/31/2024
1.10.6 115 12/30/2024
1.10.5 123 12/26/2024
1.10.4 114 12/22/2024
1.10.1 130 12/16/2024
1.10.0 123 12/1/2024
1.9.11 127 11/22/2024
1.9.10 113 11/16/2024
1.9.9 177 9/14/2024
1.9.7 137 9/9/2024
1.9.6 131 9/8/2024
1.9.5 138 9/2/2024
1.9.4 137 8/26/2024
1.9.3 149 8/26/2024
1.9.2 158 8/24/2024
1.9.1 155 8/22/2024
1.9.0 212 7/29/2024
1.8.12 107 7/29/2024
1.8.11 114 7/29/2024
1.8.10 128 5/25/2024
1.8.9 132 5/14/2024
1.8.8 154 3/18/2024
1.8.7 132 3/18/2024
1.8.6 153 3/16/2024
1.8.5 146 2/27/2024
1.8.4 153 2/22/2024
1.8.3 138 2/17/2024
1.8.2 156 2/4/2024
1.8.1 138 1/30/2024
1.8.0 170 1/13/2024
1.7.0 137 1/13/2024
1.6.2 144 1/11/2024
1.6.1 132 1/11/2024
1.6.0 168 1/7/2024
1.5.0 159 1/7/2024
1.4.8 149 1/6/2024
1.4.7 153 1/6/2024
1.4.5 164 1/6/2024
1.4.4 158 1/6/2024
1.4.3 180 1/1/2024
1.4.2 142 12/31/2023
1.4.1 156 12/30/2023
1.4.0 153 12/30/2023
1.3.0 148 12/29/2023
1.2.0 148 12/29/2023
1.1.2 155 12/28/2023
1.1.1 143 12/28/2023
1.1.0 154 12/27/2023
1.0.0 153 12/22/2023
0.8.0 141 12/22/2023
0.7.0 128 12/22/2023
0.6.0 153 12/22/2023
0.5.0 163 12/22/2023
0.4.0 159 12/21/2023
0.3.48 154 12/21/2023
0.3.47 197 12/5/2023
0.3.46 165 12/5/2023
0.3.45 130 12/5/2023
0.3.44 143 12/5/2023
0.3.43 165 12/3/2023
0.3.39 161 12/3/2023
0.3.36 173 11/9/2023
0.3.35 157 11/6/2023
0.3.34 184 9/2/2023
0.3.33 180 8/17/2023
0.3.32 223 8/14/2023
0.3.31 210 8/9/2023
0.3.30 199 8/9/2023
0.3.29 209 8/8/2023
0.3.28 224 7/1/2023
0.3.27 199 6/14/2023
0.3.25 247 3/7/2023
0.3.24 294 3/5/2023
0.3.23 265 3/5/2023
0.3.22 276 3/5/2023
0.3.21 274 3/5/2023
0.3.20 272 3/5/2023
0.3.18 348 1/3/2023
0.3.17 343 1/3/2023
0.3.15 346 12/31/2022
0.3.14 341 12/31/2022
0.3.13 339 12/30/2022
0.3.11 371 12/29/2022
0.3.9 330 12/29/2022
0.3.8 333 12/29/2022
0.3.7 359 12/29/2022
0.3.6 345 12/28/2022
0.3.5 341 12/28/2022
0.3.4 357 12/28/2022
0.3.3 345 12/28/2022
0.3.2 336 12/26/2022
0.3.1 354 12/26/2022
0.3.0 350 12/26/2022
0.2.26 352 12/24/2022
0.2.25 357 12/23/2022
0.2.24 356 12/22/2022
0.2.23 338 12/22/2022
0.2.22 350 12/21/2022
0.2.21 361 12/21/2022
0.2.20 379 12/19/2022
0.2.18 372 12/18/2022
0.2.15 367 12/18/2022
0.2.14 355 12/18/2022
0.2.13 348 12/18/2022
0.2.12 364 12/18/2022
0.2.9 356 12/11/2022
0.2.8 353 12/11/2022
0.2.7 343 12/10/2022
0.2.6 353 12/10/2022
0.2.5 348 12/10/2022
0.2.4 371 12/6/2022
0.2.3 346 12/6/2022
0.2.2 394 11/26/2022
0.2.1 399 11/22/2022
0.2.0 382 11/21/2022
0.1.17 398 11/17/2022
0.1.16 394 11/15/2022
0.1.15 431 11/13/2022
0.1.13 412 11/12/2022
0.1.11 379 11/12/2022
0.1.10 386 11/12/2022
0.1.7 405 11/12/2022
0.1.6 401 11/12/2022