Ejemplo n.º 1
0
        private void InvokeResume(IntervalLogger il)
        {
            // BeforePluginSuspend
            Status = KernelStatus.BeforePluginResume;
            using (var iil = new IILogger(il, Status)) {
                // Kernel First
                _KernelLifeCycle.DoBeforePluginResume();
                Parallel.ForEach(
                    _OtherLifeCycles, x => x.DoBeforePluginResume()
                    );
            }

            // PluginResume
            Status = KernelStatus.PluginResume;
            using (var iil = new IILogger(il, Status)) {
                // Only Kernel
                _KernelLifeCycle.DoPluginResume();
            }

            // AfterPluginSuspend
            Status = KernelStatus.AfterPluginResume;
            using (var iil = new IILogger(il, Status)) {
                // Kernel First
                _KernelLifeCycle.DoAfterPluginResume();
                Parallel.ForEach(
                    _OtherLifeCycles, x => x.DoAfterPluginResume()
                    );
            }
        }
Ejemplo n.º 2
0
        private void InvokeStop(IntervalLogger il)
        {
            // BeforeStop
            Status = KernelStatus.BeforeStop;
            using (var iil = new IILogger(il, Status)) {
                // Kernel First
                _KernelLifeCycle.DoBeforeStop();
                Parallel.ForEach(
                    _OtherLifeCycles, x => x.DoBeforeStop()
                    );
            }

            // PluginStop
            Status = KernelStatus.PluginStop;
            using (var iil = new IILogger(il, Status)) {
                // Only Kernel
                _KernelLifeCycle.DoPluginStop();
            }

            // BuiltinStop
            Status = KernelStatus.BuiltinStop;
            using (var iil = new IILogger(il, Status)) {
                // Only Kernel
                _KernelLifeCycle.DoBuiltinStop();
            }

            // AfterStop
            Status = KernelStatus.AfterStop;
            using (var iil = new IILogger(il, Status)) {
                // Kernel First
                _KernelLifeCycle.DoAfterStop();
                Parallel.ForEach(
                    _OtherLifeCycles, x => x.DoAfterStop()
                    );
            }
        }