Пример #1
0
 public CodeTriangleNew(IFileService fileService, ITriangular triangular, IWordConverter wordConverter)
 {
     _fileService = fileService;
     _triangular = triangular;
     _wordConverter = wordConverter;
     _triangular.Number = 26;
     Words = new List<string>();
 }
Пример #2
0
        public IWordConverter GetConverterByMethod(WordConvertingMethod method)
        {
            IWordConverter converter = null;

            if (_converters.Any(d => d.MethodName == method))
            {
                converter = _converters.First(d => d.MethodName == method);
            }
            else
            {
                throw new Exception("Cannot find format converter!");
            }
            return(converter);
        }
Пример #3
0
 public WordConverterTest()
 {
     _wordConverter = _wordConverter.Resolve();;
 }
Пример #4
0
 public WordsFilter(IWordAnalyzer analyzer, IWordConverter converter)
 {
     _analyzer  = analyzer;
     _converter = converter;
 }
Пример #5
0
 public NameScore(IFileService fileService, IWordConverter wordConverter)
 {
     _fileService = fileService;
     _wordConverter = wordConverter;
 }
Пример #6
0
        public async Task <string> ConvertSentencesAsync(SentenceProcessResult sentences, WordConvertingMethod method)
        {
            IWordConverter converter = _converterProvider.GetConverterByMethod(method);

            return(await converter.ConvertSentencesAsync(sentences));
        }
Пример #7
0
 public WordController(IWordService wordService, IWordConverter wordConverter)
 {
     _wordService   = wordService ?? throw new ArgumentNullException(nameof(wordService));
     _wordConverter = wordConverter ?? throw new ArgumentNullException(nameof(wordConverter));
 }
 public ValuesController(IWordConverter wordConverter, ILogger <WordConverter> logger)
 {
     _logger        = logger ?? throw new ArgumentNullException(nameof(logger));
     _wordConverter = wordConverter ?? throw new ArgumentNullException(nameof(wordConverter));
 }
Пример #9
0
 public WordProcessor(IWordConverter wordConverter, IWordFilter wordFilter)
 {
     this.wordConverter = wordConverter;
     this.wordFilter    = wordFilter;
 }