Ejemplo n.º 1
0
        /* ----------------------------------------------------------------- */
        ///
        /// Uninstall
        ///
        /// <summary>
        /// Executes the uninstallation.
        /// </summary>
        ///
        /* ----------------------------------------------------------------- */
        private static void Uninstall(ArgumentCollection src)
        {
            var sec    = src.GetTimeout();
            var engine = src.CreateInstaller();

            Logger.Debug(LogType, $"Method:{nameof(Uninstall).Quote()}");
            Logger.Debug(LogType, $"Configuration:{engine.Location.Quote()}");

            engine.Try(src.GetRetryCount(), i =>
            {
                engine.Timeout = TimeSpan.FromSeconds(sec * (i + 1));
                engine.Uninstall();
            });
        }
Ejemplo n.º 2
0
        /* ----------------------------------------------------------------- */
        ///
        /// Install
        ///
        /// <summary>
        /// Executes the installation.
        /// </summary>
        ///
        /* ----------------------------------------------------------------- */
        private static void Install(ArgumentCollection src, bool reinstall)
        {
            var sec    = src.GetTimeout();
            var engine = src.CreateInstaller();

            Logger.Debug(LogType, $"Configuration:{engine.Location.Quote()}");
            Logger.Debug(LogType, $"Resource:{engine.ResourceDirectory.Quote()}");

            engine.Try(src.GetRetryCount(), i =>
            {
                engine.Reinstall = reinstall;
                engine.Timeout   = TimeSpan.FromSeconds(sec * (i + 1));
                engine.Install();
            });
        }