Ejemplo n.º 1
0
    static void Main(string[] args)
    {
        var builder = SetupDependencyInjectionBuilder();

        using (var scope = builder.BeginLifetimeScope())
        {
            var serial        = scope.Resolve <Serial>();
            var readingsSaver = scope.Resolve <IReadingsSaver>();
            var session       = new RecordingSession(serial, readingsSaver);

            session.Start("COM5");

            var task = Task.Run(async() => { await Task.Delay(6000); });
            task.Wait();

            session.StopAndSave();
        }
    }
Ejemplo n.º 2
0
        public RecordingSession StartRecordingSession
            (KinectRecorderService[] kinectRecorderServices,
            PowerPointRecorderService powerPointRecorderService,
            string powerPointPresentationPath,
            string sessionPath,
            CancellationTokenSource cancellationTokenSource)
        {
            var recordingSession = new RecordingSession(
                kinectRecorderServices,
                powerPointRecorderService,
                powerPointPresentationPath,
                sessionPath,
                cancellationTokenSource,
                serviceProvider.GetRequiredService <ILogger <RecordingSession> >());

            recordingSession.Start();

            return(recordingSession);
        }