Пример #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);
        }
Пример #2
0
 public AutoConverter(String name, ITokenizer tokenizer, IWordsConverter wordsConverter)
 {
     Name            = name;
     _tokenizer      = tokenizer;
     _wordsConverter = wordsConverter;
 }
Пример #3
0
 public IAutoConverter Build(String name, IWordsConverter wordsConverter, ITokenizer tokenizer)
 {
     return(new AutoConverter(name, tokenizer, wordsConverter));
 }