Example #1
0
        public ClusterBusiness(IClusterRepository clusterRepository, IDatacenterRepository datacenterRepository,
                               ISshKeyRepository sshKeyRepository, IClusterNodeRepository clusterNodeRepository,
                               IQueueService queueService, ITemplateRepository templateRepository,
                               IConfiguration configuration, IMetricRepository metricRepository, IMapper mapper, ITraefikRouterService traefikRouterService, IDomainRepository domainNameRepository)
        {
            if (clusterRepository == null)
            {
                throw new ArgumentNullException(nameof(clusterRepository));
            }
            if (datacenterRepository == null)
            {
                throw new ArgumentNullException(nameof(datacenterRepository));
            }
            if (sshKeyRepository == null)
            {
                throw new ArgumentNullException(nameof(sshKeyRepository));
            }
            if (clusterNodeRepository == null)
            {
                throw new ArgumentNullException(nameof(clusterNodeRepository));
            }
            if (queueService == null)
            {
                throw new ArgumentNullException(nameof(queueService));
            }
            if (templateRepository == null)
            {
                throw new ArgumentNullException(nameof(templateRepository));
            }
            if (traefikRouterService == null)
            {
                throw new ArgumentNullException(nameof(traefikRouterService));
            }
            if (metricRepository == null)
            {
                throw new ArgumentNullException(nameof(metricRepository));
            }
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            this.clusterRepository     = clusterRepository;
            this.datacenterRepository  = datacenterRepository;
            this.sshKeyRepository      = sshKeyRepository;
            this.clusterNodeRepository = clusterNodeRepository;
            this.queueService          = queueService;
            this.templateRepository    = templateRepository;
            this.domain               = configuration["Kubernox:Domain"];
            this.metricRepository     = metricRepository;
            this.mapper               = mapper;
            this.traefikRouterService = traefikRouterService;
            this.domainNameRepository = domainNameRepository;
        }
Example #2
0
        public DomainBusiness(IDomainRepository domainNameRepository, IMapper mapper, ILookupClient lookupClient, ITraefikRedisStore traefikCache, IClusterRepository clusterRepository, IClusterDomainRepository clusterDomainRepository, ITraefikRouterService traefikRouterService, ILogger <DomainBusiness> logger)
        {
            if (domainNameRepository == null)
            {
                throw new ArgumentNullException(nameof(domainNameRepository));
            }

            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            if (lookupClient == null)
            {
                throw new ArgumentNullException(nameof(lookupClient));
            }

            if (traefikCache == null)
            {
                throw new ArgumentNullException(nameof(traefikCache));
            }

            if (clusterRepository == null)
            {
                throw new ArgumentNullException(nameof(clusterRepository));
            }

            this.domainRepository        = domainNameRepository;
            this.mapper                  = mapper;
            this.lookupClient            = lookupClient;
            this.traefikCache            = traefikCache;
            this.clusterRepository       = clusterRepository;
            this.clusterDomainRepository = clusterDomainRepository;
            this.traefikRouterService    = traefikRouterService;
            this.logger                  = logger;
        }