示例#1
0
        private static int Install()
        {
            logger.Info("Installing...");

            var stateSaver = new System.Collections.Hashtable();
            var installer = new ProvisionDaemonInstaller();

            try
            {
                installer.Install(stateSaver);
            }
            catch (Exception ex)
            {
                logger.FatalException("Install Failed", ex);
                logger.Info("Rolling Back...");
                installer.Rollback(stateSaver);
                return -1;
            }

            logger.Info("Commiting...");
            installer.Commit(stateSaver);
            return 0;
        }
示例#2
0
        private static int Install()
        {
            logger.Info("Installing...");

            var stateSaver = new System.Collections.Hashtable();
            var installer  = new ProvisionDaemonInstaller();

            try
            {
                installer.Install(stateSaver);
            }
            catch (Exception ex)
            {
                logger.FatalException("Install Failed", ex);
                logger.Info("Rolling Back...");
                installer.Rollback(stateSaver);
                return(-1);
            }

            logger.Info("Commiting...");
            installer.Commit(stateSaver);
            return(0);
        }