From dd394d979537c7bfe7c5a44e99c2cae794f3fe9b Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 29 Jul 2018 16:32:52 -0400 Subject: [PATCH] Further subdivision of the Components namespace --- .../{ => Byond}/ByondExecutableLock.cs | 2 +- .../Components/{ => Byond}/ByondManager.cs | 5 +---- .../{ => Byond}/IByondExecutableLock.cs | 2 +- .../Components/{ => Byond}/IByondInstaller.cs | 2 +- .../Components/{ => Byond}/IByondManager.cs | 2 +- .../{ => Byond}/PosixByondInstaller.cs | 2 +- .../{ => Byond}/WindowsByondInstaller.cs | 2 +- .../Components/{ => Compiler}/DmbFactory.cs | 2 +- .../Components/{ => Compiler}/DmbProvider.cs | 2 +- .../Components/{ => Compiler}/DreamMaker.cs | 18 ++++++++++----- .../Compiler/ICompileJobConsumer.cs | 22 +++++++++++++++++++ .../Components/{ => Compiler}/IDmbFactory.cs | 2 +- .../Components/{ => Compiler}/IDreamMaker.cs | 3 ++- .../{ => Compiler}/TemporaryDmbProvider.cs | 2 +- .../Components/ICompileJobConsumer.cs | 13 ----------- .../Components/IInstance.cs | 10 ++++++--- .../Components/Instance.cs | 21 ++++++++++++++++-- .../Components/InstanceFactory.cs | 5 ++++- .../Components/ReattachInfoHandler.cs | 1 + .../{ => Repository}/IRepository.cs | 2 +- .../{ => Repository}/IRepositoryManager.cs | 2 +- .../Components/{ => Repository}/Repository.cs | 2 +- .../{ => Repository}/RepositoryManager.cs | 2 +- .../{ => StaticFiles}/Configuration.cs | 2 +- .../{ => StaticFiles}/IConfiguration.cs | 2 +- .../ServerSideModifications.cs | 4 +--- .../Components/Watchdog/Executor.cs | 1 + .../Components/Watchdog/IExecutor.cs | 1 + .../Watchdog/ISessionControllerFactory.cs | 1 + .../Components/Watchdog/IWatchdogFactory.cs | 1 + .../Watchdog/ReattachInformation.cs | 3 ++- .../Components/Watchdog/Session.cs | 1 + .../Watchdog/SessionControllerFactory.cs | 1 + .../Components/Watchdog/Watchdog.cs | 1 + .../Components/Watchdog/WatchdogFactory.cs | 1 + .../Watchdog/WatchdogReattachInformation.cs | 2 +- .../Controllers/DreamMakerController.cs | 2 +- src/Tgstation.Server.Host/Core/Application.cs | 1 + 38 files changed, 98 insertions(+), 52 deletions(-) rename src/Tgstation.Server.Host/Components/{ => Byond}/ByondExecutableLock.cs (92%) rename src/Tgstation.Server.Host/Components/{ => Byond}/ByondManager.cs (98%) rename src/Tgstation.Server.Host/Components/{ => Byond}/IByondExecutableLock.cs (93%) rename src/Tgstation.Server.Host/Components/{ => Byond}/IByondInstaller.cs (97%) rename src/Tgstation.Server.Host/Components/{ => Byond}/IByondManager.cs (95%) rename src/Tgstation.Server.Host/Components/{ => Byond}/PosixByondInstaller.cs (98%) rename src/Tgstation.Server.Host/Components/{ => Byond}/WindowsByondInstaller.cs (98%) rename src/Tgstation.Server.Host/Components/{ => Compiler}/DmbFactory.cs (99%) rename src/Tgstation.Server.Host/Components/{ => Compiler}/DmbProvider.cs (97%) rename src/Tgstation.Server.Host/Components/{ => Compiler}/DreamMaker.cs (93%) create mode 100644 src/Tgstation.Server.Host/Components/Compiler/ICompileJobConsumer.cs rename src/Tgstation.Server.Host/Components/{ => Compiler}/IDmbFactory.cs (95%) rename src/Tgstation.Server.Host/Components/{ => Compiler}/IDreamMaker.cs (92%) rename src/Tgstation.Server.Host/Components/{ => Compiler}/TemporaryDmbProvider.cs (95%) delete mode 100644 src/Tgstation.Server.Host/Components/ICompileJobConsumer.cs rename src/Tgstation.Server.Host/Components/{ => Repository}/IRepository.cs (98%) rename src/Tgstation.Server.Host/Components/{ => Repository}/IRepositoryManager.cs (95%) rename src/Tgstation.Server.Host/Components/{ => Repository}/Repository.cs (99%) rename src/Tgstation.Server.Host/Components/{ => Repository}/RepositoryManager.cs (98%) rename src/Tgstation.Server.Host/Components/{ => StaticFiles}/Configuration.cs (99%) rename src/Tgstation.Server.Host/Components/{ => StaticFiles}/IConfiguration.cs (98%) rename src/Tgstation.Server.Host/Components/{ => StaticFiles}/ServerSideModifications.cs (94%) diff --git a/src/Tgstation.Server.Host/Components/ByondExecutableLock.cs b/src/Tgstation.Server.Host/Components/Byond/ByondExecutableLock.cs similarity index 92% rename from src/Tgstation.Server.Host/Components/ByondExecutableLock.cs rename to src/Tgstation.Server.Host/Components/Byond/ByondExecutableLock.cs index 2be7ab498a..3431ede531 100644 --- a/src/Tgstation.Server.Host/Components/ByondExecutableLock.cs +++ b/src/Tgstation.Server.Host/Components/Byond/ByondExecutableLock.cs @@ -1,6 +1,6 @@ using System; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Byond { /// sealed class ByondExecutableLock : IByondExecutableLock diff --git a/src/Tgstation.Server.Host/Components/ByondManager.cs b/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs similarity index 98% rename from src/Tgstation.Server.Host/Components/ByondManager.cs rename to src/Tgstation.Server.Host/Components/Byond/ByondManager.cs index 70af749930..f6f0c44790 100644 --- a/src/Tgstation.Server.Host/Components/ByondManager.cs +++ b/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs @@ -1,16 +1,13 @@ using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; -using System.IO.Compression; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Host.IO; -using MemoryStream = System.IO.MemoryStream; - -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Byond { /// sealed class ByondManager : IByondManager diff --git a/src/Tgstation.Server.Host/Components/IByondExecutableLock.cs b/src/Tgstation.Server.Host/Components/Byond/IByondExecutableLock.cs similarity index 93% rename from src/Tgstation.Server.Host/Components/IByondExecutableLock.cs rename to src/Tgstation.Server.Host/Components/Byond/IByondExecutableLock.cs index 2d390534e2..76e3c04321 100644 --- a/src/Tgstation.Server.Host/Components/IByondExecutableLock.cs +++ b/src/Tgstation.Server.Host/Components/Byond/IByondExecutableLock.cs @@ -1,6 +1,6 @@ using System; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Byond { /// /// Represents usage of the two primary BYOND server executables diff --git a/src/Tgstation.Server.Host/Components/IByondInstaller.cs b/src/Tgstation.Server.Host/Components/Byond/IByondInstaller.cs similarity index 97% rename from src/Tgstation.Server.Host/Components/IByondInstaller.cs rename to src/Tgstation.Server.Host/Components/Byond/IByondInstaller.cs index 9ad7e26510..8c2e742b30 100644 --- a/src/Tgstation.Server.Host/Components/IByondInstaller.cs +++ b/src/Tgstation.Server.Host/Components/Byond/IByondInstaller.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Byond { /// /// For downloading and installing BYOND extractions for a given system diff --git a/src/Tgstation.Server.Host/Components/IByondManager.cs b/src/Tgstation.Server.Host/Components/Byond/IByondManager.cs similarity index 95% rename from src/Tgstation.Server.Host/Components/IByondManager.cs rename to src/Tgstation.Server.Host/Components/Byond/IByondManager.cs index c6ac12119e..70fd934081 100644 --- a/src/Tgstation.Server.Host/Components/IByondManager.cs +++ b/src/Tgstation.Server.Host/Components/Byond/IByondManager.cs @@ -3,7 +3,7 @@ using System; using System.Threading; using System.Threading.Tasks; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Byond { /// /// For managing the BYOND installation diff --git a/src/Tgstation.Server.Host/Components/PosixByondInstaller.cs b/src/Tgstation.Server.Host/Components/Byond/PosixByondInstaller.cs similarity index 98% rename from src/Tgstation.Server.Host/Components/PosixByondInstaller.cs rename to src/Tgstation.Server.Host/Components/Byond/PosixByondInstaller.cs index 2a3e5cd44d..4bbcc351a2 100644 --- a/src/Tgstation.Server.Host/Components/PosixByondInstaller.cs +++ b/src/Tgstation.Server.Host/Components/Byond/PosixByondInstaller.cs @@ -6,7 +6,7 @@ using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Host.IO; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Byond { /// /// for Posix systems diff --git a/src/Tgstation.Server.Host/Components/WindowsByondInstaller.cs b/src/Tgstation.Server.Host/Components/Byond/WindowsByondInstaller.cs similarity index 98% rename from src/Tgstation.Server.Host/Components/WindowsByondInstaller.cs rename to src/Tgstation.Server.Host/Components/Byond/WindowsByondInstaller.cs index 6b102ace09..e1f656e0e2 100644 --- a/src/Tgstation.Server.Host/Components/WindowsByondInstaller.cs +++ b/src/Tgstation.Server.Host/Components/Byond/WindowsByondInstaller.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Host.IO; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Byond { /// /// for windows systems diff --git a/src/Tgstation.Server.Host/Components/DmbFactory.cs b/src/Tgstation.Server.Host/Components/Compiler/DmbFactory.cs similarity index 99% rename from src/Tgstation.Server.Host/Components/DmbFactory.cs rename to src/Tgstation.Server.Host/Components/Compiler/DmbFactory.cs index 0cb7fb2a2d..08fffc4f0a 100644 --- a/src/Tgstation.Server.Host/Components/DmbFactory.cs +++ b/src/Tgstation.Server.Host/Components/Compiler/DmbFactory.cs @@ -8,7 +8,7 @@ using Tgstation.Server.Host.Core; using Tgstation.Server.Host.IO; using Tgstation.Server.Host.Models; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Compiler { /// /// Standard diff --git a/src/Tgstation.Server.Host/Components/DmbProvider.cs b/src/Tgstation.Server.Host/Components/Compiler/DmbProvider.cs similarity index 97% rename from src/Tgstation.Server.Host/Components/DmbProvider.cs rename to src/Tgstation.Server.Host/Components/Compiler/DmbProvider.cs index d93b12ed78..3650c69ddc 100644 --- a/src/Tgstation.Server.Host/Components/DmbProvider.cs +++ b/src/Tgstation.Server.Host/Components/Compiler/DmbProvider.cs @@ -2,7 +2,7 @@ using Tgstation.Server.Host.IO; using Tgstation.Server.Host.Models; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Compiler { /// sealed class DmbProvider : IDmbProvider diff --git a/src/Tgstation.Server.Host/Components/DreamMaker.cs b/src/Tgstation.Server.Host/Components/Compiler/DreamMaker.cs similarity index 93% rename from src/Tgstation.Server.Host/Components/DreamMaker.cs rename to src/Tgstation.Server.Host/Components/Compiler/DreamMaker.cs index 7d1c19ba36..c6625bbaeb 100644 --- a/src/Tgstation.Server.Host/Components/DreamMaker.cs +++ b/src/Tgstation.Server.Host/Components/Compiler/DreamMaker.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Diagnostics; @@ -9,11 +10,13 @@ using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api.Models; using Tgstation.Server.Api.Models.Internal; +using Tgstation.Server.Host.Components.Byond; +using Tgstation.Server.Host.Components.Repository; using Tgstation.Server.Host.Components.Watchdog; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.IO; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Compiler { /// sealed class DreamMaker : IDreamMaker @@ -47,9 +50,9 @@ namespace Tgstation.Server.Host.Components /// readonly IIOManager ioManager; /// - /// The for + /// The for /// - readonly IConfiguration configuration; + readonly StaticFiles.IConfiguration configuration; /// /// The for /// @@ -82,7 +85,7 @@ namespace Tgstation.Server.Host.Components /// The value of /// The value of /// The value of - public DreamMaker(IByondManager byond, IIOManager ioManager, IConfiguration configuration, ISessionControllerFactory sessionControllerFactory, ICompileJobConsumer compileJobConsumer, IApplication application, IEventConsumer eventConsumer, ILogger logger) + public DreamMaker(IByondManager byond, IIOManager ioManager, StaticFiles.IConfiguration configuration, ISessionControllerFactory sessionControllerFactory, ICompileJobConsumer compileJobConsumer, IApplication application, IEventConsumer eventConsumer, ILogger logger) { this.byond = byond; this.ioManager = ioManager ?? throw new ArgumentNullException(nameof(ioManager)); @@ -286,8 +289,11 @@ namespace Tgstation.Server.Host.Components } if (!ddVerified) + { //server never validated or compile failed - await Task.WhenAll(CleanupFailedCompile(), eventConsumer.HandleEvent(EventType.CompileFailure, new List { job.ExitCode == 0 ? "1" : "0" }, cancellationToken)).ConfigureAwait(false); + await CleanupFailedCompile().ConfigureAwait(false); + await eventConsumer.HandleEvent(EventType.CompileFailure, new List { job.ExitCode == 0 ? "1" : "0" }, cancellationToken).ConfigureAwait(false); + } else { job.DMApiValidated = true; diff --git a/src/Tgstation.Server.Host/Components/Compiler/ICompileJobConsumer.cs b/src/Tgstation.Server.Host/Components/Compiler/ICompileJobConsumer.cs new file mode 100644 index 0000000000..398d6d038c --- /dev/null +++ b/src/Tgstation.Server.Host/Components/Compiler/ICompileJobConsumer.cs @@ -0,0 +1,22 @@ +using Microsoft.Extensions.Hosting; +using System; +using System.Threading; +using System.Threading.Tasks; +using Tgstation.Server.Host.Models; + +namespace Tgstation.Server.Host.Components.Compiler +{ + /// + /// Sink for s + /// + interface ICompileJobConsumer : IHostedService, IDisposable + { + /// + /// Load a new into the + /// + /// The to load + /// The for the operation + /// A representing the running operation + Task LoadCompileJob(CompileJob job, CancellationToken cancellationToken); + } +} \ No newline at end of file diff --git a/src/Tgstation.Server.Host/Components/IDmbFactory.cs b/src/Tgstation.Server.Host/Components/Compiler/IDmbFactory.cs similarity index 95% rename from src/Tgstation.Server.Host/Components/IDmbFactory.cs rename to src/Tgstation.Server.Host/Components/Compiler/IDmbFactory.cs index bcdd48907a..e79f55b6f8 100644 --- a/src/Tgstation.Server.Host/Components/IDmbFactory.cs +++ b/src/Tgstation.Server.Host/Components/Compiler/IDmbFactory.cs @@ -3,7 +3,7 @@ using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Host.Models; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Compiler { /// /// Factory for s diff --git a/src/Tgstation.Server.Host/Components/IDreamMaker.cs b/src/Tgstation.Server.Host/Components/Compiler/IDreamMaker.cs similarity index 92% rename from src/Tgstation.Server.Host/Components/IDreamMaker.cs rename to src/Tgstation.Server.Host/Components/Compiler/IDreamMaker.cs index d8610784cf..900a3e648e 100644 --- a/src/Tgstation.Server.Host/Components/IDreamMaker.cs +++ b/src/Tgstation.Server.Host/Components/Compiler/IDreamMaker.cs @@ -1,8 +1,9 @@ using System.Threading; using System.Threading.Tasks; +using Tgstation.Server.Host.Components.Repository; using Tgstation.Server.Host.Models; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Compiler { /// /// For managing the compiler diff --git a/src/Tgstation.Server.Host/Components/TemporaryDmbProvider.cs b/src/Tgstation.Server.Host/Components/Compiler/TemporaryDmbProvider.cs similarity index 95% rename from src/Tgstation.Server.Host/Components/TemporaryDmbProvider.cs rename to src/Tgstation.Server.Host/Components/Compiler/TemporaryDmbProvider.cs index de3c7164ac..dcf5c0affe 100644 --- a/src/Tgstation.Server.Host/Components/TemporaryDmbProvider.cs +++ b/src/Tgstation.Server.Host/Components/Compiler/TemporaryDmbProvider.cs @@ -1,7 +1,7 @@ using System; using Tgstation.Server.Host.Models; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Compiler { /// /// Temporary diff --git a/src/Tgstation.Server.Host/Components/ICompileJobConsumer.cs b/src/Tgstation.Server.Host/Components/ICompileJobConsumer.cs deleted file mode 100644 index 248590a01f..0000000000 --- a/src/Tgstation.Server.Host/Components/ICompileJobConsumer.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Microsoft.Extensions.Hosting; -using System; -using System.Threading; -using System.Threading.Tasks; -using Tgstation.Server.Host.Models; - -namespace Tgstation.Server.Host.Components -{ - interface ICompileJobConsumer : IHostedService, IDisposable - { - Task LoadCompileJob(CompileJob job, CancellationToken cancellationToken); - } -} \ No newline at end of file diff --git a/src/Tgstation.Server.Host/Components/IInstance.cs b/src/Tgstation.Server.Host/Components/IInstance.cs index f5d3db11dc..946a95b16a 100644 --- a/src/Tgstation.Server.Host/Components/IInstance.cs +++ b/src/Tgstation.Server.Host/Components/IInstance.cs @@ -1,7 +1,11 @@ -using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; using System; using System.Threading.Tasks; +using Tgstation.Server.Host.Components.Byond; using Tgstation.Server.Host.Components.Chat; +using Tgstation.Server.Host.Components.Compiler; +using Tgstation.Server.Host.Components.Repository; using Tgstation.Server.Host.Components.Watchdog; namespace Tgstation.Server.Host.Components @@ -37,9 +41,9 @@ namespace Tgstation.Server.Host.Components IChat Chat { get; } /// - /// The for the + /// The for the /// - IConfiguration Configuration { get; } + StaticFiles.IConfiguration Configuration { get; } /// /// Get the associated with the diff --git a/src/Tgstation.Server.Host/Components/Instance.cs b/src/Tgstation.Server.Host/Components/Instance.cs index 6ee66aceb6..2695689f01 100644 --- a/src/Tgstation.Server.Host/Components/Instance.cs +++ b/src/Tgstation.Server.Host/Components/Instance.cs @@ -1,9 +1,13 @@ using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; using System; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Tgstation.Server.Host.Components.Byond; using Tgstation.Server.Host.Components.Chat; +using Tgstation.Server.Host.Components.Compiler; +using Tgstation.Server.Host.Components.Repository; using Tgstation.Server.Host.Components.Watchdog; using Tgstation.Server.Host.Core; @@ -28,7 +32,7 @@ namespace Tgstation.Server.Host.Components public IChat Chat { get; } /// - public IConfiguration Configuration { get; } + public StaticFiles.IConfiguration Configuration { get; } /// /// The for the @@ -59,7 +63,20 @@ namespace Tgstation.Server.Host.Components /// CancellationTokenSource timerCts; - public Instance(Api.Models.Instance metadata, IRepositoryManager repositoryManager, IByondManager byondManager, IDreamMaker dreamMaker, IWatchdog watchdog, IChat chat, IConfiguration configuration, ICompileJobConsumer compileJobConsumer, IDatabaseContextFactory databaseContextFactory, IDmbFactory dmbFactory) + /// + /// Construct an + /// + /// The value of + /// The value of + /// The value of + /// The value of + /// The value of + /// The value of + /// The value of + /// The value of + /// The value of + /// The value of + public Instance(Api.Models.Instance metadata, IRepositoryManager repositoryManager, IByondManager byondManager, IDreamMaker dreamMaker, IWatchdog watchdog, IChat chat, StaticFiles.IConfiguration configuration, ICompileJobConsumer compileJobConsumer, IDatabaseContextFactory databaseContextFactory, IDmbFactory dmbFactory) { this.metadata = metadata ?? throw new ArgumentNullException(nameof(metadata)); RepositoryManager = repositoryManager ?? throw new ArgumentNullException(nameof(repositoryManager)); diff --git a/src/Tgstation.Server.Host/Components/InstanceFactory.cs b/src/Tgstation.Server.Host/Components/InstanceFactory.cs index 527fdad14c..9bb2a2b73d 100644 --- a/src/Tgstation.Server.Host/Components/InstanceFactory.cs +++ b/src/Tgstation.Server.Host/Components/InstanceFactory.cs @@ -1,8 +1,11 @@ using Byond.TopicSender; using Microsoft.Extensions.Logging; using System; +using Tgstation.Server.Host.Components.Byond; using Tgstation.Server.Host.Components.Chat; using Tgstation.Server.Host.Components.Chat.Commands; +using Tgstation.Server.Host.Components.Compiler; +using Tgstation.Server.Host.Components.Repository; using Tgstation.Server.Host.Components.Watchdog; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.IO; @@ -133,7 +136,7 @@ namespace Tgstation.Server.Host.Components try { var byond = new ByondManager(byondIOManager, byondInstaller, loggerFactory.CreateLogger()); - var configuration = new Configuration(configurationIoManager, synchronousIOManager, symlinkFactory, loggerFactory.CreateLogger()); + var configuration = new StaticFiles.Configuration(configurationIoManager, synchronousIOManager, symlinkFactory, loggerFactory.CreateLogger()); var chat = chatFactory.CreateChat(metadata.ChatSettings); try diff --git a/src/Tgstation.Server.Host/Components/ReattachInfoHandler.cs b/src/Tgstation.Server.Host/Components/ReattachInfoHandler.cs index b72af7cf8e..a4135a29fa 100644 --- a/src/Tgstation.Server.Host/Components/ReattachInfoHandler.cs +++ b/src/Tgstation.Server.Host/Components/ReattachInfoHandler.cs @@ -3,6 +3,7 @@ using System; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Tgstation.Server.Host.Components.Compiler; using Tgstation.Server.Host.Components.Watchdog; using Tgstation.Server.Host.Core; diff --git a/src/Tgstation.Server.Host/Components/IRepository.cs b/src/Tgstation.Server.Host/Components/Repository/IRepository.cs similarity index 98% rename from src/Tgstation.Server.Host/Components/IRepository.cs rename to src/Tgstation.Server.Host/Components/Repository/IRepository.cs index 08a500cb02..cb46b4a9d1 100644 --- a/src/Tgstation.Server.Host/Components/IRepository.cs +++ b/src/Tgstation.Server.Host/Components/Repository/IRepository.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Repository { /// /// Represents an on-disk git repository diff --git a/src/Tgstation.Server.Host/Components/IRepositoryManager.cs b/src/Tgstation.Server.Host/Components/Repository/IRepositoryManager.cs similarity index 95% rename from src/Tgstation.Server.Host/Components/IRepositoryManager.cs rename to src/Tgstation.Server.Host/Components/Repository/IRepositoryManager.cs index ac2823b33a..87544e2938 100644 --- a/src/Tgstation.Server.Host/Components/IRepositoryManager.cs +++ b/src/Tgstation.Server.Host/Components/Repository/IRepositoryManager.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Repository { /// /// Factory for creating and loading s diff --git a/src/Tgstation.Server.Host/Components/Repository.cs b/src/Tgstation.Server.Host/Components/Repository/Repository.cs similarity index 99% rename from src/Tgstation.Server.Host/Components/Repository.cs rename to src/Tgstation.Server.Host/Components/Repository/Repository.cs index 218b21932c..4696bb66bb 100644 --- a/src/Tgstation.Server.Host/Components/Repository.cs +++ b/src/Tgstation.Server.Host/Components/Repository/Repository.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Host.IO; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Repository { /// sealed class Repository : IRepository diff --git a/src/Tgstation.Server.Host/Components/RepositoryManager.cs b/src/Tgstation.Server.Host/Components/Repository/RepositoryManager.cs similarity index 98% rename from src/Tgstation.Server.Host/Components/RepositoryManager.cs rename to src/Tgstation.Server.Host/Components/Repository/RepositoryManager.cs index 118509530a..75c67c1e6f 100644 --- a/src/Tgstation.Server.Host/Components/RepositoryManager.cs +++ b/src/Tgstation.Server.Host/Components/Repository/RepositoryManager.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Tgstation.Server.Api.Models.Internal; using Tgstation.Server.Host.IO; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.Repository { /// sealed class RepositoryManager : IRepositoryManager diff --git a/src/Tgstation.Server.Host/Components/Configuration.cs b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs similarity index 99% rename from src/Tgstation.Server.Host/Components/Configuration.cs rename to src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs index 41f1f34977..d014ccd90d 100644 --- a/src/Tgstation.Server.Host/Components/Configuration.cs +++ b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs @@ -11,7 +11,7 @@ using Tgstation.Server.Api.Models; using Tgstation.Server.Host.IO; using Tgstation.Server.Host.Security; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.StaticFiles { /// sealed class Configuration : IConfiguration diff --git a/src/Tgstation.Server.Host/Components/IConfiguration.cs b/src/Tgstation.Server.Host/Components/StaticFiles/IConfiguration.cs similarity index 98% rename from src/Tgstation.Server.Host/Components/IConfiguration.cs rename to src/Tgstation.Server.Host/Components/StaticFiles/IConfiguration.cs index e972f8e508..433e532413 100644 --- a/src/Tgstation.Server.Host/Components/IConfiguration.cs +++ b/src/Tgstation.Server.Host/Components/StaticFiles/IConfiguration.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Tgstation.Server.Api.Models; using Tgstation.Server.Host.Security; -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.StaticFiles { /// /// For managing the Configuration directory diff --git a/src/Tgstation.Server.Host/Components/ServerSideModifications.cs b/src/Tgstation.Server.Host/Components/StaticFiles/ServerSideModifications.cs similarity index 94% rename from src/Tgstation.Server.Host/Components/ServerSideModifications.cs rename to src/Tgstation.Server.Host/Components/StaticFiles/ServerSideModifications.cs index e54faac733..7afb8ebf1f 100644 --- a/src/Tgstation.Server.Host/Components/ServerSideModifications.cs +++ b/src/Tgstation.Server.Host/Components/StaticFiles/ServerSideModifications.cs @@ -1,6 +1,4 @@ -using System; - -namespace Tgstation.Server.Host.Components +namespace Tgstation.Server.Host.Components.StaticFiles { /// /// Represents code modifications via configuration diff --git a/src/Tgstation.Server.Host/Components/Watchdog/Executor.cs b/src/Tgstation.Server.Host/Components/Watchdog/Executor.cs index c422c33730..5ff46f692c 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/Executor.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/Executor.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using System.Globalization; using Tgstation.Server.Api.Models; using Tgstation.Server.Api.Models.Internal; +using Tgstation.Server.Host.Components.Byond; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/IExecutor.cs b/src/Tgstation.Server.Host/Components/Watchdog/IExecutor.cs index 84e2232bd3..127244af15 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/IExecutor.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/IExecutor.cs @@ -1,4 +1,5 @@ using Tgstation.Server.Api.Models.Internal; +using Tgstation.Server.Host.Components.Byond; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/ISessionControllerFactory.cs b/src/Tgstation.Server.Host/Components/Watchdog/ISessionControllerFactory.cs index 9f307f44c0..35f423adc3 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/ISessionControllerFactory.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/ISessionControllerFactory.cs @@ -1,6 +1,7 @@ using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api.Models.Internal; +using Tgstation.Server.Host.Components.Byond; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/IWatchdogFactory.cs b/src/Tgstation.Server.Host/Components/Watchdog/IWatchdogFactory.cs index 35326200d6..68717edc9c 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/IWatchdogFactory.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/IWatchdogFactory.cs @@ -1,4 +1,5 @@ using Tgstation.Server.Api.Models.Internal; +using Tgstation.Server.Host.Components.Compiler; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/ReattachInformation.cs b/src/Tgstation.Server.Host/Components/Watchdog/ReattachInformation.cs index 6ede61b0b6..271d840692 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/ReattachInformation.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/ReattachInformation.cs @@ -1,4 +1,5 @@ -using Tgstation.Server.Host.Models; +using Tgstation.Server.Host.Components.Compiler; +using Tgstation.Server.Host.Models; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/Session.cs b/src/Tgstation.Server.Host/Components/Watchdog/Session.cs index e978b66003..29b7eb8844 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/Session.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/Session.cs @@ -1,6 +1,7 @@ using System; using System.Diagnostics; using System.Threading.Tasks; +using Tgstation.Server.Host.Components.Byond; namespace Tgstation.Server.Host.Components.Watchdog { diff --git a/src/Tgstation.Server.Host/Components/Watchdog/SessionControllerFactory.cs b/src/Tgstation.Server.Host/Components/Watchdog/SessionControllerFactory.cs index ec2afa72a0..1a24e7eb71 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/SessionControllerFactory.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/SessionControllerFactory.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api.Models.Internal; +using Tgstation.Server.Host.Components.Byond; using Tgstation.Server.Host.Components.Chat; using Tgstation.Server.Host.Core; using Tgstation.Server.Host.IO; diff --git a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs index 25e85688e0..4a5249e4e8 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs @@ -10,6 +10,7 @@ using System.Threading; using System.Threading.Tasks; using Tgstation.Server.Api.Models.Internal; using Tgstation.Server.Host.Components.Chat; +using Tgstation.Server.Host.Components.Compiler; using Tgstation.Server.Host.Core; namespace Tgstation.Server.Host.Components.Watchdog diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogFactory.cs b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogFactory.cs index a3dca7bb30..2df5df1d9e 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogFactory.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogFactory.cs @@ -3,6 +3,7 @@ using Microsoft.Extensions.Logging; using System; using Tgstation.Server.Api.Models.Internal; using Tgstation.Server.Host.Components.Chat; +using Tgstation.Server.Host.Components.Compiler; using Tgstation.Server.Host.Core; namespace Tgstation.Server.Host.Components.Watchdog diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogReattachInformation.cs b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogReattachInformation.cs index 0dd94f8ba5..efe645c044 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogReattachInformation.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogReattachInformation.cs @@ -1,4 +1,4 @@ -using System; +using Tgstation.Server.Host.Components.Compiler; using Tgstation.Server.Host.Models; namespace Tgstation.Server.Host.Components.Watchdog diff --git a/src/Tgstation.Server.Host/Controllers/DreamMakerController.cs b/src/Tgstation.Server.Host/Controllers/DreamMakerController.cs index d00f4dabea..a29ac1dcf7 100644 --- a/src/Tgstation.Server.Host/Controllers/DreamMakerController.cs +++ b/src/Tgstation.Server.Host/Controllers/DreamMakerController.cs @@ -17,7 +17,7 @@ namespace Tgstation.Server.Host.Controllers /// /// Controller for managing the compiler /// - [Route("/" + nameof(DreamMaker))] + [Route("/" + nameof(Api.Models.DreamMaker))] public sealed class DreamMakerController : ModelController { /// diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index 52b6b4364d..595b6cccb5 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -20,6 +20,7 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Threading.Tasks; using Tgstation.Server.Host.Components; +using Tgstation.Server.Host.Components.Byond; using Tgstation.Server.Host.Components.Chat; using Tgstation.Server.Host.Components.Chat.Commands; using Tgstation.Server.Host.Components.Watchdog;