Expressif 0.2.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package Expressif --version 0.2.6
                    
NuGet\Install-Package Expressif -Version 0.2.6
                    
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.2.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Expressif" Version="0.2.6" />
                    
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.2.6
                    
#r "nuget: Expressif, 0.2.6"
                    
#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.
#:package Expressif@0.2.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Expressif&version=0.2.6
                    
Install as a Cake Addin
#tool nuget:?package=Expressif&version=0.2.6
                    
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 and predicates

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 expression = new Expression("text-to-lower");
var result = expression.Evaluate("Nikola Tesla");
Assert.That(result, Is.EqualTo("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 expression = new Expression("text-to-remove-chars(a)");
var result = expression.Evaluate("Nikola Tesla");
Assert.That(result, Is.EqualTo("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 expression = new Expression("text-to-lower | text-to-remove-chars(a)");
var result = expression.Evaluate("Nikola Tesla");
Assert.That(result, Is.EqualTo("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<char>("myChar", 'k');

var expression = new Expression("text-to-lower | text-to-remove-chars(@myChar)", context);
var result = expression.Evaluate("Nikola Tesla");
Assert.That(result, Is.EqualTo("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.CurrentObject.Set(new { CharToBeRemoved = 't' });

var expression = new Expression("text-to-lower | text-to-remove-chars([CharToBeRemoved])", context);
var result = expression.Evaluate("Nikola Tesla");
Assert.That(result, Is.EqualTo("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<char>() { 'e', 's' });

var expression = new Expression("text-to-lower | text-to-remove-chars(#1)", context);
var result = expression.Evaluate("Nikola Tesla");
Assert.That(result, Is.EqualTo("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.Variables.Add<int>("myVar", 6);
context.CurrentObject.Set(new List<int>() { 15, 8, 3 });

var expression = new Expression("text-to-lower | text-to-skip-last-chars( {@myVar | numeric-to-subtract(#2) })", context);
var result = expression.Evaluate("Nikola Tesla");
Assert.That(result, Is.EqualTo("nikola te"));

Installing

Install in the usual .NET fashion:

Install-Package Expressif

Supported functions and predicates

Functions

Scope Name Aliases
IO file-to-creation-datetime creation-datetime
IO file-to-creation-datetime-utc creation-datetime-utc
IO file-to-size size
IO file-to-update-datetime update-datetime
IO file-to-update-datetime-utc update-datetime-utc
IO path-to-directory directory
IO path-to-extension extension
IO path-to-filename filename
IO path-to-filename-without-extension filename-without-extension
IO path-to-root root
Numeric null-to-zero
Numeric numeric-to-add
Numeric numeric-to-ceiling ceiling
Numeric numeric-to-clip
Numeric numeric-to-decrement decrement
Numeric numeric-to-divide divide
Numeric numeric-to-floor floor
Numeric numeric-to-increment increment
Numeric numeric-to-integer integer
Numeric numeric-to-invert invert
Numeric numeric-to-multiply multiply
Numeric numeric-to-round round
Numeric numeric-to-subtract
Special any-to-any
Special null-to-value
Special value-to-value
Temporal datetime-to-add
Temporal datetime-to-ceiling-hour ceiling-hour
Temporal datetime-to-ceiling-minute ceiling-minute
Temporal datetime-to-clip
Temporal datetime-to-date date
Temporal datetime-to-first-of-month first-of-month
Temporal datetime-to-first-of-year first-of-year
Temporal datetime-to-floor-hour floor-hour
Temporal datetime-to-floor-minute floor-minute
Temporal datetime-to-last-of-month last-of-month
Temporal datetime-to-last-of-year last-of-year
Temporal datetime-to-next-day next-day
Temporal datetime-to-next-month next-month
Temporal datetime-to-next-year next-year
Temporal datetime-to-previous-day previous-day
Temporal datetime-to-previous-month previous-month
Temporal datetime-to-previous-year previous-year
Temporal datetime-to-set-time set-time
Temporal datetime-to-subtract
Temporal date-to-age age
Temporal invalid-to-date
Temporal local-to-utc
Temporal null-to-date
Temporal utc-to-local
Text blank-to-empty
Text blank-to-null
Text empty-to-null
Text html-to-text
Text mask-to-text
Text null-to-empty
Text text-to-after after
Text text-to-before before
Text text-to-datetime
Text text-to-first-chars first-chars
Text text-to-html html
Text text-to-last-chars last-chars
Text text-to-length length
Text text-to-lower lower
Text text-to-mask mask
Text text-to-pad-left pad-left
Text text-to-pad-right pad-right
Text text-to-prefix prefix
Text text-to-remove-chars remove-chars
Text text-to-skip-first-chars skip-first-chars
Text text-to-skip-last-chars skip-last-chars
Text text-to-suffix suffix
Text text-to-token token
Text text-to-token-count token-count
Text text-to-trim trim
Text text-to-upper upper
Text text-to-without-diacritics without-diacritics
Text text-to-without-whitespaces without-whitespaces

Predicates

Scope Name Aliases
Boolean boolean-is-false false
Boolean boolean-is-false-or-null false-or-null
Boolean boolean-is-identical-to identical-to
Boolean boolean-is-true true
Boolean boolean-is-true-or-null true-or-null
Numeric numeric-is-equal-to equal-to
Numeric numeric-is-even even
Numeric numeric-is-greater-than greater-than
Numeric numeric-is-greater-than-or-equal greater-than-or-equal
Numeric numeric-is-integer integer
Numeric numeric-is-less-than less-than
Numeric numeric-is-less-than-or-equal less-than-or-equal
Numeric numeric-is-modulo modulo
Numeric numeric-is-odd odd
Numeric numeric-is-within-interval within-interval
Numeric numeric-is-zero-or-null zero-or-null
Special special-is-null null
Temporal temporal-is-after after
Temporal temporal-is-after-or-same-instant after-or-same-instant
Temporal temporal-is-before before
Temporal temporal-is-before-or-same-instant before-or-same-instant
Temporal temporal-is-contained-in contained-in
Temporal temporal-is-on-the-day on-the-day
Temporal temporal-is-on-the-hour on-the-hour
Temporal temporal-is-on-the-minute on-the-minute
Temporal temporal-is-same-instant same-instant
Text text-contains contains
Text text-ends-with ends-with
Text text-is-any-of any-of
Text text-is-empty empty
Text text-is-empty-or-null empty-or-null
Text text-is-equivalent-to equivalent-to
Text text-is-lower-case lower-case
Text text-is-sorted-after sorted-after
Text text-is-sorted-after-or-equivalent-to sorted-after-or-equivalent-to
Text text-is-sorted-before sorted-before
Text text-is-sorted-before-or-equivalent-to sorted-before-or-equivalent-to
Text text-is-upper-case upper-case
Text text-matches-date matches-date
Text text-matches-datetime matches-datetime
Text text-matches-numeric matches-numeric
Text text-matches-regex matches-regex
Text text-matches-time matches-time
Text text-starts-with starts-with
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 is compatible.  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.20 71 8/16/2025
1.10.19 168 6/14/2025
1.10.18 181 6/4/2025
1.10.17 126 5/30/2025
1.10.16 151 5/23/2025
1.10.15 163 5/22/2025
1.10.13 229 4/2/2025
1.10.12 203 3/9/2025
1.10.11 417 1/20/2025
1.10.10 144 1/20/2025
1.10.9 144 1/10/2025
1.10.8 139 12/31/2024
1.10.7 129 12/31/2024
1.10.6 136 12/30/2024
1.10.5 145 12/26/2024
1.10.4 135 12/22/2024
1.10.1 149 12/16/2024
1.10.0 143 12/1/2024
1.9.11 148 11/22/2024
1.9.10 133 11/16/2024
1.9.9 198 9/14/2024
1.9.7 154 9/9/2024
1.9.6 149 9/8/2024
1.9.5 161 9/2/2024
1.9.4 156 8/26/2024
1.9.3 168 8/26/2024
1.9.2 177 8/24/2024
1.9.1 175 8/22/2024
1.9.0 240 7/29/2024
1.8.12 126 7/29/2024
1.8.11 133 7/29/2024
1.8.10 149 5/25/2024
1.8.9 153 5/14/2024
1.8.8 179 3/18/2024
1.8.7 153 3/18/2024
1.8.6 172 3/16/2024
1.8.5 163 2/27/2024
1.8.4 173 2/22/2024
1.8.3 157 2/17/2024
1.8.2 177 2/4/2024
1.8.1 155 1/30/2024
1.8.0 189 1/13/2024
1.7.0 156 1/13/2024
1.6.2 165 1/11/2024
1.6.1 151 1/11/2024
1.6.0 188 1/7/2024
1.5.0 183 1/7/2024
1.4.8 169 1/6/2024
1.4.7 172 1/6/2024
1.4.5 182 1/6/2024
1.4.4 177 1/6/2024
1.4.3 204 1/1/2024
1.4.2 160 12/31/2023
1.4.1 174 12/30/2023
1.4.0 177 12/30/2023
1.3.0 165 12/29/2023
1.2.0 167 12/29/2023
1.1.2 173 12/28/2023
1.1.1 163 12/28/2023
1.1.0 175 12/27/2023
1.0.0 172 12/22/2023
0.8.0 159 12/22/2023
0.7.0 148 12/22/2023
0.6.0 172 12/22/2023
0.5.0 184 12/22/2023
0.4.0 178 12/21/2023
0.3.48 172 12/21/2023
0.3.47 211 12/5/2023
0.3.46 172 12/5/2023
0.3.45 138 12/5/2023
0.3.44 149 12/5/2023
0.3.43 172 12/3/2023
0.3.39 176 12/3/2023
0.3.36 180 11/9/2023
0.3.35 166 11/6/2023
0.3.34 207 9/2/2023
0.3.33 199 8/17/2023
0.3.32 250 8/14/2023
0.3.31 230 8/9/2023
0.3.30 230 8/9/2023
0.3.29 230 8/8/2023
0.3.28 246 7/1/2023
0.3.27 223 6/14/2023
0.3.25 274 3/7/2023
0.3.24 321 3/5/2023
0.3.23 299 3/5/2023
0.3.22 311 3/5/2023
0.3.21 302 3/5/2023
0.3.20 299 3/5/2023
0.3.18 373 1/3/2023
0.3.17 372 1/3/2023
0.3.15 372 12/31/2022
0.3.14 366 12/31/2022
0.3.13 365 12/30/2022
0.3.11 405 12/29/2022
0.3.9 358 12/29/2022
0.3.8 358 12/29/2022
0.3.7 386 12/29/2022
0.3.6 372 12/28/2022
0.3.5 368 12/28/2022
0.3.4 385 12/28/2022
0.3.3 380 12/28/2022
0.3.2 361 12/26/2022
0.3.1 381 12/26/2022
0.3.0 377 12/26/2022
0.2.26 377 12/24/2022
0.2.25 385 12/23/2022
0.2.24 391 12/22/2022
0.2.23 365 12/22/2022
0.2.22 378 12/21/2022
0.2.21 391 12/21/2022
0.2.20 406 12/19/2022
0.2.18 400 12/18/2022
0.2.15 401 12/18/2022
0.2.14 387 12/18/2022
0.2.13 378 12/18/2022
0.2.12 395 12/18/2022
0.2.9 383 12/11/2022
0.2.8 384 12/11/2022
0.2.7 370 12/10/2022
0.2.6 379 12/10/2022
0.2.5 373 12/10/2022
0.2.4 401 12/6/2022
0.2.3 372 12/6/2022
0.2.2 427 11/26/2022
0.2.1 427 11/22/2022
0.2.0 407 11/21/2022
0.1.17 426 11/17/2022
0.1.16 425 11/15/2022
0.1.15 464 11/13/2022
0.1.13 438 11/12/2022
0.1.11 408 11/12/2022
0.1.10 417 11/12/2022
0.1.7 439 11/12/2022
0.1.6 428 11/12/2022