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); }
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; }