Example #1
0
        public static string ToPascalCase(this string name)
        {
            var titleCase  = new TitleCaseConverter();
            var pascalCase = new PascalCaseConverter(titleCase);

            return(pascalCase.Convert(name));
        }
Example #2
0
        public static IWordsConverter Create(Configuration.WordsConverter wordsConverter)
        {
            IWordsConverter converter = default;

            switch (wordsConverter.Type)
            {
            case "Camel":
            {
                converter = new CamelCaseConverter(); break;
            }

            case "Pascal":
            {
                converter = new PascalCaseConverter(); break;
            }

            case "Delimiter":
            {
                converter = new DelimiterConverter(); break;
            }

            default:
            {
                return(new NoneConverter());
            }
            }
            converter.Initialize(wordsConverter.Parameters);
            return(converter);
        }