-
-
Notifications
You must be signed in to change notification settings - Fork 106
Installation
axunonb edited this page Feb 27, 2022
·
2 revisions
SmartFormat comes with the following packages:
- SmartFormat.NET - includes all SmartFormat extensions listed below.
- SmartFormat - The "Core" package
- SmartFormat.Extensions.Newtonsoft.Json - An
ISourceextension forNewtonsoft.Jsonvariables - SmartFormat.Extensions.System.Text.Json - An
ISourceextension forSystem.Text.Jsonvariables - SmartFormat.Extensions.Time - The formatter for
DateTime,DateTimeOffsetandTimeSpanvariables - SmartFormat.Extensions.Xml - Brings the
ISourceextension forXElementvariables, and a formatter forXElements
SmartFormat is the core package. It comes with the most frequently used extensions built-in:
i. Source extensions:
GlobalVariablesSourcePersistentVariablesSource-
StringSource✔️ -
ListFormatter(implementingISource) ✔️ -
DictionarySource✔️ -
ValueTupleSource✔️ -
ReflectionSource✔️ -
DefaultSource✔️ -
KeyValuePairSource✔️
ii. Formatter extensions:
-
ListFormatter(implementingIFormatter) ✔️ -
PluralLocalizationFormatter✔️ -
ConditionalFormatter✔️ -
IsMatchFormatter✔️ -
NullFormatter✔️ LocalizationFormatterTemplateFormatter-
ChooseFormatter✔️ -
SubStringFormatter✔️ -
DefaultFormatter✔️
Note: Extensions marked (✔️) are included when calling Smart.CreateDefaultFormatter(...) and also when using Smart.Format(...).
Some extensions (like PersistentVariablesSource and TemplateFormatter) require configuration to be useful.
- Syntax, Terminology
- Placeholders and Nesting
- string.Format Compatibility
- Character Literals in Format Strings
- HTML With CSS or JavaScript
- Data Source Extensions
- Default _ DefaultFormatter
- Lists _ ListFormatter
- Choose _ ChooseFormatter
- Condition _ ConditionalFormatter
- Null _ NullFormatter
- SubString _ SubStringFormatter
- RegEx _ IsMatchFormatter
- Pluralization _ PluralLocalizationFormatter
- Localization _ LocalizationFormatter
- Templates _ TemplateFormatter
- TimeSpan _ TimeFormatter
- XML _ XElementFormatter
- Extension Methods
- Home
- Common Pitfalls
- HTML with CSS or JavaScript
- Overview
- Main Features
- Formatters
- Extra Features
- Console and StringBuilder
- TemplateFormatter
- SmartSettings to control Smart.Format behavior
- Additional Info
- License
3.6