NetTemplate 2.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package NetTemplate --version 2.0.0
NuGet\Install-Package NetTemplate -Version 2.0.0
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="NetTemplate" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetTemplate --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NetTemplate, 2.0.0"
#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 NetTemplate as a Cake Addin #addin nuget:?package=NetTemplate&version=2.0.0 // Install NetTemplate as a Cake Tool #tool nuget:?package=NetTemplate&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NetTemplate
This is a fork of StringTemplate 4 for .NET to modernize it. The goal of this project is to be a superset of StringTemplate 4. That is, backward compatible with StringTemplate 4 with additional features.
Usage
The current version can be drop-in replacement for StringTemplate4
. Just rename namespace from Antlr4.StringTemplate
to NetTemplate
.
Additional features
Expression options
The following is a list of the new expression options in additional to StringTemplate 4 expression options:
culture
: specify the name of the culture to override the one that was specified inTemplate.Render()
(e.g.<foo; culture="th-TH">
). It can be any value that is acceptable byCultureInfo.GetCultureInfo()
, even an empty string.
Breaking changes
1.0 to 2.0
IFormattable
object will be honored during rendering.NetTemplate.Interpreter
become a sealed class.
Development
Prerequisites
- .NET 6 SDK
Build
dotnet build src/NetTemplate.sln
Run tests
dotnet test src/NetTemplate.sln
License
BSD 3-Clause
Product | Versions 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Antlr3.Runtime (>= 3.5.2-rc1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.