Ejemplo n.º 1
0
 /// <summary>
 /// Construct a <see cref="UserController"/>
 /// </summary>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/></param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/></param>
 /// <param name="instanceManager">The <see cref="IInstanceManager"/> for the <see cref="InstanceRequiredController"/>.</param>
 /// <param name="ioManager">The value of <see cref="ioManager"/></param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/></param>
 public ConfigurationController(
     IDatabaseContext databaseContext,
     IAuthenticationContextFactory authenticationContextFactory,
     IInstanceManager instanceManager,
     IIOManager ioManager,
     ILogger <ConfigurationController> logger)
     : base(
         instanceManager,
         databaseContext,
         authenticationContextFactory,
         logger)
 {
     this.ioManager = ioManager ?? throw new ArgumentNullException(nameof(ioManager));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InstanceRequiredController"/> <see langword="class"/>.
 /// </summary>
 /// <param name="instanceManager">The value of <see cref="instanceManager"/>.</param>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/>.</param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/>.</param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/></param>
 protected InstanceRequiredController(
     IInstanceManager instanceManager,
     IDatabaseContext databaseContext,
     IAuthenticationContextFactory authenticationContextFactory,
     ILogger <InstanceRequiredController> logger)
     : base(
         databaseContext,
         authenticationContextFactory,
         logger,
         true,
         true)
 {
     this.instanceManager = instanceManager ?? throw new ArgumentNullException(nameof(instanceManager));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Construct a <see cref="HomeController"/>
 /// </summary>
 /// <param name="instanceManager">The <see cref="IInstanceManager"/> for the <see cref="InstanceRequiredController"/>.</param>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/></param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/></param>
 /// <param name="jobManager">The value of <see cref="jobManager"/></param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/></param>
 public JobController(
     IInstanceManager instanceManager,
     IDatabaseContext databaseContext,
     IAuthenticationContextFactory authenticationContextFactory,
     IJobManager jobManager,
     ILogger <JobController> logger)
     : base(
         instanceManager,
         databaseContext,
         authenticationContextFactory,
         logger)
 {
     this.jobManager = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ByondController"/> class.
 /// </summary>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/>.</param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/>.</param>
 /// <param name="instanceManager">The <see cref="IInstanceManager"/> for the <see cref="InstanceRequiredController"/>.</param>
 /// <param name="jobManager">The value of <see cref="jobManager"/>.</param>
 /// <param name="fileTransferService">The value of <see cref="fileTransferService"/>.</param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/>.</param>
 public ByondController(
     IDatabaseContext databaseContext,
     IAuthenticationContextFactory authenticationContextFactory,
     IInstanceManager instanceManager,
     IJobManager jobManager,
     IFileTransferTicketProvider fileTransferService,
     ILogger <ByondController> logger)
     : base(
         instanceManager,
         databaseContext,
         authenticationContextFactory,
         logger)
 {
     this.jobManager          = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
     this.fileTransferService = fileTransferService ?? throw new ArgumentNullException(nameof(fileTransferService));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Construct a <see cref="RepositoryController"/>
 /// </summary>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/></param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/></param>
 /// <param name="instanceManager">The <see cref="IInstanceManager"/> for the <see cref="InstanceRequiredController"/>.</param>
 /// <param name="gitHubClientFactory">The value of <see cref="gitHubClientFactory"/></param>
 /// <param name="jobManager">The value of <see cref="jobManager"/></param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/></param>
 public RepositoryController(
     IDatabaseContext databaseContext,
     IAuthenticationContextFactory authenticationContextFactory,
     IInstanceManager instanceManager,
     IGitHubClientFactory gitHubClientFactory,
     IJobManager jobManager,
     ILogger <RepositoryController> logger)
     : base(
         instanceManager,
         databaseContext,
         authenticationContextFactory,
         logger)
 {
     this.gitHubClientFactory = gitHubClientFactory ?? throw new ArgumentNullException(nameof(gitHubClientFactory));
     this.jobManager          = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DreamMakerController"/> class.
 /// </summary>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/>.</param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/>.</param>
 /// <param name="jobManager">The value of <see cref="jobManager"/>.</param>
 /// <param name="instanceManager">The <see cref="IInstanceManager"/> for the <see cref="InstanceRequiredController"/>.</param>
 /// <param name="portAllocator">The value of <see cref="IPortAllocator"/>.</param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/>.</param>
 public DreamMakerController(
     IDatabaseContext databaseContext,
     IAuthenticationContextFactory authenticationContextFactory,
     IJobManager jobManager,
     IInstanceManager instanceManager,
     IPortAllocator portAllocator,
     ILogger <DreamMakerController> logger)
     : base(
         instanceManager,
         databaseContext,
         authenticationContextFactory,
         logger)
 {
     this.jobManager    = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
     this.portAllocator = portAllocator ?? throw new ArgumentNullException(nameof(portAllocator));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Construct a <see cref="InstanceController"/>
 /// </summary>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/></param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/></param>
 /// <param name="jobManager">The value of <see cref="jobManager"/></param>
 /// <param name="instanceManager">The value of <see cref="instanceManager"/></param>
 /// <param name="ioManager">The value of <see cref="ioManager"/></param>
 /// <param name="assemblyInformationProvider">The value of <see cref="assemblyInformationProvider"/></param>
 /// <param name="platformIdentifier">The value of <see cref="platformIdentifier"/></param>
 /// <param name="generalConfigurationOptions">The <see cref="IOptions{TOptions}"/> containing the value of <see cref="generalConfiguration"/>.</param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/></param>
 public InstanceController(
     IDatabaseContext databaseContext,
     IAuthenticationContextFactory authenticationContextFactory,
     IJobManager jobManager,
     IInstanceManager instanceManager,
     IIOManager ioManager,
     IAssemblyInformationProvider assemblyInformationProvider,
     IPlatformIdentifier platformIdentifier,
     IOptions <GeneralConfiguration> generalConfigurationOptions,
     ILogger <InstanceController> logger)
     : base(databaseContext, authenticationContextFactory, logger, false, true)
 {
     this.jobManager                  = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
     this.instanceManager             = instanceManager ?? throw new ArgumentNullException(nameof(instanceManager));
     this.ioManager                   = ioManager ?? throw new ArgumentNullException(nameof(ioManager));
     this.assemblyInformationProvider = assemblyInformationProvider ?? throw new ArgumentNullException(nameof(assemblyInformationProvider));
     this.platformIdentifier          = platformIdentifier ?? throw new ArgumentNullException(nameof(platformIdentifier));
     generalConfiguration             = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions));
 }
Ejemplo n.º 8
0
 public void SetInstanceManager(IInstanceManager instanceManager)
 {
     _instanceManager = instanceManager;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Construct a <see cref="RepositoryController"/>
 /// </summary>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/></param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/></param>
 /// <param name="instanceManager">The value of <see cref="instanceManager"/></param>
 /// <param name="gitHubClientFactory">The value of <see cref="gitHubClientFactory"/></param>
 /// <param name="jobManager">The value of <see cref="jobManager"/></param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/></param>
 /// <param name="generalConfigurationOptions">The <see cref="IOptions{TOptions}"/> containing value of <see cref="generalConfiguration"/></param>
 public RepositoryController(IDatabaseContext databaseContext, IAuthenticationContextFactory authenticationContextFactory, IInstanceManager instanceManager, IGitHubClientFactory gitHubClientFactory, IJobManager jobManager, ILogger <RepositoryController> logger, IOptions <GeneralConfiguration> generalConfigurationOptions) : base(databaseContext, authenticationContextFactory, logger, true, true)
 {
     this.instanceManager     = instanceManager ?? throw new ArgumentNullException(nameof(instanceManager));
     this.gitHubClientFactory = gitHubClientFactory ?? throw new ArgumentNullException(nameof(gitHubClientFactory));
     this.jobManager          = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
     generalConfiguration     = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions));
 }
Ejemplo n.º 10
0
 public InstanceController(IEnvironment environment, IInstanceManager instanceManager)
 {
     _environment     = environment;
     _instanceManager = instanceManager;
 }
 public LinuxContainerInitializationHostService(IEnvironment environment, IInstanceManager instanceManager, ILoggerFactory loggerFactory)
 {
     _environment     = environment;
     _instanceManager = instanceManager;
     _logger          = loggerFactory.CreateLogger(ScriptConstants.LogCategoryHostGeneral);
 }
 public InstanceController(ScriptSettingsManager settingsManager, IInstanceManager instanceManager)
 {
     _settingsManager = settingsManager;
     _instanceManager = instanceManager;
 }
Ejemplo n.º 13
0
 public void SetInstanceManager(IInstanceManager instanceManager)
 {
     _instanceManager = instanceManager;
     instanceManager.AddEventListener(this);
 }
 /// <summary>
 /// Construct a <see cref="InstanceController"/>
 /// </summary>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/></param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/></param>
 /// <param name="jobManager">The value of <see cref="jobManager"/></param>
 /// <param name="instanceManager">The value of <see cref="instanceManager"/></param>
 /// <param name="ioManager">The value of <see cref="ioManager"/></param>
 /// <param name="application">The value of <see cref="application"/></param>
 /// <param name="platformIdentifier">The value of <see cref="platformIdentifier"/></param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/></param>
 public InstanceController(IDatabaseContext databaseContext, IAuthenticationContextFactory authenticationContextFactory, IJobManager jobManager, IInstanceManager instanceManager, IIOManager ioManager, IApplication application, IPlatformIdentifier platformIdentifier, ILogger <InstanceController> logger) : base(databaseContext, authenticationContextFactory, logger, false, true)
 {
     this.jobManager         = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
     this.instanceManager    = instanceManager ?? throw new ArgumentNullException(nameof(instanceManager));
     this.ioManager          = ioManager ?? throw new ArgumentNullException(nameof(ioManager));
     this.application        = application ?? throw new ArgumentNullException(nameof(application));
     this.platformIdentifier = platformIdentifier ?? throw new ArgumentNullException(nameof(platformIdentifier));
 }
 /// <summary>
 /// Construct a <see cref="DreamDaemonController"/>
 /// </summary>
 /// <param name="databaseContext">The <see cref="IDatabaseContext"/> for the <see cref="ApiController"/></param>
 /// <param name="authenticationContextFactory">The <see cref="IAuthenticationContextFactory"/> for the <see cref="ApiController"/></param>
 /// <param name="jobManager">The value of <see cref="jobManager"/></param>
 /// <param name="instanceManager">The value of <see cref="instanceManager"/></param>
 /// <param name="logger">The <see cref="ILogger"/> for the <see cref="ApiController"/></param>
 public DreamDaemonController(IDatabaseContext databaseContext, IAuthenticationContextFactory authenticationContextFactory, IJobManager jobManager, IInstanceManager instanceManager, ILogger <DreamDaemonController> logger) : base(databaseContext, authenticationContextFactory, logger, true, true)
 {
     this.jobManager      = jobManager ?? throw new ArgumentNullException(nameof(jobManager));
     this.instanceManager = instanceManager ?? throw new ArgumentNullException(nameof(instanceManager));
 }
Ejemplo n.º 16
0
 public InstanceController(WebScriptHostManager scriptHostManager, ScriptSettingsManager settingsManager, IInstanceManager instanceManager)
 {
     _scriptHostManager = scriptHostManager;
     _settingsManager   = settingsManager;
     _instanceManager   = instanceManager;
 }
Ejemplo n.º 17
0
 public LinuxContainerInitializationHostService(ScriptSettingsManager settingsManager, IInstanceManager instanceManager, ILoggerFactory loggerFactory)
 {
     _settingsManager = settingsManager;
     _instanceManager = instanceManager;
     _logger          = loggerFactory.CreateLogger(ScriptConstants.LogCategoryHostGeneral);
 }
Ejemplo n.º 18
0
        private static IInstanceManager _instanceManager;         // DI-injected item.

        public NetworkController(IInstanceManager instanceManager)
        {
            _instanceManager = instanceManager;
        }
Ejemplo n.º 19
0
 public InstanceController(IEnvironment environment, IInstanceManager instanceManager, ILoggerFactory loggerFactory)
 {
     _environment     = environment;
     _instanceManager = instanceManager;
     _logger          = loggerFactory.CreateLogger <InstanceController>();
 }
 public LinuxContainerInitializationHostService(IEnvironment environment, IInstanceManager instanceManager, ILogger <LinuxContainerInitializationHostService> logger)
 {
     _environment     = environment;
     _instanceManager = instanceManager;
     _logger          = logger;
 }