Consider adding singleton instances
Opened this issue · 0 comments
sandrock commented
As SekvapLanguage
does not maintain a state related to the data it processes, we can create a singleton instance. This would avoid declaring/creating too many instances in our apps.
These two static instances would help a lot:
SekvapLanguage.Default = new SekvapLanguage();
SekvapLanguage.TrimAllWhispaces = new SekvapLanguage()
{
TrimKeyStart = true, TrimKeyEnd = true,
TrimValueStart = true, TrimValueEnd = true,
};