- Variable interpolation syntax changed from
{var}to${var}- Applies to simple interpolation tokens in templates and strings
- Aligns basic interpolation syntax with the engine's
${...}expression model - Reduces ambiguity between literal braces and interpolation tokens
Before:
var template = "Hello {FirstName} {LastName}!";After:
var template = "Hello ${FirstName} ${LastName}!";If you are using ToolContext or engine expressions, continue using ${Context.Name} and ${...} syntax consistently.
-
ITemplate Interface - Template-first approach to code generation
- Self-validating templates with embedded test cases
- Each template carries its own
TestDataJsonandExpectedContent - Automatic validation via
Validate()andValidateDetailed()methods - Type-safe with
DataTypeproperty for compile-time safety
-
TemplateBase Abstract Class - Base implementation for templates
- Handles data serialization/normalization automatically
- Template rendering via
TinyTemplateEngine - Detailed validation with diff reporting
- Cross-platform line ending normalization
-
TemplateRegistry - Centralized template management
Register()/Get()for manual template registrationDiscoverFromAssembly()- Auto-discover templates via reflectionDiscoverFromCallingAssembly()- Discover from calling codeRenderBatch()- Render multiple templates in one callValidateAll()- Validate all registered templates at once
-
TemplateResult Record - Rich rendering output
Content- The rendered template contentPath- Dynamic output path (supports variable interpolation)Namespace- Generated namespaceMetadata- Optional key-value metadata dictionary
-
TinyTemplateEngine Enhancements
- Logical AND operator (
&&) in conditions - Logical OR operator (
||) in conditions - Ternary expressions:
${Context.Active ? 'Yes' : 'No'} - Short-circuit evaluation for logical operators
- Parenthesized logical expressions
- Logical AND operator (
- New
Self-Validating-Templates.mdcomprehensive guide - Updated
ITemplate-QuickRef.mdwith new syntax features - New ITemplate page on documentation website (
/itemplate) - Template syntax reference cards
- Test count: 577 ? 633 tests (+56)
- Fixed skipped test
ItShouldInterpolateFileExtension RenderBatch()method tests (18 tests)DiscoverFromAssembly()method tests (21 tests)ValidateAll()edge case tests (10 tests)- Null deserialization handling tests (3 tests)
- Exception handling in validation tests (4 tests)
- NCrunch configuration to exclude site folder
- VS Code launch configuration for site development
- Tasks configuration for npm dev server
ComponentTemplate- React component generatorCSharpClassTemplate- C# class with properties/methods generator
-
Template Services Architecture - Extensible service registration system
- Simple function-based services with string keys
- Syntax:
${Context.Services('serviceName')(input)} - Support for both string literals and variable references
- IoC-friendly design
-
Enhanced Variable Resolver
- Method call support with string arguments
- Chained function calls (e.g.,
Services('pluralize')('word')) - Direct delegate invocation
- Variable reference support in method calls
- Added comprehensive "Why TinyTemplateEngine?" section
- Template Services examples with Humanizer and NCalc
- Real-world usage examples (invoice generation, etc.)
- Sample implementations and best practices
- Introduced
ITemplateServicemarker interface - Added
TemplateServiceFuncdelegate type - Context service inheritance to child contexts
- Error handling with clear "{service} not registered" messages
- Comprehensive test coverage expansion - 1,100 ? 1,293 tests (+193)
- Complete test suite for template services
- Multi-language pluralization tests
- Calculator service tests
- Integration tests with real-world scenarios
- TemplateHelpers test coverage:
PadLeft/PadRighthelper testsRound(decimal/float),Default,IfEmptytestsFloor,Ceiling,Count,First,Last,ReversetestsFormathelper tests (DateTime, DateTimeOffset, DateOnly, TimeOnly, IFormattable)Registercustom helper testsYesNoandIsEmptyconditional helper tests
- TinyTemplateEngine test coverage:
- Negation operator tests (
!Context.Value) - Comparison operator edge cases
IsTruthymethod branch coverageCompareandAreEqualmethod tests
- Negation operator tests (
- InterpolationExtensions test coverage:
InterpolateWithEngine<T>testsInterpolate(ToolContext)testsInterpolate(List<string>, ToolContext)tests
- Fixed delegate property resolution in VariableResolver -
ToolContext.Get()method was not being invoked for delegate properties, causing template services to fail silently
- Upgraded to .NET 8, 9, and 10 multi-targeting
- Modern GitHub Actions CI/CD workflows
- Cross-platform testing (Ubuntu, Windows, macOS)
- Code coverage integration
- Source Link support for better debugging
- Professional NuGet package metadata
- Tests now include Humanizer.Core (2.14.1) for examples
- Tests now include NCalc (1.0.0) for calculator examples
- Added Microsoft.SourceLink.GitHub for source debugging
- Removed built-in
pluralizeandsingularizehelpers from core- Now available via Template Services pattern
- Keeps core library minimal and focused
Before (2.0.x):
// Built-in helpers (removed)
var template = "${Context.EntityName | pluralize}";After (2026.1.1):
// Register as a service
context.RegisterService("pluralize", input => input?.ToString()?.Pluralize());
var template = "${Context.Services('pluralize')(Context.EntityName)}";- add debug verification
- fix tests
- upgrade to .net 7
- upgrade dependencies
- remove support for legacy framework
- move from gitlab to github
- fix path bug
- add support for files and collection of templates
- make methods testharness virtual
- change namespaces for the unittests
- changed namespaces
- add test harness
- replace shouldy with fluentassertions
- add push for github
- add release notes
- add license
- remove csproj backup file
- fix bug in test
- rearrange repository layout
- added ci
- added some more tests
- created interpolation extension for strings