Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="usersRepository">The users repository.</param>
 /// <param name="apiClient">The API client.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="subscriptionRepo">The subscription repo.</param>
 /// <param name="planRepository">The plan repository.</param>
 /// <param name="subscriptionUsageLogsRepository">The subscription usage logs repository.</param>
 /// <param name="dimensionsRepository">The dimensions repository.</param>
 /// <param name="subscriptionLogsRepo">The subscription logs repo.</param>
 /// <param name="applicationConfigRepository">The application configuration repository.</param>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="fulfillApiClient">The fulfill API client.</param>
 /// <param name="applicationLogRepository">The application log repository.</param>
 /// <param name="emailTemplateRepository">The email template repository.</param>
 /// <param name="planEventsMappingRepository">The plan events mapping repository.</param>
 /// <param name="eventsRepository">The events repository.</param>
 /// <param name="options">The options.</param>
 /// <param name="subscriptionTemplateParametersRepository">The subscription template parameters repository.</param>
 /// <param name="cloudConfigs">The cloud configs.</param>
 public HomeController(
     IUsersRepository usersRepository, IMeteredBillingApiClient apiClient, ILogger <HomeController> logger, ISubscriptionsRepository subscriptionRepo, IPlansRepository planRepository, ISubscriptionUsageLogsRepository subscriptionUsageLogsRepository, IMeteredDimensionsRepository dimensionsRepository, ISubscriptionLogRepository subscriptionLogsRepo, IApplicationConfigRepository applicationConfigRepository, IUsersRepository userRepository, IFulfillmentApiClient fulfillApiClient, IApplicationLogRepository applicationLogRepository, IEmailTemplateRepository emailTemplateRepository, IPlanEventsMappingRepository planEventsMappingRepository, IEventsRepository eventsRepository, IOptions <SaaSApiClientConfiguration> options, CloudStorageConfigs cloudConfigs)
 {
     this.apiClient                       = apiClient;
     this.subscriptionRepo                = subscriptionRepo;
     this.subscriptionLogRepository       = subscriptionLogsRepo;
     this.planRepository                  = planRepository;
     this.subscriptionUsageLogsRepository = subscriptionUsageLogsRepository;
     this.dimensionsRepository            = dimensionsRepository;
     this.logger = logger;
     this.applicationConfigRepository = applicationConfigRepository;
     this.usersRepository             = usersRepository;
     this.userRepository              = userRepository;
     this.userService                 = new UserService(userRepository);
     this.fulfillApiClient            = fulfillApiClient;
     this.applicationLogRepository    = applicationLogRepository;
     this.applicationLogService       = new ApplicationLogService(this.applicationLogRepository);
     this.applicationConfigRepository = applicationConfigRepository;
     this.subscriptionRepository      = this.subscriptionRepo;
     this.subscriptionService         = new SubscriptionService(this.subscriptionRepository, this.planRepository);
     this.emailTemplateRepository     = emailTemplateRepository;
     this.planEventsMappingRepository = planEventsMappingRepository;
     this.eventsRepository            = eventsRepository;
     this.options             = options;
     this.cloudConfigs        = cloudConfigs;
     this.azureWebJobsStorage = cloudConfigs.AzureWebJobsStorage;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WebHookHandler" /> class.
 /// </summary>
 /// <param name="applicationLogRepository">The application log repository.</param>
 /// <param name="subscriptionsLogRepository">The subscriptions log repository.</param>
 /// <param name="subscriptionsRepository">The subscriptions repository.</param>
 /// <param name="planRepository">The plan repository.</param>
 /// <param name="offersAttributeRepository">The offers attribute repository.</param>
 /// <param name="offersRepository">The offers repository.</param>
 /// <param name="fulfillApiClient">The fulfill API client.</param>
 /// <param name="usersRepository">The users repository.</param>
 /// <param name="loggerFactory">The logger factory.</param>
 /// <param name="emailService">The email service.</param>
 /// <param name="eventsRepository">The events repository.</param>
 /// <param name="applicationConfigRepository">The application configuration repository.</param>
 /// <param name="emailTemplateRepository">The email template repository.</param>
 /// <param name="planEventsMappingRepository">The plan events mapping repository.</param>
 public WebHookHandler(IApplicationLogRepository applicationLogRepository, ISubscriptionLogRepository subscriptionsLogRepository, ISubscriptionsRepository subscriptionsRepository, IPlansRepository planRepository, IOfferAttributesRepository offersAttributeRepository, IOffersRepository offersRepository, IFulfillmentApiClient fulfillApiClient, IUsersRepository usersRepository, ILoggerFactory loggerFactory, IEmailService emailService, IEventsRepository eventsRepository, IApplicationConfigRepository applicationConfigRepository, IEmailTemplateRepository emailTemplateRepository, IPlanEventsMappingRepository planEventsMappingRepository)
 {
     this.applicationLogRepository   = applicationLogRepository;
     this.subscriptionsRepository    = subscriptionsRepository;
     this.planRepository             = planRepository;
     this.subscriptionsLogRepository = subscriptionsLogRepository;
     this.applicationLogService      = new ApplicationLogService(this.applicationLogRepository);
     this.subscriptionService        = new SubscriptionService(this.subscriptionsRepository, this.planRepository);
     this.emailService                = emailService;
     this.loggerFactory               = loggerFactory;
     this.usersRepository             = usersRepository;
     this.eventsRepository            = eventsRepository;
     this.offersAttributeRepository   = offersAttributeRepository;
     this.fulfillApiClient            = fulfillApiClient;
     this.applicationConfigRepository = applicationConfigRepository;
     this.emailTemplateRepository     = emailTemplateRepository;
     this.planEventsMappingRepository = planEventsMappingRepository;
     this.offersRepository            = offersRepository;
     this.notificationStatusHandlers  = new NotificationStatusHandler(
         fulfillApiClient,
         planRepository,
         applicationConfigRepository,
         emailTemplateRepository,
         planEventsMappingRepository,
         offersAttributeRepository,
         eventsRepository,
         subscriptionsRepository,
         usersRepository,
         offersRepository,
         emailService,
         this.loggerFactory.CreateLogger <NotificationStatusHandler>());
 }
Beispiel #3
0
        public ReceivePartModified()
        {
            StandardKernel Kernal = new StandardKernel();

            Kernal.Load(Assembly.GetExecutingAssembly());
            _serviceSettings         = Kernal.Get <SettingRepository>();
            _serviceTaskMgrJob       = Kernal.Get <TaskMgrJobsRepository>();
            _serviceTaskMgrXml       = Kernal.Get <TaskMgrXmlRepository>();
            _serviceJobWorkFlow      = Kernal.Get <JobWorkflowRepository>();
            _serviceIncomingData     = Kernal.Get <IncomingDataRepository>();
            _serviceJobStackErrorLog = Kernal.Get <JobStackErrorLogRepository>();
            _serviceTransactionLog   = Kernal.Get <TransactionLogRepository>();
            _serviceInbox            = Kernal.Get <InboxRepository>();
            _servicePipeline         = Kernal.Get <PipelineRepository>();
            _serviceDataset          = Kernal.Get <metadataDatasetRepository>();
            _serviceNomStatus        = Kernal.Get <NominationStatusRepository>();
            _applicationLogs         = Kernal.Get <ApplicationLogRepository>();
            _serviceBatch            = Kernal.Get <BatchRepository>();
            _serviceNomination       = Kernal.Get <NominationsRepository>();
            _serviceMetadatCycle     = Kernal.Get <metadataCycleRepository>();
            unitOfWork                   = Kernal.Get <UnitOfWork>();
            modalFactory                 = Kernal.Get <ModalFactory>();
            _serviceShipperCompany       = Kernal.Get <ShipperCompanyRepository>();
            _serviceFileSysIncomingData  = Kernal.Get <FileSysIncomingDataRepository>();
            _serviceSqtsOpPerTransaction = Kernal.Get <SQTSOPPerTransactionRepository>();
            #region get nmqr services
            _serviceNmqrPerTransaction = Kernal.Get <NMQRPerTransactionRepository>();
            #endregion
            #region get sqts service
            _serviceSqtsTrackOnNom     = Kernal.Get <SQTSTrackOnNomRepository>();
            _serviceSqtsFile           = Kernal.Get <SQTSFileRepository>();
            _serviceSqtsPerTransaction = Kernal.Get <SQTSPerTransactionRepository>();
            #endregion
            #region get email service
            emailTempalteService = Kernal.Get <EmailTemplateRepository>();
            emailQueueService    = Kernal.Get <EmailQueueRepository>();
            appLogService        = Kernal.Get <ApplicationLogRepository>();
            #endregion

            var         path         = Path.Combine(HostingEnvironment.MapPath("~/App_Data"), "SQTSReductionReasons.xml");
            FileInfo    fileInfo     = new FileInfo(path);
            XmlDocument xmlRedReason = new XmlDocument();

            if (System.IO.File.Exists(path) && !IsFileLocked(fileInfo))
            {
                try
                {
                    xmlRedReason.Load(path);
                    var redResonNode = xmlRedReason.GetElementsByTagName("Reason");
                    if (redResonNode != null)
                    {
                        redReasonList = redResonNode.Cast <XmlNode>();
                    }
                }
                catch (Exception ex)
                {
                }
            }
        }
Beispiel #4
0
 public Email(IEmailTemplateRepository serviceEmailTemplate,
              IEmailQueueRepository serviceEmailQueue,
              IApplicationLogRepository serviceAppLog)
 {
     this._serviceAppLog        = serviceAppLog;
     this._serviceEmailQueue    = serviceEmailQueue;
     this._serviceEmailTemplate = serviceEmailTemplate;
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebHookHandler"/> class.
 /// </summary>
 /// <param name="applicationLogRepository">The application log repository.</param>
 /// <param name="subscriptionsLogRepository">The subscriptions log repository.</param>
 /// <param name="subscriptionsRepository">The subscriptions repository.</param>
 /// <param name="planRepository">The plan repository.</param>
 public WebHookHandler(IApplicationLogRepository applicationLogRepository, ISubscriptionLogRepository subscriptionsLogRepository, ISubscriptionsRepository subscriptionsRepository, IPlansRepository planRepository)
 {
     ApplicationLogRepository   = applicationLogRepository;
     SubscriptionsRepository    = subscriptionsRepository;
     PlanRepository             = planRepository;
     SubscriptionsLogRepository = subscriptionsLogRepository;
     applicationLogService      = new ApplicationLogService(ApplicationLogRepository);
     subscriptionService        = new SubscriptionService(SubscriptionsRepository, PlanRepository);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AzureWebhookController"/> class.
 /// </summary>
 /// <param name="applicationLogRepository">The application log repository.</param>
 /// <param name="webhookProcessor">The Web hook log repository.</param>
 /// <param name="subscriptionsLogRepository">The subscriptions log repository.</param>
 /// <param name="planRepository">The plan repository.</param>
 /// <param name="subscriptionsRepository">The subscriptions repository.</param>
 public AzureWebhookController(IApplicationLogRepository applicationLogRepository, IWebhookProcessor webhookProcessor, ISubscriptionLogRepository subscriptionsLogRepository, IPlansRepository planRepository, ISubscriptionsRepository subscriptionsRepository)
 {
     this.applicationLogRepository   = applicationLogRepository;
     this.subscriptionsRepository    = subscriptionsRepository;
     this.planRepository             = planRepository;
     this.subscriptionsLogRepository = subscriptionsLogRepository;
     this.webhookProcessor           = webhookProcessor;
     this.applicationLogService      = new ApplicationLogService(this.applicationLogRepository);
     this.subscriptionService        = new SubscriptionService(this.subscriptionsRepository, this.planRepository);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WebHookHandler" /> class.
 /// </summary>
 /// <param name="applicationLogRepository">The application log repository.</param>
 /// <param name="subscriptionsLogRepository">The subscriptions log repository.</param>
 /// <param name="subscriptionsRepository">The subscriptions repository.</param>
 /// <param name="planRepository">The plan repository.</param>
 /// <param name="cloudConfigs">The cloud configs.</param>
 public WebHookHandler(IApplicationLogRepository applicationLogRepository, ISubscriptionLogRepository subscriptionsLogRepository, ISubscriptionsRepository subscriptionsRepository, IPlansRepository planRepository, CloudStorageConfigs cloudConfigs)
 {
     this.applicationLogRepository   = applicationLogRepository;
     this.subscriptionsRepository    = subscriptionsRepository;
     this.planRepository             = planRepository;
     this.subscriptionsLogRepository = subscriptionsLogRepository;
     this.applicationLogService      = new ApplicationLogService(this.applicationLogRepository);
     this.subscriptionService        = new SubscriptionService(this.subscriptionsRepository, this.planRepository);
     this.cloudConfigs        = cloudConfigs;
     this.azureWebJobsStorage = cloudConfigs.AzureWebJobsStorage;
 }
Beispiel #8
0
        public bool Save(string methodName, string logData, CategoryType categoryType)
        {
            IApplicationLogRepository repository = IocFactory.Resolve <IApplicationLogRepository>();

            ApplicationLogEntity entity = new ApplicationLogEntity();

            entity.CategoryTypeId = (short)categoryType;
            entity.LogData        = logData;
            entity.MethodName     = methodName;

            return(repository.Insert(entity));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="apiClient">The API Client<see cref="IFulfilmentApiClient" /></param>
 /// <param name="subscriptionRepo">The subscription repository.</param>
 /// <param name="planRepository">The plan repository.</param>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="applicationLogRepository">The application log repository.</param>
 /// <param name="subscriptionLogsRepo">The subscription logs repository.</param>
 public HomeController(IFulfillmentApiClient apiClient, ISubscriptionsRepository subscriptionRepo, IPlansRepository planRepository, IUsersRepository userRepository, IApplicationLogRepository applicationLogRepository, ISubscriptionLogRepository subscriptionLogsRepo)
 {
     this.apiClient = apiClient;
     this.subscriptionRepository    = subscriptionRepo;
     this.subscriptionLogRepository = subscriptionLogsRepo;
     this.applicationLogRepository  = applicationLogRepository;
     this.planRepository            = planRepository;
     this.userRepository            = userRepository;
     this.userService           = new UserService(this.userRepository);
     this.subscriptionService   = new SubscriptionService(this.subscriptionRepository, this.planRepository);
     this.applicationLogService = new ApplicationLogService(this.applicationLogRepository);
 }
Beispiel #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HomeController" /> class.
        /// </summary>
        /// <param name="apiClient">The API Client<see cref="IFulfilmentApiClient" /></param>
        /// <param name="subscriptionRepo">The subscription repository.</param>
        /// <param name="planRepository">The plan repository.</param>
        /// <param name="userRepository">The user repository.</param>
        /// <param name="applicationLogRepository">The application log repository.</param>
        /// <param name="subscriptionLogsRepo">The subscription logs repository.</param>
        public HomeController(ILogger <HomeController> logger, IFulfillmentApiClient apiClient, ISubscriptionsRepository subscriptionRepo, IPlansRepository planRepository, IUsersRepository userRepository, IApplicationLogRepository applicationLogRepository, ISubscriptionLogRepository subscriptionLogsRepo, IApplicationConfigRepository applicationConfigRepository, IEmailTemplateRepository emailTemplateRepository)
        {
            this.apiClient = apiClient;
            this.subscriptionRepository    = subscriptionRepo;
            this.subscriptionLogRepository = subscriptionLogsRepo;
            this.applicationLogRepository  = applicationLogRepository;
            this.planRepository            = planRepository;
            this.userRepository            = userRepository;
            this.userService                 = new UserService(this.userRepository);
            this.subscriptionService         = new SubscriptionService(this.subscriptionRepository, this.planRepository);
            this.applicationLogService       = new ApplicationLogService(this.applicationLogRepository);
            this.applicationConfigRepository = applicationConfigRepository;
            this.emailTemplateRepository     = emailTemplateRepository;

            this.logger = logger;
        }
Beispiel #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="apiClient">The API Client<see cref="IFulfilmentApiClient" />.</param>
 /// <param name="subscriptionRepo">The subscription repository.</param>
 /// <param name="planRepository">The plan repository.</param>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="applicationLogRepository">The application log repository.</param>
 /// <param name="subscriptionLogsRepo">The subscription logs repository.</param>
 /// <param name="applicationConfigRepository">The application configuration repository.</param>
 /// <param name="emailTemplateRepository">The email template repository.</param>
 /// <param name="offersRepository">The offers repository.</param>
 /// <param name="planEventsMappingRepository">The plan events mapping repository.</param>
 /// <param name="offerAttributesRepository">The offer attributes repository.</param>
 /// <param name="eventsRepository">The events repository.</param>
 /// <param name="cloudConfigs">The cloud configs.</param>
 public HomeController(ILogger <HomeController> logger, IFulfillmentApiClient apiClient, ISubscriptionsRepository subscriptionRepo, IPlansRepository planRepository, IUsersRepository userRepository, IApplicationLogRepository applicationLogRepository, ISubscriptionLogRepository subscriptionLogsRepo, IApplicationConfigRepository applicationConfigRepository, IEmailTemplateRepository emailTemplateRepository, IOffersRepository offersRepository, IPlanEventsMappingRepository planEventsMappingRepository, IOfferAttributesRepository offerAttributesRepository, IEventsRepository eventsRepository, CloudStorageConfigs cloudConfigs)
 {
     this.apiClient = apiClient;
     this.subscriptionRepository    = subscriptionRepo;
     this.subscriptionLogRepository = subscriptionLogsRepo;
     this.applicationLogRepository  = applicationLogRepository;
     this.planRepository            = planRepository;
     this.userRepository            = userRepository;
     this.userService                 = new UserService(this.userRepository);
     this.subscriptionService         = new SubscriptionService(this.subscriptionRepository, this.planRepository);
     this.applicationLogService       = new ApplicationLogService(this.applicationLogRepository);
     this.applicationConfigRepository = applicationConfigRepository;
     this.emailTemplateRepository     = emailTemplateRepository;
     this.planEventsMappingRepository = planEventsMappingRepository;
     this.offerAttributesRepository   = offerAttributesRepository;
     this.logger              = logger;
     this.offersRepository    = offersRepository;
     this.planService         = new PlanService(this.planRepository, this.offerAttributesRepository, this.offersRepository);
     this.eventsRepository    = eventsRepository;
     this.cloudConfigs        = cloudConfigs;
     this.azureWebJobsStorage = cloudConfigs.AzureWebJobsStorage;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="UsersRepository">The users repository.</param>
 /// <param name="apiClient">The API client.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="SubscriptionRepo">The subscription repo.</param>
 /// <param name="PlanRepository">The plan repository.</param>
 /// <param name="SubscriptionUsageLogsRepository">The subscription usage logs repository.</param>
 public HomeController(IUsersRepository UsersRepository, IMeteredBillingApiClient apiClient, ILogger <HomeController> logger, ISubscriptionsRepository SubscriptionRepo,
                       IPlansRepository PlanRepository, ISubscriptionUsageLogsRepository SubscriptionUsageLogsRepository,
                       IMeteredDimensionsRepository DimensionsRepository, ISubscriptionLogRepository subscriptionLogsRepo, IApplicationConfigRepository applicationConfigRepository, IUsersRepository userRepository, IFulfillmentApiClient fulfillApiClient, IApplicationLogRepository applicationLogRepository, IEmailTemplateRepository emailTemplateRepository)
 {
     this.apiClient   = apiClient;
     subscriptionRepo = SubscriptionRepo;
     this.subscriptionLogRepository = subscriptionLogsRepo;
     planRepository = PlanRepository;
     subscriptionUsageLogsRepository = SubscriptionUsageLogsRepository;
     dimensionsRepository            = DimensionsRepository;
     this.logger = logger;
     this.applicationConfigRepository = applicationConfigRepository;
     usersRepository                  = UsersRepository;
     this.userRepository              = userRepository;
     this.userService                 = new UserService(userRepository);
     this.fulfillApiClient            = fulfillApiClient;
     webSubscriptionService           = new WebSubscriptionService(this.subscriptionRepo, this.planRepository);
     this.applicationLogRepository    = applicationLogRepository;
     this.applicationLogService       = new ApplicationLogService(this.applicationLogRepository);
     this.applicationConfigRepository = applicationConfigRepository;
     this.subscriptionRepository      = subscriptionRepo;
     this.subscriptionService         = new SubscriptionService(this.subscriptionRepository, this.planRepository);
     this.emailTemplateRepository     = emailTemplateRepository;
 }
Beispiel #13
0
 public ApplicationLogService(IApplicationLogRepository repository)
 {
     this.repository = repository;
 }
Beispiel #14
0
 public ApplicationLogService(IApplicationLogRepository ApplicationLogRepository)
 {
     this.ApplicationLogRepository = ApplicationLogRepository;
 }
Beispiel #15
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HomeController" /> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="apiClient">The API Client<see cref="IFulfilmentApiClient" />.</param>
        /// <param name="subscriptionRepo">The subscription repository.</param>
        /// <param name="planRepository">The plan repository.</param>
        /// <param name="userRepository">The user repository.</param>
        /// <param name="applicationLogRepository">The application log repository.</param>
        /// <param name="subscriptionLogsRepo">The subscription logs repository.</param>
        /// <param name="applicationConfigRepository">The application configuration repository.</param>
        /// <param name="emailTemplateRepository">The email template repository.</param>
        /// <param name="offersRepository">The offers repository.</param>
        /// <param name="planEventsMappingRepository">The plan events mapping repository.</param>
        /// <param name="offerAttributesRepository">The offer attributes repository.</param>
        /// <param name="eventsRepository">The events repository.</param>
        /// <param name="cloudConfigs">The cloud configs.</param>
        /// <param name="loggerFactory">The logger factory.</param>
        /// <param name="emailService">The email service.</param>
        public HomeController(ILogger <HomeController> logger, IFulfillmentApiClient apiClient, ISubscriptionsRepository subscriptionRepo, IPlansRepository planRepository, IUsersRepository userRepository, IApplicationLogRepository applicationLogRepository, ISubscriptionLogRepository subscriptionLogsRepo, IApplicationConfigRepository applicationConfigRepository, IEmailTemplateRepository emailTemplateRepository, IOffersRepository offersRepository, IPlanEventsMappingRepository planEventsMappingRepository, IOfferAttributesRepository offerAttributesRepository, IEventsRepository eventsRepository, ILoggerFactory loggerFactory, IEmailService emailService)
        {
            this.apiClient = apiClient;
            this.subscriptionRepository    = subscriptionRepo;
            this.subscriptionLogRepository = subscriptionLogsRepo;
            this.applicationLogRepository  = applicationLogRepository;
            this.planRepository            = planRepository;
            this.userRepository            = userRepository;
            this.userService                 = new UserService(this.userRepository);
            this.subscriptionService         = new SubscriptionService(this.subscriptionRepository, this.planRepository);
            this.applicationLogService       = new ApplicationLogService(this.applicationLogRepository);
            this.applicationConfigRepository = applicationConfigRepository;
            this.emailTemplateRepository     = emailTemplateRepository;
            this.planEventsMappingRepository = planEventsMappingRepository;
            this.offerAttributesRepository   = offerAttributesRepository;
            this.logger           = logger;
            this.offersRepository = offersRepository;
            this.planService      = new PlanService(this.planRepository, this.offerAttributesRepository, this.offersRepository);
            this.eventsRepository = eventsRepository;
            this.emailService     = emailService;
            this.loggerFactory    = loggerFactory;

            this.pendingActivationStatusHandlers = new PendingActivationStatusHandler(
                apiClient,
                subscriptionRepo,
                subscriptionLogsRepo,
                planRepository,
                userRepository,
                loggerFactory.CreateLogger <PendingActivationStatusHandler>());

            this.pendingFulfillmentStatusHandlers = new PendingFulfillmentStatusHandler(
                apiClient,
                applicationConfigRepository,
                subscriptionRepo,
                subscriptionLogsRepo,
                planRepository,
                userRepository,
                this.loggerFactory.CreateLogger <PendingFulfillmentStatusHandler>());

            this.notificationStatusHandlers = new NotificationStatusHandler(
                apiClient,
                planRepository,
                applicationConfigRepository,
                emailTemplateRepository,
                planEventsMappingRepository,
                offerAttributesRepository,
                eventsRepository,
                subscriptionRepo,
                userRepository,
                offersRepository,
                emailService,
                this.loggerFactory.CreateLogger <NotificationStatusHandler>());

            this.unsubscribeStatusHandlers = new UnsubscribeStatusHandler(
                apiClient,
                subscriptionRepo,
                subscriptionLogsRepo,
                planRepository,
                userRepository,
                this.loggerFactory.CreateLogger <UnsubscribeStatusHandler>());
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="HomeController" /> class.
        /// </summary>
        /// <param name="usersRepository">The users repository.</param>
        /// <param name="billingApiService">The billing API service.</param>
        /// <param name="logger">The logger.</param>
        /// <param name="subscriptionRepo">The subscription repo.</param>
        /// <param name="planRepository">The plan repository.</param>
        /// <param name="subscriptionUsageLogsRepository">The subscription usage logs repository.</param>
        /// <param name="dimensionsRepository">The dimensions repository.</param>
        /// <param name="subscriptionLogsRepo">The subscription logs repo.</param>
        /// <param name="applicationConfigRepository">The application configuration repository.</param>
        /// <param name="userRepository">The user repository.</param>
        /// <param name="fulfillApiService">The fulfill API client.</param>
        /// <param name="applicationLogRepository">The application log repository.</param>
        /// <param name="emailTemplateRepository">The email template repository.</param>
        /// <param name="planEventsMappingRepository">The plan events mapping repository.</param>
        /// <param name="eventsRepository">The events repository.</param>
        /// <param name="options">The options.</param>
        /// <param name="cloudConfigs">The cloud configs.</param>
        /// <param name="loggerFactory">The logger factory.</param>
        /// <param name="emailService">The email service.</param>
        /// <param name="offersRepository">The offers repository.</param>
        /// <param name="offersAttributeRepository">The offers attribute repository.</param>
        public HomeController(
            IUsersRepository usersRepository, IMeteredBillingApiService billingApiService, ILogger <HomeController> logger, ISubscriptionsRepository subscriptionRepo, IPlansRepository planRepository, ISubscriptionUsageLogsRepository subscriptionUsageLogsRepository, IMeteredDimensionsRepository dimensionsRepository, ISubscriptionLogRepository subscriptionLogsRepo, IApplicationConfigRepository applicationConfigRepository, IUsersRepository userRepository, IFulfillmentApiService fulfillApiService, IApplicationLogRepository applicationLogRepository, IEmailTemplateRepository emailTemplateRepository, IPlanEventsMappingRepository planEventsMappingRepository, IEventsRepository eventsRepository, IOptions <SaaSApiClientConfiguration> options, ILoggerFactory loggerFactory, IEmailService emailService, IOffersRepository offersRepository, IOfferAttributesRepository offersAttributeRepository)
        {
            this.billingApiService               = billingApiService;
            this.subscriptionRepo                = subscriptionRepo;
            this.subscriptionLogRepository       = subscriptionLogsRepo;
            this.planRepository                  = planRepository;
            this.subscriptionUsageLogsRepository = subscriptionUsageLogsRepository;
            this.dimensionsRepository            = dimensionsRepository;
            this.logger = logger;
            this.applicationConfigRepository = applicationConfigRepository;
            this.applicationConfigService    = new ApplicationConfigService(this.applicationConfigRepository);
            this.userRepository              = userRepository;
            this.userService                 = new UserService(userRepository);
            this.fulfillApiService           = fulfillApiService;
            this.applicationLogRepository    = applicationLogRepository;
            this.applicationLogService       = new ApplicationLogService(this.applicationLogRepository);
            this.subscriptionRepository      = this.subscriptionRepo;
            this.subscriptionService         = new SubscriptionService(this.subscriptionRepository, this.planRepository);
            this.emailTemplateRepository     = emailTemplateRepository;
            this.planEventsMappingRepository = planEventsMappingRepository;
            this.eventsRepository            = eventsRepository;
            this.emailService                = emailService;
            this.offersRepository            = offersRepository;
            this.offersAttributeRepository   = offersAttributeRepository;
            this.loggerFactory               = loggerFactory;

            this.pendingActivationStatusHandlers = new PendingActivationStatusHandler(
                fulfillApiService,
                subscriptionRepo,
                subscriptionLogsRepo,
                planRepository,
                userRepository,
                loggerFactory.CreateLogger <PendingActivationStatusHandler>());

            this.pendingFulfillmentStatusHandlers = new PendingFulfillmentStatusHandler(
                fulfillApiService,
                applicationConfigRepository,
                subscriptionRepo,
                subscriptionLogsRepo,
                planRepository,
                userRepository,
                this.loggerFactory.CreateLogger <PendingFulfillmentStatusHandler>());

            this.notificationStatusHandlers = new NotificationStatusHandler(
                fulfillApiService,
                planRepository,
                applicationConfigRepository,
                emailTemplateRepository,
                planEventsMappingRepository,
                offersAttributeRepository,
                eventsRepository,
                subscriptionRepo,
                userRepository,
                offersRepository,
                emailService,
                this.loggerFactory.CreateLogger <NotificationStatusHandler>());

            this.unsubscribeStatusHandlers = new UnsubscribeStatusHandler(
                fulfillApiService,
                subscriptionRepo,
                subscriptionLogsRepo,
                planRepository,
                userRepository,
                this.loggerFactory.CreateLogger <UnsubscribeStatusHandler>());
        }
Beispiel #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationLogService"/> class.
 /// </summary>
 /// <param name="applicationLogRepository">The application log repository.</param>
 public ApplicationLogService(IApplicationLogRepository applicationLogRepository)
 {
     this.applicationLogRepository = applicationLogRepository;
 }