예제 #1
0
 public HttpApiController(IRecognitionTaskRunner taskRunner, RecognitionTaskFactory taskFactory,
                          IWebSocketSessionHub websockets, MeasurementWriterFactory metrics)
 {
     _taskRunner  = taskRunner;
     _taskFactory = taskFactory;
     _websockets  = websockets;
     _metrics     = metrics;
 }
 public WebSocketSession(IRecognitionTaskRunner taskRunner, RecognitionTaskFactory taskFactory,
                         RecyclableMemoryStreamManager memoryStreamManager) : base(memoryStreamManager)
 {
     _taskRunner  = taskRunner;
     _taskFactory = taskFactory;
     SessionId    = Guid.NewGuid();
     SessionState = WebSocketSessionState.New;
 }
 public WebSocketSessionHub(IRecognitionTaskRunner taskRunner, RecognitionTaskFactory taskFactory,
                            RecyclableMemoryStreamManager memoryStreamManager)
 {
     _taskRunner          = taskRunner;
     _taskFactory         = taskFactory;
     _memoryStreamManager = memoryStreamManager;
     _sessions            = new ConcurrentDictionary <Guid, IWebSocketSession>();
 }
예제 #4
0
 public TaskMetricsConfigurator(MeasurementWriterFactory writerFactory, RecognitionTaskFactory taskFactory)
 {
     _metrics = writerFactory.GetInstance(new Dictionary <string, string>
     {
         { "source", "TaskMetricsConfigurator" }
     });
     taskFactory.OnStateChanged += OnStateChanged;
 }
예제 #5
0
 public ReportingConfigurator(IReportingService reportingService, RecognitionTaskFactory taskFactory)
 {
     _service = reportingService;
     taskFactory.OnStateChanged += OnStateChanged;
 }