handlebars_net_helpers - Handlebars.Net.Helpers.DynamicLinq 2.5.2-ci-110493
Handlebars.Net.Helpers DynamicLinq
PM> Install-Package Handlebars.Net.Helpers.DynamicLinq -Version 2.5.2-ci-110493 -Source https://www.myget.org/F/handlebars_net_helpers/api/v3/index.json
> nuget.exe install Handlebars.Net.Helpers.DynamicLinq -Version 2.5.2-ci-110493 -Source https://www.myget.org/F/handlebars_net_helpers/api/v3/index.json
> dotnet add package Handlebars.Net.Helpers.DynamicLinq --version 2.5.2-ci-110493 --source https://www.myget.org/F/handlebars_net_helpers/api/v3/index.json
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.5.2-ci-110493" />
Copy to clipboard
source https://www.myget.org/F/handlebars_net_helpers/api/v3/index.json
nuget Handlebars.Net.Helpers.DynamicLinq ~> 2.5.2-ci-110493
Copy to clipboard
> choco install Handlebars.Net.Helpers.DynamicLinq --version 2.5.2-ci-110493 --source https://www.myget.org/F/handlebars_net_helpers/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "handlebars_net_helpers" -SourceLocation "https://www.myget.org/F/handlebars_net_helpers/api/v2"
Install-Module -Name "Handlebars.Net.Helpers.DynamicLinq" -RequiredVersion "2.5.2-ci-110493" -Repository "handlebars_net_helpers" -AllowPreRelease
Copy to clipboard
Handlebars.Net.Helpers
Several helpers which can be used for Handlebars.Net
Project
| Build Azure | |
| Sonar Quality | |
| Coverage |
Packages
| Package | Nuget | MyGet :information_source: |
|---|---|---|
| Handlebars.Net.Helpers | ||
| Handlebars.Net.Helpers.DynamicLinq | ||
| Handlebars.Net.Helpers.Humanizer | ||
| Handlebars.Net.Helpers.Json | ||
| Handlebars.Net.Helpers.Random | ||
| Handlebars.Net.Helpers.Xeger | ||
| Handlebars.Net.Helpers.XPath | ||
| Handlebars.Net.Helpers.Xslt |
Framework support
- .NET Framework 4.5.1 4.5.2 and 4.6
- .NET Standard 1.3, 2.0 and 2.1
- .NET 6.0 and .NET 8.0
:exclamation: Breaking changes
2.5.0
Some breaking changes are introduced in this version:
A. EnvironmentHelpers
By default, the category Environment is not automatically registered due to potential security issues.
You need to allow this via the HandlebarsHelpersOptions.
B. System.Linq.Dynamic.Core
By default, the category DynamicLinq is not automatically registered due to a CVE in System.Linq.Dynamic.Core DynamicLinq.
This means that the NuGet Handlebars.Net.Helpers.DynamicLinq will not be loaded and registered automatically anymore.
You need to allow this via the HandlebarsHelpersOptions. In addition, an extra configuration setting is added to allow the use of ToString and Equals on an object.
Example:
var handlebarsContext = HandlebarsDotNet.Handlebars.Create();
HandlebarsHelpers.Register(handlebarsContext, o =>
{
o.DynamicLinqHelperOptions = new HandlebarsDynamicLinqHelperOptions
{
AllowEqualsAndToStringMethodsOnObject = true
};
});
Usage
Register
Get all helpers
var handlebarsContext = HandlebarsDotNet.Handlebars.Create();
HandlebarsHelpers.Register(handlebarsContext);
Get a specific helper
var handlebarsContext = HandlebarsDotNet.Handlebars.Create();
HandlebarsHelpers.Register(handlebarsContext, Category.String);
Get multiple helpers
var handlebarsContext = HandlebarsDotNet.Handlebars.Create();
HandlebarsHelpers.Register(handlebarsContext, Category.Math, Category.String);
Using
With a category prefix (default)
By default you can use the helpers by using a prefix from the category:
{{[String.Append] "foobar" "bar"}}
With an additional custom prefix
If you would like to use the helpers with a custom prefix, you need to register the helpers using this code:
HandlebarsHelpers.Register(handlebarsContext, options => { Prefix = "custom"; });
Now you can only access the helpers by using the custom prefix, category prefix and the name like:
{{[custom.String.Append] "foobar" "bar"}}
With a custom prefix separator character
By default the dot (.) character is used, use the code below to use a different value:
HandlebarsHelpers.Register(handlebarsContext, options => { PrefixSeparator = "-"; });
Now you can only access the helpers by using the - separator like this:
{{[String-Append] "foobar" "bar"}}
Without a prefix
If you would like to use the helpers without a prefix, so just by name, use this code:
HandlebarsHelpers.Register(handlebarsContext, options => { UseCategoryPrefix = false; });
Now you can use it like:
{{String-Append "foobar" "bar"}}
Now you can access the helpers by just using the name like:
{{Append "foobar" "bar"}}
The following default built-in helpers are available:
And the following additonal helpers are available:
References
- Thanks to https://github.com/rexm/Handlebars.Net
- Some ideas based on https://github.com/helpers/handlebars-helpers
- Some code based on https://www.30secondsofcode.org/c-sharp/t/string/p/1
- Some documentation based on https://github.com/arinet/HandlebarDocs
- SimpleJson copied from (https://github.com/facebook-csharp-sdk/simple-json)
Example
- Static WebAssembly WebSite on GitHub Pages: handlebars-net.github.io/Handlebars.Net.Helpers
Created with Abies.
See CHANGELOG.md
-
.NETFramework 4.5.1
- Handlebars.Net.Helpers (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Core (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Json (>= 2.5.2-ci-110493)
- System.Linq.Dynamic.Core (>= 1.6.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 4.5.2
- Handlebars.Net.Helpers (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Core (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Json (>= 2.5.2-ci-110493)
- System.Linq.Dynamic.Core (>= 1.6.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 4.6
- Handlebars.Net.Helpers (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Core (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Json (>= 2.5.2-ci-110493)
- System.Linq.Dynamic.Core (>= 1.6.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 1.3
- Handlebars.Net.Helpers (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Core (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Json (>= 2.5.2-ci-110493)
- NETStandard.Library (>= 1.6.1)
- System.Linq.Dynamic.Core (>= 1.6.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 6.0
- Handlebars.Net.Helpers (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Core (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Json (>= 2.5.2-ci-110493)
- System.Linq.Dynamic.Core (>= 1.6.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 8.0
- Handlebars.Net.Helpers (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Core (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Json (>= 2.5.2-ci-110493)
- System.Linq.Dynamic.Core (>= 1.6.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 2.0
- Handlebars.Net.Helpers (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Core (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Json (>= 2.5.2-ci-110493)
- System.Linq.Dynamic.Core (>= 1.6.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 2.1
- Handlebars.Net.Helpers (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Core (>= 2.5.2-ci-110493)
- Handlebars.Net.Helpers.Json (>= 2.5.2-ci-110493)
- System.Linq.Dynamic.Core (>= 1.6.5)
- System.Text.RegularExpressions (>= 4.3.1)
- .NETFramework 4.5.1: 4.5.1.0
- .NETFramework 4.5.2: 4.5.2.0
- .NETFramework 4.6: 4.6.0.0
- .NETFramework 6.0: 6.0.0.0
- .NETFramework 8.0: 8.0.0.0
- .NETStandard 1.3: 1.3.0.0
- .NETStandard 2.0: 2.0.0.0
- .NETStandard 2.1: 2.1.0.0
OwnersStef |
AuthorsStef Heyenrath |
Project URLhttps://github.com/Handlebars-Net/Handlebars.Net.Helpers |
LicenseUnknown |
Tagshandlebars helper Linq DynamicLinq |
Info10 total downloads |
| 2 downloads for version 2.5.2-ci-110493 |
| Download (87.66 KB) |
| Found on the current feed only |
Package history
| Version | Size | Last updated | Downloads | Mirrored? | |||
|---|---|---|---|---|---|---|---|
|
|
2.5.3-ci-110496 | 87.61 KB | Sat, 13 Sep 2025 09:02:34 GMT | 4 |
|
||
|
|
2.5.2-ci-110495 | 87.61 KB | Sat, 13 Sep 2025 08:29:24 GMT | 4 |
|
||
|
|
2.5.2-ci-110493 | 87.66 KB | Sat, 13 Sep 2025 08:22:19 GMT | 2 |
|