/// <summary> /// Construct an <see cref="Instance"/> /// </summary> /// <param name="metadata">The value of <see cref="metadata"/></param> /// <param name="repositoryManager">The value of <see cref="RepositoryManager"/></param> /// <param name="byondManager">The value of <see cref="ByondManager"/></param> /// <param name="dreamMaker">The value of <see cref="dreamMaker"/></param> /// <param name="watchdog">The value of <see cref="Watchdog"/></param> /// <param name="chat">The value of <see cref="Chat"/></param> /// <param name="configuration">The value of <see cref="Configuration"/></param> /// <param name="compileJobConsumer">The value of <see cref="compileJobConsumer"/></param> /// <param name="databaseContextFactory">The value of <see cref="databaseContextFactory"/></param> /// <param name="dmbFactory">The value of <see cref="dmbFactory"/></param> /// <param name="jobManager">The value of <see cref="jobManager"/></param> /// <param name="eventConsumer">The value of <see cref="eventConsumer"/></param> /// <param name="gitHubClientFactory">The value of <see cref="gitHubClientFactory"/></param> /// <param name="logger">The value of <see cref="logger"/></param> 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, IJobManager jobManager, IEventConsumer eventConsumer, IGitHubClientFactory gitHubClientFactory, ILogger <Instance> logger) { this.metadata = metadata ?? throw new ArgumentNullException(nameof(metadata)); RepositoryManager = repositoryManager ?? throw new ArgumentNullException(nameof(repositoryManager)); ByondManager = byondManager ?? throw new ArgumentNullException(nameof(byondManager)); this.dreamMaker = dreamMaker ?? throw new ArgumentNullException(nameof(dreamMaker)); Watchdog = watchdog ?? throw new ArgumentNullException(nameof(watchdog)); Chat = chat ?? throw new ArgumentNullException(nameof(chat)); Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); this.compileJobConsumer = compileJobConsumer ?? throw new ArgumentNullException(nameof(compileJobConsumer)); this.databaseContextFactory = databaseContextFactory ?? throw new ArgumentNullException(nameof(databaseContextFactory)); this.dmbFactory = dmbFactory ?? throw new ArgumentNullException(nameof(dmbFactory)); this.jobManager = jobManager ?? throw new ArgumentNullException(nameof(jobManager)); this.eventConsumer = eventConsumer ?? throw new ArgumentNullException(nameof(eventConsumer)); this.gitHubClientFactory = gitHubClientFactory ?? throw new ArgumentNullException(nameof(gitHubClientFactory)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Construct <see cref="DreamMaker"/> /// </summary> /// <param name="byond">The value of <see cref="byond"/></param> /// <param name="ioManager">The value of <see cref="ioManager"/></param> /// <param name="configuration">The value of <see cref="configuration"/></param> /// <param name="sessionControllerFactory">The value of <see cref="sessionControllerFactory"/></param> /// <param name="compileJobConsumer">The value of <see cref="compileJobConsumer"/></param> /// <param name="application">The value of <see cref="application"/></param> /// <param name="eventConsumer">The value of <see cref="eventConsumer"/></param> /// <param name="chat">The value of <see cref="chat"/></param> /// <param name="processExecutor">The value of <see cref="processExecutor"/></param> /// <param name="logger">The value of <see cref="logger"/></param> public DreamMaker(IByondManager byond, IIOManager ioManager, StaticFiles.IConfiguration configuration, ISessionControllerFactory sessionControllerFactory, ICompileJobConsumer compileJobConsumer, IApplication application, IEventConsumer eventConsumer, IChat chat, IProcessExecutor processExecutor, ILogger <DreamMaker> logger) { this.byond = byond; this.ioManager = ioManager ?? throw new ArgumentNullException(nameof(ioManager)); this.configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); this.sessionControllerFactory = sessionControllerFactory ?? throw new ArgumentNullException(nameof(sessionControllerFactory)); this.compileJobConsumer = compileJobConsumer ?? throw new ArgumentNullException(nameof(compileJobConsumer)); this.application = application ?? throw new ArgumentNullException(nameof(application)); this.eventConsumer = eventConsumer ?? throw new ArgumentNullException(nameof(eventConsumer)); this.chat = chat ?? throw new ArgumentNullException(nameof(chat)); this.processExecutor = processExecutor ?? throw new ArgumentNullException(nameof(processExecutor)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }