コード例 #1
0
ファイル: GitHubAdapter.cs プロジェクト: microsoft/TeamCloud
#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;
    }
コード例 #2
0
 public OrganizationUserCommandHandler(IUserRepository userRepository, IOrganizationRepository organizationRepository, IAzureSessionService azureSessionService, TeamCloudEndpointOptions endpointOptions)
 {
     this.userRepository         = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
     this.organizationRepository = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
     this.azureSessionService    = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.endpointOptions        = endpointOptions ?? throw new ArgumentNullException(nameof(endpointOptions));
 }
コード例 #3
0
 public TeamCloudAdminInitializer(IAzureSessionService sessionService, IUsersRepository usersRepository, IWebHostEnvironment hostingEnvironment, Orchestrator orchestrator, ILoggerFactory loggerFactory)
 {
     this.sessionService     = sessionService ?? throw new ArgumentNullException(nameof(sessionService));
     this.usersRepository    = usersRepository ?? throw new ArgumentNullException(nameof(usersRepository));
     this.hostingEnvironment = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment));
     this.orchestrator       = orchestrator ?? throw new ArgumentNullException(nameof(orchestrator));
     this.loggerFactory      = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
 }
コード例 #4
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));
 }
コード例 #5
0
ファイル: SchedulePoller.cs プロジェクト: microsoft/TeamCloud
 public SchedulePoller(IOrganizationRepository organizationRepository, IProjectRepository projectRepository, IScheduleRepository scheduleRepository, IAzureSessionService azureSessionService, IUserRepository userRepository)
 {
     this.organizationRepository = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
     this.projectRepository      = projectRepository ?? throw new ArgumentNullException(nameof(projectRepository));
     this.scheduleRepository     = scheduleRepository ?? throw new ArgumentNullException(nameof(scheduleRepository));
     this.azureSessionService    = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.userRepository         = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
 }
コード例 #6
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));
 }
コード例 #7
0
 public ProjectUserCommandHandler(IOrganizationRepository organizationRepository, IProjectRepository projectRepository, IUserRepository userRepository, IComponentRepository componentRepository, IAzureSessionService azureSessionService, TeamCloudEndpointOptions endpointOptions)
 {
     this.organizationRepository = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
     this.projectRepository      = projectRepository ?? throw new ArgumentNullException(nameof(projectRepository));
     this.userRepository         = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
     this.componentRepository    = componentRepository ?? throw new ArgumentNullException(nameof(componentRepository));
     this.azureSessionService    = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.endpointOptions        = endpointOptions ?? throw new ArgumentNullException(nameof(endpointOptions));
 }
コード例 #8
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 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));
    }
コード例 #9
0
#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));
    }
コード例 #10
0
 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));
 }
コード例 #11
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 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));
    }
コード例 #12
0
 internal AzureDeployment(string resourceId, IAzureSessionService azureSessionService)
 {
     ResourceId = resourceId?.TrimEnd('/') ?? throw new ArgumentNullException(nameof(resourceId));
     this.azureSessionService = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
 }
コード例 #13
0
 public TeamCloudSystemUserActivity(IAzureSessionService azureSessionService)
 {
     this.azureSessionService = azureSessionService ?? throw new System.ArgumentNullException(nameof(azureSessionService));
 }
コード例 #14
0
 public OrganizationGetActivity(IAzureSessionService azureSessionService, IOrganizationRepository organizationRepository)
 {
     this.azureSessionService    = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.organizationRepository = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
 }
コード例 #15
0
 public ProviderRegisterActivity(IAzureSessionService azureSessionService)
 {
     this.azureSessionService = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
 }
コード例 #16
0
 public AzureResourceService(IAzureSessionService azureSessionService)
 {
     AzureSessionService = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
 }
コード例 #17
0
ファイル: EventTrigger.cs プロジェクト: jiaomy2016/TeamCloud
 public EventTrigger(IAzureSessionService azureSessionService, IProviderRepository providerRepository, IMemoryCache memoryCache)
 {
     this.azureSessionService = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.providerRepository  = providerRepository ?? throw new ArgumentNullException(nameof(providerRepository));
     this.memoryCache         = memoryCache ?? throw new ArgumentNullException(nameof(memoryCache));
 }
コード例 #18
0
 public AzureDirectoryService(IAzureSessionService azureSessionService)
 {
     this.azureSessionService = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
 }
コード例 #19
0
 public DevelopmentTokenProvider(IAzureSessionService azureSessionService, AzureEndpoint azureEndpoint)
 {
     this.azureSessionService = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.azureEndpoint       = azureEndpoint;
 }
コード例 #20
0
 public ProjectResourcesCreateActivity(IAzureDeploymentService azureDeploymentService, IAzureSessionService azureSessionService, ITeamCloudRepository teamCloudRepository)
 {
     this.azureDeploymentService = azureDeploymentService ?? throw new ArgumentNullException(nameof(azureDeploymentService));
     this.azureSessionService    = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.teamCloudRepository    = teamCloudRepository ?? throw new ArgumentNullException(nameof(teamCloudRepository));
 }
コード例 #21
0
 public DocumentNotificationSubscription(IAzureSessionService azureSessionService)
 {
     this.azureSessionService = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
 }
コード例 #22
0
 public AzureResourceGroupDeleteActivity(IAzureDeploymentService azureDeploymentService, IAzureSessionService azure)
 {
     this.azureDeploymentService = azureDeploymentService ?? throw new ArgumentNullException(nameof(azureDeploymentService));
     azureSessionService         = azure ?? throw new ArgumentNullException(nameof(azure));
 }
コード例 #23
0
 public AzureDeploymentService(IAzureDeploymentOptions azureDeploymentOptions, IAzureSessionService azureSessionService, IAzureDeploymentArtifactsProvider azureDeploymentArtifactsStorage)
 {
     this.azureDeploymentOptions          = azureDeploymentOptions ?? AzureDeploymentOptions.Default;
     this.azureSessionService             = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.azureDeploymentArtifactsStorage = azureDeploymentArtifactsStorage ?? throw new ArgumentNullException(nameof(azureDeploymentArtifactsStorage));
 }
コード例 #24
0
 public ProjectResourcesCreateActivity(IAzureDeploymentService azureDeploymentService, IAzureSessionService azureSessionService, IProviderRepository providersRepository)
 {
     this.azureDeploymentService = azureDeploymentService ?? throw new ArgumentNullException(nameof(azureDeploymentService));
     this.azureSessionService    = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.providersRepository    = providersRepository ?? throw new ArgumentNullException(nameof(providersRepository));
 }
コード例 #25
0
 public ProjectResourcesAccessActivity(IAzureSessionService azureSessionService, IAzureResourceService azureResourceService, IProjectsRepository projectsRepository)
 {
     this.azureSessionService  = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
     this.azureResourceService = azureResourceService ?? throw new ArgumentNullException(nameof(azureResourceService));
     this.projectsRepository   = projectsRepository ?? throw new ArgumentNullException(nameof(projectsRepository));
 }
コード例 #26
0
 public ComponentGuardActivity(IOrganizationRepository organizationRepository, IProjectRepository projectRepository, IAzureSessionService azureSessionService)
 {
     this.organizationRepository = organizationRepository ?? throw new ArgumentNullException(nameof(organizationRepository));
     this.projectRepository      = projectRepository ?? throw new ArgumentNullException(nameof(projectRepository));
     this.azureSessionService    = azureSessionService ?? throw new ArgumentNullException(nameof(azureSessionService));
 }