Exemplo n.º 1
0
 /// <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));
 }
Exemplo n.º 2
0
        /// <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="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="remoteDeploymentManagerFactory">The value of <see cref="remoteDeploymentManagerFactory"/>.</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,
            IChatManager chat,
            StaticFiles.IConfiguration
            configuration,
            IDmbFactory dmbFactory,
            IJobManager jobManager,
            IEventConsumer eventConsumer,
            IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory,
            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));
            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.dmbFactory    = dmbFactory ?? throw new ArgumentNullException(nameof(dmbFactory));
            this.jobManager    = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
            this.eventConsumer = eventConsumer ?? throw new ArgumentNullException(nameof(eventConsumer));
            this.remoteDeploymentManagerFactory = remoteDeploymentManagerFactory ?? throw new ArgumentNullException(nameof(remoteDeploymentManagerFactory));
            this.logger = logger ?? throw new ArgumentNullException(nameof(logger));

            timerLock = new object();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DreamMaker"/> class.
        /// </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="eventConsumer">The value of <see cref="eventConsumer"/>.</param>
        /// <param name="chatManager">The value of <see cref="chatManager"/>.</param>
        /// <param name="processExecutor">The value of <see cref="processExecutor"/>.</param>
        /// <param name="compileJobConsumer">The value of <see cref="compileJobConsumer"/>.</param>
        /// <param name="repositoryManager">The value of <see cref="repositoryManager"/>.</param>
        /// <param name="remoteDeploymentManagerFactory">The value of <see cref="remoteDeploymentManagerFactory"/>.</param>
        /// <param name="logger">The value of <see cref="logger"/>.</param>
        /// <param name="metadata">The value of <see cref="metadata"/>.</param>
        public DreamMaker(
            IByondManager byond,
            IIOManager ioManager,
            StaticFiles.IConfiguration configuration,
            ISessionControllerFactory sessionControllerFactory,
            IEventConsumer eventConsumer,
            IChatManager chatManager,
            IProcessExecutor processExecutor,
            ICompileJobSink compileJobConsumer,
            IRepositoryManager repositoryManager,
            IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory,
            ILogger <DreamMaker> logger,
            Api.Models.Instance metadata)
        {
            this.byond                          = byond ?? throw new ArgumentNullException(nameof(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.eventConsumer                  = eventConsumer ?? throw new ArgumentNullException(nameof(eventConsumer));
            this.chatManager                    = chatManager ?? throw new ArgumentNullException(nameof(chatManager));
            this.processExecutor                = processExecutor ?? throw new ArgumentNullException(nameof(processExecutor));
            this.compileJobConsumer             = compileJobConsumer ?? throw new ArgumentNullException(nameof(compileJobConsumer));
            this.repositoryManager              = repositoryManager ?? throw new ArgumentNullException(nameof(repositoryManager));
            this.remoteDeploymentManagerFactory = remoteDeploymentManagerFactory ?? throw new ArgumentNullException(nameof(remoteDeploymentManagerFactory));
            this.logger                         = logger ?? throw new ArgumentNullException(nameof(logger));
            this.metadata                       = metadata ?? throw new ArgumentNullException(nameof(metadata));

            deploymentLock = new object();
        }
Exemplo n.º 4
0
 /// <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));
 }