public override void Stop() { COMHelper.ShutdownCOMApplication(this.args.CategoryName); if (COMHelper.HasCOMComponent(this.args.AppName)) { COMHelper.DeleteCOMComponent(this.args.AppName); } COMHelper.ShutdownCOMApplication(this.args.CategoryName); }
public override void ValidateArguments() { base.ValidateArguments(); if (string.IsNullOrEmpty(this.args.CategoryName)) { throw new ArgumentNullException("categoryName", "categoryName can not be null or empty"); } if (!this.args.NoStop && !COMHelper.HasCOMComponent(this.args.AppName)) { throw new ArgumentException(this.args.AppName + " component could not be found", "appName"); } }