Beispiel #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                if (Timer != null)
                {
                    Timer.Dispose();
                    Timer = null;
                }
                if (PauseEvent != null)
                {
                    PauseEvent.Close();
                    PauseEvent.Dispose();
                    PauseEvent = null;
                }
                if (RunEvent != null)
                {
                    RunEvent.Close();
                    RunEvent.Dispose();
                    RunEvent = null;
                }
                if (UnityFactory != null)
                {
                    UnityFactory.Container.Dispose();
                    UnityFactory = null;
                }
            }

            disposed = true;
        }