Пример #1
0
        private string Convert(string phrase, TokenizerMapConverter tokenizerMapConverter)
        {
            var tokenizer    = TokenizerFactory.Create(tokenizerMapConverter.Tokenizer);
            var words        = tokenizer.Segment(phrase);
            var wordsConvert = WordsConverterFactory.Create(tokenizerMapConverter.Converter);

            return(NamingUtil.ToSingular(wordsConvert.Convert(words)));
        }
Пример #2
0
        public static string ToNgSelector(
            string tableName
            )
        {
            var words     = tableName.Split('_');
            var converter = new StrikeThroughConverter();
            var selector  = converter.Convert(words);

            if (!selector.StartsWith("app-"))
            {
                selector = "app-" + selector;
            }
            return(NamingUtil.ToSingular(selector));
        }
Пример #3
0
        public string Convert(IEnumerable <string> words)
        {
            var pascalWords = converter.Convert(words);

            return(NamingUtil.ToSingular(pascalWords));
        }