Uninstall() 개인적인 메소드

private Uninstall ( ) : int
리턴 int
        public int Uninstall(Package package)
        {
            Logger.Log(String.Format(CultureInfo.InvariantCulture, "Package uninstall initiated: {0}", package.ProductName), Logger.MessageLevel.Information, AppName);
            var exitcode = -1;

            try
            {
                if (!DoNotExecuteProcess)
                {
                    Logger.Log(String.Format(CultureInfo.InvariantCulture, "Package uninstall method called"), Logger.MessageLevel.Verbose, AppName);
                    exitcode = package.Uninstall();
                }
                else
                {
                    Logger.Log(String.Format(CultureInfo.InvariantCulture, "Package uninstall method bypassed - DoNotExecute is true"), Logger.MessageLevel.Verbose, AppName);
                    exitcode = 0;
                }
            }
            catch (Exception ex)
            {
                Logger.Log(ex, AppName);
            }

            return(exitcode);
        }
예제 #2
0
        public int Uninstall(Package package)
        {
            Logger.Log(String.Format(CultureInfo.InvariantCulture, "Package uninstall initiated: {0}", package.ProductName), Logger.MessageLevel.Information, AppName);
            var exitcode = -1;

            try
            {
                if (!DoNotExecuteProcess)
                {
                    Logger.Log(String.Format(CultureInfo.InvariantCulture, "Package uninstall method called"), Logger.MessageLevel.Verbose, AppName);
                    exitcode = package.Uninstall();
                }
                else
                {
                    Logger.Log(String.Format(CultureInfo.InvariantCulture, "Package uninstall method bypassed - DoNotExecute is true"), Logger.MessageLevel.Verbose, AppName);
                    exitcode = 0;
                }
            }
            catch (Exception ex)
            {
                Logger.Log(ex, AppName);
            }

            return exitcode;
        }