Dev2.WindowsServiceManager.Uninstall C# (CSharp) Method

Uninstall() public method

public Uninstall ( IDictionary savedState ) : void
savedState IDictionary
return void
        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);
            }
        }

Same methods

WindowsServiceManager::Uninstall ( ) : bool