Beispiel #1
0
#pragma warning disable CS0618 // Type or member is obsolete

    // IDistributedLockManager is marked as obsolete, because it's not ready for "prime time"
    // however; it is used to managed singleton function execution within the functions fx !!!

    public GitHubAdapter(
        IAuthorizationSessionClient sessionClient,
        IAuthorizationTokenClient tokenClient,
        IDistributedLockManager distributedLockManager,
        ISecretsStoreProvider secretsStoreProvider,
        IHttpClientFactory httpClientFactory,
        IOrganizationRepository organizationRepository,
        IUserRepository userRepository,
        IDeploymentScopeRepository deploymentScopeRepository,
        IProjectRepository projectRepository,
        IComponentRepository componentRepository,
        IComponentTemplateRepository componentTemplateRepository,
        IAzureSessionService azureSessionService,
        IAzureResourceService azureResourceService,
        IGraphService graphService,
        IFunctionsHost functionsHost = null)
        : base(sessionClient, tokenClient, distributedLockManager, secretsStoreProvider, azureSessionService, graphService, organizationRepository, deploymentScopeRepository, projectRepository, userRepository)
    {
        this.httpClientFactory           = httpClientFactory ?? new DefaultHttpClientFactory();
        this.organizationRepository      = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
        this.userRepository              = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
        this.deploymentScopeRepository   = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
        this.projectRepository           = projectRepository ?? throw new ArgumentNullException(nameof(projectRepository));
        this.componentRepository         = componentRepository ?? throw new ArgumentNullException(nameof(componentRepository));
        this.componentTemplateRepository = componentTemplateRepository ?? throw new ArgumentNullException(nameof(componentTemplateRepository));
        this.azureSessionService         = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
        this.azureResourceService        = azureResourceService ?? throw new ArgumentNullException(nameof(azureResourceService));
        this.graphService  = graphService ?? throw new ArgumentNullException(nameof(graphService));
        this.functionsHost = functionsHost ?? FunctionsHost.Default;
    }
Beispiel #2
0
 public AdapterAuthenticationHandler(IOptionsMonitor <CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, OneTimeTokenService oneTimeTokenService, IAzureSessionService azureSessionService, IUserRepository userRepository, IDeploymentScopeRepository deploymentScopeRepository, IAdapterProvider adapterProvider) : base(options, logger, encoder, clock)
 {
     this.oneTimeTokenService       = oneTimeTokenService ?? throw new System.ArgumentNullException(nameof(oneTimeTokenService));
     this.azureSessionService       = azureSessionService ?? throw new System.ArgumentNullException(nameof(azureSessionService));
     this.userRepository            = userRepository ?? throw new System.ArgumentNullException(nameof(userRepository));
     this.deploymentScopeRepository = deploymentScopeRepository ?? throw new System.ArgumentNullException(nameof(deploymentScopeRepository));
     this.adapterProvider           = adapterProvider ?? throw new System.ArgumentNullException(nameof(adapterProvider));
 }
Beispiel #3
0
 public ProjectDeployActivity(IOrganizationRepository organizationRepository, IProjectRepository projectRepository, IDeploymentScopeRepository deploymentScopeRepository, IAzureDeploymentService azureDeploymentService, IAzureSessionService azureSessionService)
 {
     this.organizationRepository    = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
     this.projectRepository         = projectRepository ?? throw new ArgumentNullException(nameof(projectRepository));
     this.deploymentScopeRepository = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
     this.azureDeploymentService    = azureDeploymentService ?? throw new ArgumentNullException(nameof(azureDeploymentService));
     this.azureSessionService       = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
 }
 public DeploymentScopesController(IDeploymentScopeRepository deploymentScopeRepository,
                                   IComponentRepository componentRepository,
                                   IAdapterProvider adapterProvider,
                                   IValidatorProvider validatorProvider) : base(validatorProvider)
 {
     this.deploymentScopeRepository = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
     this.componentRepository       = componentRepository ?? throw new ArgumentNullException(nameof(componentRepository));
     this.adapterProvider           = adapterProvider ?? throw new ArgumentNullException(nameof(adapterProvider));
 }
Beispiel #5
0
 public AdapterUpdateComponentActivity(
     IComponentRepository componentRepository,
     IDeploymentScopeRepository deploymentScopeRepository,
     IAdapterProvider adapterProvider)
 {
     this.componentRepository = componentRepository ?? throw new ArgumentNullException(nameof(componentRepository));
     this.deploymentScopeRepository = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
     this.adapterProvider = adapterProvider ?? throw new ArgumentNullException(nameof(adapterProvider));
 }
Beispiel #6
0
 public DeploymentScopeCreateCommandHandler(
     IDeploymentScopeRepository deploymentScopeRepository,
     IUserRepository userRepository,
     IAdapterProvider adapterProvider)
 {
     this.deploymentScopeRepository = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
     this.userRepository            = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
     this.adapterProvider           = adapterProvider ?? throw new ArgumentNullException(nameof(adapterProvider));
 }
Beispiel #7
0
 public CommandTrigger(ICommandHandler[] commandHandlers,
                       IHttpContextAccessor httpContextAccessor,
                       ICommandAuditWriter commandAuditWriter,
                       IDeploymentScopeRepository deploymentScopeRepository,
                       IValidatorProvider validatorProvider)
 {
     this.commandHandlers           = commandHandlers ?? throw new ArgumentNullException(nameof(commandHandlers));
     this.httpContextAccessor       = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor));
     this.commandAuditWriter        = commandAuditWriter ?? throw new ArgumentNullException(nameof(commandAuditWriter));
     this.deploymentScopeRepository = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
     this.validatorProvider         = validatorProvider ?? throw new ArgumentNullException(nameof(validatorProvider));
 }
#pragma warning disable CS0618 // Type or member is obsolete

    // IDistributedLockManager is marked as obsolete, because it's not ready for "prime time"
    // however; it is used to managed singleton function execution within the functions fx !!!

    public KubernetesAdapter(IAuthorizationSessionClient sessionClient,
                             IAuthorizationTokenClient tokenClient,
                             IDistributedLockManager distributedLockManager,
                             ISecretsStoreProvider secretsStoreProvider,
                             IAzureSessionService azureSessionService,
                             IAzureResourceService azureResourceService,
                             IGraphService graphService,
                             IOrganizationRepository organizationRepository,
                             IDeploymentScopeRepository deploymentScopeRepository,
                             IProjectRepository projectRepository,
                             IUserRepository userRepository)
        : base(sessionClient, tokenClient, distributedLockManager, secretsStoreProvider, azureSessionService, graphService, organizationRepository, deploymentScopeRepository, projectRepository, userRepository)
    {
        this.azureResourceService = azureResourceService ?? throw new ArgumentNullException(nameof(azureResourceService));
    }
#pragma warning disable CS0618 // Type or member is obsolete

    protected AdapterWithIdentity(IAuthorizationSessionClient sessionClient,
                                  IAuthorizationTokenClient tokenClient,
                                  IDistributedLockManager distributedLockManager,
                                  ISecretsStoreProvider secretsStoreProvider,
                                  IAzureSessionService azureSessionService,
                                  IGraphService graphService,
                                  IOrganizationRepository organizationRepository,
                                  IDeploymentScopeRepository deploymentScopeRepository,
                                  IProjectRepository projectRepository,
                                  IUserRepository userRepository) : base(sessionClient, tokenClient, distributedLockManager, secretsStoreProvider, azureSessionService, graphService, organizationRepository, deploymentScopeRepository, projectRepository, userRepository)
    {
        this.secretsStoreProvider   = secretsStoreProvider ?? throw new ArgumentNullException(nameof(secretsStoreProvider));
        this.azureSessionService    = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
        this.graphService           = graphService ?? throw new ArgumentNullException(nameof(graphService));
        this.organizationRepository = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
        this.projectRepository      = projectRepository ?? throw new ArgumentNullException(nameof(projectRepository));
    }
 public ComponentTaskRunnerActivity(IOrganizationRepository organizationRepository,
                                    IDeploymentScopeRepository deploymentScopeRepository,
                                    IProjectRepository projectRepository,
                                    IComponentRepository componentRepository,
                                    IComponentTemplateRepository componentTemplateRepository,
                                    IComponentTaskRepository componentTaskRepository,
                                    IAzureSessionService azureSessionService,
                                    IAzureResourceService azureResourceService,
                                    IAdapterProvider adapterProvider,
                                    IRunnerOptions runnerOptions)
 {
     this.organizationRepository      = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
     this.deploymentScopeRepository   = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
     this.projectRepository           = projectRepository ?? throw new ArgumentNullException(nameof(projectRepository));
     this.componentRepository         = componentRepository ?? throw new ArgumentNullException(nameof(componentRepository));
     this.componentTemplateRepository = componentTemplateRepository ?? throw new ArgumentNullException(nameof(componentTemplateRepository));
     this.componentTaskRepository     = componentTaskRepository ?? throw new ArgumentNullException(nameof(componentTaskRepository));
     this.azureSessionService         = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.azureResourceService        = azureResourceService ?? throw new ArgumentNullException(nameof(azureResourceService));
     this.adapterProvider             = adapterProvider ?? throw new ArgumentNullException(nameof(adapterProvider));
     this.runnerOptions = runnerOptions ?? throw new ArgumentNullException(nameof(runnerOptions));
 }
#pragma warning disable CS0618 // Type or member is obsolete

    // IDistributedLockManager is marked as obsolete, because it's not ready for "prime time"
    // however; it is used to managed singleton function execution within the functions fx !!!

    public AzureResourceManagerAdapter(IAuthorizationSessionClient sessionClient,
                                       IAuthorizationTokenClient tokenClient,
                                       IDistributedLockManager distributedLockManager,
                                       ISecretsStoreProvider secretsStoreProvider,
                                       IAzureSessionService azureSessionService,
                                       IGraphService graphService,
                                       IAzureResourceService azureResourceService,
                                       IOrganizationRepository organizationRepository,
                                       IUserRepository userRepository,
                                       IDeploymentScopeRepository deploymentScopeRepository,
                                       IProjectRepository projectRepository,
                                       IComponentRepository componentRepository,
                                       IComponentTemplateRepository componentTemplateRepository)
        : base(sessionClient, tokenClient, distributedLockManager, secretsStoreProvider, azureSessionService, graphService, organizationRepository, deploymentScopeRepository, projectRepository, userRepository)
    {
        this.azureSessionService         = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
        this.azureResourceService        = azureResourceService ?? throw new ArgumentNullException(nameof(azureResourceService));
        this.organizationRepository      = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
        this.userRepository              = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
        this.deploymentScopeRepository   = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
        this.projectRepository           = projectRepository ?? throw new ArgumentNullException(nameof(projectRepository));
        this.componentRepository         = componentRepository ?? throw new ArgumentNullException(nameof(componentRepository));
        this.componentTemplateRepository = componentTemplateRepository ?? throw new ArgumentNullException(nameof(componentTemplateRepository));
    }
 public DeploymentScopeGetActivity(IDeploymentScopeRepository deploymentScopeRepository)
 {
     this.deploymentScopeRepository = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
 }
Beispiel #13
0
 public DeploymentScopeUpdateCommandHandler(IDeploymentScopeRepository deploymentScopeRepository)
 {
     this.deploymentScopeRepository = deploymentScopeRepository ?? throw new ArgumentNullException(nameof(deploymentScopeRepository));
 }