QOL Features
This update contains a number of Quality of life improvements and some minor changes to the internal architecture that aims for faster execution and more stable formatter execution as well as the usual expansion of build-in formatters.
- Added the
[MethodName]
placeholder feature for Formatter names to be replaced with the C# name of the method it attributes - Updated the Predefined Formatter wiki
- Added the CryptService for encrypting data with AES
- Added the HashService to hash data with several algorithms
- Added Constants. Constants are read only variables provided by the invoker that exists alongside the root object.
- BREAKING CHANGE: The MorestachioFormatterService now has a property
Services
that contains the services for your template instead of beeing the service container itself - Added methods to evaluate most values at compile time instead of runtime. This prolongs the compiling process but speeds up the execution significantly.
- Fixed: The name of a #Import partial is now properly handled when null
- Fixed: The value of a #Culture is now properly handled when null
- Added a base
MorestachioPropertyListResolver
class for whitelisting properties - Added Currency to the Money type
- Added the
[ServiceNameAttribute]
to define a custom name for a service within your template - Allowed a formatter to get the original
IMorestachioExpression
as an argument instead of the value - Allowed the use of lambda generation from template. You can now create a lambda function in your template and provide it to a formatter like
listOfData.Where(e => e.item == true)
. The formatter must accept aMorestachioTemplateExpression
as the parameter type - Allowed alias to be set on
#DO
,#WHILE
,#REPEAT
to get the correct collection scope - Added UsageReport. Using the
DataAccessAnalyzer
you can now analyize the whole expression tree to get all property paths and formatters that are called.