Git Repository Public Repository

CPE_learningsite

URLs

Copy to Clipboard

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Diagnostics;
using CPE.App.Notify.Extensions;

namespace CPE.App.NotifyService {
    public class Worker {
        private readonly int _meetingParticipantSessionKey;
        private readonly string _notifyConsoleFilePath;
        private readonly bool _debugging;

        public Worker(int meetingParticipantSessionKey, string notifyConsoleFilePath, bool debugging = false) {
            _meetingParticipantSessionKey = meetingParticipantSessionKey.Log(key:meetingParticipantSessionKey);
            _notifyConsoleFilePath = notifyConsoleFilePath;
            _debugging = debugging;
        }

        public void Process() {
            var args = "-u -a -n";
            if(_debugging) {
                args = "-t";
            }
            startNotify($"{args.Log()} {_meetingParticipantSessionKey}");
        }

        private void startNotify(string args) {
            var startinfo = new ProcessStartInfo {
                FileName = $"{_notifyConsoleFilePath}",
                CreateNoWindow = true,
                UseShellExecute = false,
                WindowStyle = ProcessWindowStyle.Hidden,
                Arguments = args
            };
            var process = System.Diagnostics.Process.Start(startinfo);
            process.WaitForExit();
        }
    }
}

Commits for CPE_learningsiteCPE/CPE.App/CPE.App.NotifyService/Worker.cs

Diff revisions: vs.
Revision Author Commited Message
4cd176 ... v.shishlov Fri 27 Aug, 2021 14:33:17 +0000

initial commit