diff --git a/Cecilifier.Core/Naming/DefaultNameStrategy.cs b/Cecilifier.Core/Naming/DefaultNameStrategy.cs index b4f6b04f..2e22e933 100644 --- a/Cecilifier.Core/Naming/DefaultNameStrategy.cs +++ b/Cecilifier.Core/Naming/DefaultNameStrategy.cs @@ -9,7 +9,7 @@ namespace Cecilifier.Core.Naming { public class DefaultNameStrategy : INameStrategy { - private static IReadOnlyDictionary _format = new Dictionary + private static IReadOnlyDictionary _defaultFormat = new Dictionary { [ElementKind.Attribute] = "attr", [ElementKind.Class] = "cls", @@ -32,11 +32,17 @@ public class DefaultNameStrategy : INameStrategy [ElementKind.IL] = "il", }; - public DefaultNameStrategy() => Options = NamingOptions.All; - + private IReadOnlyDictionary _format; + + public DefaultNameStrategy() + { + Options = NamingOptions.All; + _format = _defaultFormat; + } + public DefaultNameStrategy(NamingOptions namingOptions, IReadOnlyDictionary format) { - _format = format; + _format = format ?? _defaultFormat; Options = namingOptions; }