Exemplo n.º 1
0
        public static void SendSignal(Signal sig, string[] args = null, bool noLog = false)
        {
            if (!_isEnsured)
            {
                return;
            }

            if (!noLog)
            {
                Logger.LogSignal(sig, Environment.StackTrace, args);
            }

            GlobalSignalRaiser(sig, DateTime.Now, Environment.StackTrace, args);
            OnSignalOutput?.Invoke(-1, sig, DateTime.Now, Environment.StackTrace, args);
        }
Exemplo n.º 2
0
        private static void GlobalSignalHandler(byte[] data)
        {
            var dat = Serializer <SignalPayload> .Deserialize(data);

            OnSignalOutput?.Invoke(dat.Pid, dat.Sig, dat.Time, dat.Stack, dat.Args);
        }