public ReplayManager(IRecogniser <T, S> recogniser, IQueryable <T> dataset)
        {
            _recogniser = recogniser;
            _dataset    = dataset;

            States = new List <S>();
        }
Exemple #2
0
        }                                                       // Текст ТЕКУЩЕГО циферного вопроса


        public Bot(int processId, IRecogniser recogniser, IRepository <TestQuestion> testRepository, IRepository <NumericQuestion> numberRepository, ICutter cutter, IClicker clicker, IReopener reopener)
        {
            _process = Process.GetProcesses().FirstOrDefault(p => p.Id == processId);
            if (_process == null)
            {
                Console.WriteLine("Процесс не найден");
                throw new Exception();
            }
            _recogniser = recogniser;
            mode        = SyncMode.Sync;      // Синхронный распознаватель

            _testRepository    = testRepository;
            _numericRepository = numberRepository;
            _cutter            = cutter;
            _clicker           = clicker;
            _reopener          = reopener;
        }
        public RecognitionRunner(string dir, IRecogniser recogniser)
        {
            this.dir = new DirectoryInfo(dir);
            if (!this.dir.Exists)
            {
                throw new System.ArgumentException("Directory must exist");
            }

            this.customOut = new DirectoryInfo(Path.Combine(dir, "customout"));
            this.customOut.Create();
            this.customDone = this.customOut.EnumerateFiles().Select((FileInfo fi) => NormalizeFileName(fi.Name)).ToList();

            this.defaultOut = new DirectoryInfo(Path.Combine(dir, "defaultout"));
            this.defaultOut.Create();
            this.defaultDone = this.defaultOut.EnumerateFiles().Select((FileInfo fi) => NormalizeFileName(fi.Name)).ToList();

            this.recogniser = recogniser;
        }
Exemple #4
0
 public StreamManager(IRecieveRepository <T> recieveRepository, ISendRepository <S> sendRepository, IRecogniser <T, S> recogniser)
 {
     _recieveRepository = recieveRepository;
     _sendRepository    = sendRepository;
     _recogniser        = recogniser;
 }
Exemple #5
0
 public void SetUp()
 {
     recogniser = NSubstitute.Substitute.For <IRecogniser>();
     recogniser.RecogniseCustom(Arg.Any <string>()).Returns("hello");
     recogniser.RecogniseDefault(Arg.Any <string>()).Returns("Hello");
 }