handlebars_net_helpers - Handlebars.Net.Helpers.DynamicLinq 2.5.0-preview-01-ci-19836
Handlebars.Net.Helpers DynamicLinq
PM> Install-Package Handlebars.Net.Helpers.DynamicLinq -Version 2.5.0-preview-01-ci-19836 -Source https://www.myget.org/F/handlebars_net_helpers/api/v3/index.json
> nuget.exe install Handlebars.Net.Helpers.DynamicLinq -Version 2.5.0-preview-01-ci-19836 -Source https://www.myget.org/F/handlebars_net_helpers/api/v3/index.json
> dotnet add package Handlebars.Net.Helpers.DynamicLinq --version 2.5.0-preview-01-ci-19836 --source https://www.myget.org/F/handlebars_net_helpers/api/v3/index.json
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.5.0-preview-01-ci-19836" />
Copy to clipboard
source https://www.myget.org/F/handlebars_net_helpers/api/v3/index.json
nuget Handlebars.Net.Helpers.DynamicLinq ~> 2.5.0-preview-01-ci-19836
Copy to clipboard
> choco install Handlebars.Net.Helpers.DynamicLinq --version 2.5.0-preview-01-ci-19836 --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.0-preview-01-ci-19836" -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)
See CHANGELOG.md
-
.NETFramework 4.5.1
- Handlebars.Net.Helpers (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Core (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Json (>= 2.5.0-preview-01-ci-19836)
- System.Linq.Dynamic.Core (>= 1.6.0.1)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 4.5.2
- Handlebars.Net.Helpers (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Core (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Json (>= 2.5.0-preview-01-ci-19836)
- System.Linq.Dynamic.Core (>= 1.6.0.1)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 4.6
- Handlebars.Net.Helpers (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Core (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Json (>= 2.5.0-preview-01-ci-19836)
- System.Linq.Dynamic.Core (>= 1.6.0.1)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 1.3
- Handlebars.Net.Helpers (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Core (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Json (>= 2.5.0-preview-01-ci-19836)
- NETStandard.Library (>= 1.6.1)
- System.Linq.Dynamic.Core (>= 1.6.0.1)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 6.0
- Handlebars.Net.Helpers (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Core (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Json (>= 2.5.0-preview-01-ci-19836)
- System.Linq.Dynamic.Core (>= 1.6.0.1)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 8.0
- Handlebars.Net.Helpers (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Core (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Json (>= 2.5.0-preview-01-ci-19836)
- System.Linq.Dynamic.Core (>= 1.6.0.1)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 2.0
- Handlebars.Net.Helpers (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Core (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Json (>= 2.5.0-preview-01-ci-19836)
- System.Linq.Dynamic.Core (>= 1.6.0.1)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 2.1
- Handlebars.Net.Helpers (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Core (>= 2.5.0-preview-01-ci-19836)
- Handlebars.Net.Helpers.Json (>= 2.5.0-preview-01-ci-19836)
- System.Linq.Dynamic.Core (>= 1.6.0.1)
- 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 |
Info0 total downloads |
0 downloads for version 2.5.0-preview-01-ci-19836 |
Download (77.91 KB) |
Found on the current feed only |
Package history
Version | Size | Last updated | Downloads | Mirrored? | |||
---|---|---|---|---|---|---|---|
![]() |
2.5.0-preview-01-ci-19836 | 77.91 KB | Sat, 22 Mar 2025 06:49:24 GMT | 0 |
|
||
![]() |
2.4.13-ci-19835 | 77.81 KB | Fri, 21 Mar 2025 12:33:33 GMT | 0 |
|
||
![]() |
2.4.13-ci-19833 | 77.85 KB | Fri, 21 Mar 2025 10:31:52 GMT | 0 |
|