diff --git a/src/Tgstation.Server.Host/Components/Byond/IByondManager.cs b/src/Tgstation.Server.Host/Components/Byond/IByondManager.cs index 10222483ec..58ab6d7480 100644 --- a/src/Tgstation.Server.Host/Components/Byond/IByondManager.cs +++ b/src/Tgstation.Server.Host/Components/Byond/IByondManager.cs @@ -4,8 +4,6 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; - using Tgstation.Server.Host.Jobs; namespace Tgstation.Server.Host.Components.Byond @@ -14,7 +12,7 @@ namespace Tgstation.Server.Host.Components.Byond /// For managing the BYOND installation. /// /// When passing in s, ensure they are BYOND format versions unless referring to a custom version. This means should NEVER be 0. - public interface IByondManager : IHostedService, IDisposable + public interface IByondManager : IComponentService, IDisposable { /// /// The currently active BYOND version. diff --git a/src/Tgstation.Server.Host/Components/Chat/IChatManager.cs b/src/Tgstation.Server.Host/Components/Chat/IChatManager.cs index 59f3e2b1c5..7004bfc592 100644 --- a/src/Tgstation.Server.Host/Components/Chat/IChatManager.cs +++ b/src/Tgstation.Server.Host/Components/Chat/IChatManager.cs @@ -3,8 +3,6 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; - using Tgstation.Server.Api.Models.Internal; using Tgstation.Server.Host.Components.Interop; @@ -13,7 +11,7 @@ namespace Tgstation.Server.Host.Components.Chat /// /// For managing connected chat services. /// - public interface IChatManager : IHostedService, IAsyncDisposable + public interface IChatManager : IComponentService, IAsyncDisposable { /// /// Registers a to use. diff --git a/src/Tgstation.Server.Host/Components/Deployment/DmbFactory.cs b/src/Tgstation.Server.Host/Components/Deployment/DmbFactory.cs index f57222c8b2..7d57085eff 100644 --- a/src/Tgstation.Server.Host/Components/Deployment/DmbFactory.cs +++ b/src/Tgstation.Server.Host/Components/Deployment/DmbFactory.cs @@ -90,7 +90,7 @@ namespace Tgstation.Server.Host.Components.Deployment IDmbProvider nextDmbProvider; /// - /// If the is "started" via . + /// If the is "started" via . /// bool started; diff --git a/src/Tgstation.Server.Host/Components/Deployment/IDmbFactory.cs b/src/Tgstation.Server.Host/Components/Deployment/IDmbFactory.cs index 4c4872a61c..0d10b7dcd1 100644 --- a/src/Tgstation.Server.Host/Components/Deployment/IDmbFactory.cs +++ b/src/Tgstation.Server.Host/Components/Deployment/IDmbFactory.cs @@ -2,8 +2,6 @@ using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; - using Tgstation.Server.Host.Models; namespace Tgstation.Server.Host.Components.Deployment @@ -11,7 +9,7 @@ namespace Tgstation.Server.Host.Components.Deployment /// /// Factory for s. /// - public interface IDmbFactory : ILatestCompileJobProvider, IHostedService, IDisposable + public interface IDmbFactory : ILatestCompileJobProvider, IComponentService, IDisposable { /// /// Get a that completes when the result of a call to will be different than the previous call if any. diff --git a/src/Tgstation.Server.Host/Components/IComponentService.cs b/src/Tgstation.Server.Host/Components/IComponentService.cs new file mode 100644 index 0000000000..b094e0a092 --- /dev/null +++ b/src/Tgstation.Server.Host/Components/IComponentService.cs @@ -0,0 +1,11 @@ +using Microsoft.Extensions.Hosting; + +namespace Tgstation.Server.Host.Components +{ + /// + /// Represents a component meant to be started and stopped by its parent component. + /// + public interface IComponentService : IHostedService + { + } +} diff --git a/src/Tgstation.Server.Host/Components/IInstance.cs b/src/Tgstation.Server.Host/Components/IInstance.cs index 1d26b9382d..9d8c34988e 100644 --- a/src/Tgstation.Server.Host/Components/IInstance.cs +++ b/src/Tgstation.Server.Host/Components/IInstance.cs @@ -1,13 +1,11 @@ using System; -using Microsoft.Extensions.Hosting; - namespace Tgstation.Server.Host.Components { /// /// Component version of . /// - interface IInstance : IInstanceCore, IHostedService, IAsyncDisposable + interface IInstance : IInstanceCore, IComponentService, IAsyncDisposable { } } diff --git a/src/Tgstation.Server.Host/Components/IInstanceFactory.cs b/src/Tgstation.Server.Host/Components/IInstanceFactory.cs index 0c37b40778..fda8c9afad 100644 --- a/src/Tgstation.Server.Host/Components/IInstanceFactory.cs +++ b/src/Tgstation.Server.Host/Components/IInstanceFactory.cs @@ -1,7 +1,5 @@ using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; - using Tgstation.Server.Host.Components.Interop.Bridge; using Tgstation.Server.Host.IO; @@ -10,7 +8,7 @@ namespace Tgstation.Server.Host.Components /// /// Factory for creating s. /// - interface IInstanceFactory : IHostedService + interface IInstanceFactory : IComponentService { /// /// Create an . diff --git a/src/Tgstation.Server.Host/Components/StaticFiles/IConfiguration.cs b/src/Tgstation.Server.Host/Components/StaticFiles/IConfiguration.cs index 2758ba15fc..bc8b2be171 100644 --- a/src/Tgstation.Server.Host/Components/StaticFiles/IConfiguration.cs +++ b/src/Tgstation.Server.Host/Components/StaticFiles/IConfiguration.cs @@ -3,8 +3,6 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; - using Tgstation.Server.Api.Models; using Tgstation.Server.Api.Models.Response; using Tgstation.Server.Host.Components.Events; @@ -15,7 +13,7 @@ namespace Tgstation.Server.Host.Components.StaticFiles /// /// For managing the Configuration directory. /// - public interface IConfiguration : IHostedService, IEventConsumer, IDisposable + public interface IConfiguration : IComponentService, IEventConsumer, IDisposable { /// /// Copies all files in the CodeModifications directory to . diff --git a/src/Tgstation.Server.Host/Components/Watchdog/IWatchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/IWatchdog.cs index 68bebfb81c..1e908eb85f 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/IWatchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/IWatchdog.cs @@ -2,8 +2,6 @@ using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; - using Tgstation.Server.Api.Models; using Tgstation.Server.Api.Models.Internal; using Tgstation.Server.Host.Components.Events; @@ -14,7 +12,7 @@ namespace Tgstation.Server.Host.Components.Watchdog /// /// Runs and monitors the twin server controllers. /// - public interface IWatchdog : IHostedService, IAsyncDisposable, IEventConsumer, IRenameNotifyee + public interface IWatchdog : IComponentService, IAsyncDisposable, IEventConsumer, IRenameNotifyee { /// /// The current . diff --git a/src/Tgstation.Server.Host/Jobs/IJobService.cs b/src/Tgstation.Server.Host/Jobs/IJobService.cs index 982a69f79b..e92ead5e6a 100644 --- a/src/Tgstation.Server.Host/Jobs/IJobService.cs +++ b/src/Tgstation.Server.Host/Jobs/IJobService.cs @@ -1,13 +1,11 @@ -using Microsoft.Extensions.Hosting; - -using Tgstation.Server.Host.Components; +using Tgstation.Server.Host.Components; namespace Tgstation.Server.Host.Jobs { /// /// The service that manages everything to do with jobs. /// - public interface IJobService : IJobManager, IHostedService + public interface IJobService : IJobManager, IComponentService { /// /// Activate the .