public override void Uninstall(IDictionary savedState)
{
bool serviceExists = false;
try
{
// ReSharper disable UnusedVariable
var controller = new ServiceController(AppSettings.ServiceName);
// ReSharper restore UnusedVariable
serviceExists = true;
}
catch (Exception ex)
{
Dev2Logger.Log.Error(ex);
}
if (serviceExists)
{
base.Uninstall(savedState);
}
else
{
LogMessage("Service doesn't exist, nothing to uninstall.", Context);
}
}