Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        public static IWordsConverter Create(Configuration.WordsConverter wordsConverter)
        {
            switch (wordsConverter.Type)
            {
            case "Camel":
            {
                return(new CamelCaseConverter());
            }

            case "Pascal":
            {
                return(new PascalCaseConverter());
            }

            case "Delimiter":
            {
                return(new DelimiterConverter(wordsConverter.Paramters));
            }

            default:
            {
                return(new NoneConverter());
            }
            }
        }