Example #1
0
        public NameFormatterSelector(INameConverterRegistry nameConverterRegistry)
        {
            if (nameConverterRegistry == null)
            {
                throw new ArgumentNullException(nameof(nameConverterRegistry));
            }

            _default         = new PascalCaseNameFormatter(nameConverterRegistry);
            _interfacePrefix = new PascalCaseNameFormatter(nameConverterRegistry, "I", "");
            _asyncSuffix     = new PascalCaseNameFormatter(nameConverterRegistry, "", "Async");
        }
Example #2
0
 public PascalCaseNameFormatter(INameConverterRegistry nameConverterRegistry, string prefix, string suffix)
 {
     _nameConverterRegistry = nameConverterRegistry ?? throw new ArgumentNullException(nameof(nameConverterRegistry));
     Prefix = prefix ?? throw new ArgumentNullException(nameof(prefix));
     Suffix = suffix ?? throw new ArgumentNullException(nameof(suffix));
 }
Example #3
0
 public PascalCaseNameFormatter(INameConverterRegistry nameConverterRegistry)
     : this(nameConverterRegistry, "", "")
 {
 }
Example #4
0
 public CamelCaseNameFormatter(INameConverterRegistry nameConverterRegistry)
 {
     _nameConverterRegistry = nameConverterRegistry ?? throw new ArgumentNullException(nameof(nameConverterRegistry));
 }