Пример #1
0
 public LectureController(IUmbracoMapper mapper, ISubscriptionsService subscriptions, ILecturesService lectures, ICoursesContentService coursesContentService)
 {
     _mapper                = mapper;
     _subscriptions         = subscriptions;
     _lectures              = lectures;
     _coursesContentService = coursesContentService;
 }
Пример #2
0
 public BrokerService(IOptions <BrokerSettings> settings, ISubscriptionsService subscriptionsService, ILogger <BrokerService> logger)
 {
     this.settings             = settings.Value;
     this.subscriptionsService = subscriptionsService;
     this.logger = logger;
     this.statisticsDataSender = new DataSender <ItemModel>(this.settings.StatisticsUrl);
 }
 public SubscriptionsController(ISubscriptionsService subscriptions, ICoursesService courses, IUserService users, ICoursesContentService coursesContent)
 {
     _subscriptions  = subscriptions;
     _courses        = courses;
     _users          = users;
     _coursesContent = coursesContent;
 }
Пример #4
0
 public AccountService(IConfigurationWrapper configurationWrapper, ICommunicationService communicationService, IAuthenticationService authenticationService, ISubscriptionsService subscriptionService)
 {
     this._configurationWrapper = configurationWrapper;
     this._communicationService = communicationService;
     this._authenticationService = authenticationService;
     this._subscriptionsService = subscriptionService;
 }
 public EventsController(
     IEventsService eventsService,
     ISubscriptionsService subscriptionsService)
 {
     _eventsService        = eventsService;
     _subscriptionsService = subscriptionsService;
 }
 public ResellerController(IResellerService resellerservice, IRoleService Rs, IClientService Cs, ISubscriptionsService Ss)
 {
     this.ResellerService = resellerservice;
     this.RoleService     = Rs;
     this.ClientService   = Cs;
     this.SubService      = Ss;
 }
Пример #7
0
 public PersonnelRolesService(IPersonnelRolesRepository personnelRolesRepository, IPersonnelRoleUsersRepository personnelRoleUsersRepository,
                              ISubscriptionsService subscriptionsService, IDepartmentMembersRepository departmentMemberRepository)
 {
     _personnelRolesRepository     = personnelRolesRepository;
     _personnelRoleUsersRepository = personnelRoleUsersRepository;
     _subscriptionsService         = subscriptionsService;
     _departmentMemberRepository   = departmentMemberRepository;
 }
Пример #8
0
 public FeedbackController(IFeedbackService feedbackService, ICoursesContentService coursesContentService, IUmbracoMapper mapper, IUserService userService, ISubscriptionsService subscriptionsService)
 {
     _feedbackService       = feedbackService;
     _coursesContentService = coursesContentService;
     _mapper               = mapper;
     _userService          = userService;
     _subscriptionsService = subscriptionsService;
 }
Пример #9
0
 public ClientController(IActionService As, IClientService clientservice, IResellerService resellerservice, IRoleService Rs, ISubscriptionsService SS)
 {
     this.ActionService       = As;
     this.ClientService       = clientservice;
     this.ResellerService     = resellerservice;
     this.RoleService         = Rs;
     this.SubscriptionService = SS;
 }
Пример #10
0
 public PersonnelRolesService(IGenericDataRepository <PersonnelRole> personnelRolesRepository, IGenericDataRepository <PersonnelRoleUser> personnelRoleUsersRepository,
                              ISubscriptionsService subscriptionsService, IGenericDataRepository <DepartmentMember> departmentMemberRepository)
 {
     _personnelRolesRepository     = personnelRolesRepository;
     _personnelRoleUsersRepository = personnelRoleUsersRepository;
     _subscriptionsService         = subscriptionsService;
     _departmentMemberRepository   = departmentMemberRepository;
 }
Пример #11
0
 public UserService(ApplicationDbContext context, UserManager <AppUser> userManager,
                    IRoleService roleService, ISubscriptionsService subscriptionsService)
 {
     _context              = context;
     _userManager          = userManager;
     _roleService          = roleService;
     _subscriptionsService = subscriptionsService;
 }
Пример #12
0
 public CourseController(ICoursesService courses, IUmbracoMapper mapper, ISubscriptionsService subscriptions, ILecturesService lectures, IAssessmentsService assessmentsService)
 {
     _courses            = courses;
     _mapper             = mapper;
     _subscriptions      = subscriptions;
     _lectures           = lectures;
     _assessmentsService = assessmentsService;
 }
 public AccountController(IActionService As, IRoleService Rs, IClientService Cs, IResellerService ResellerServ, ISubscriptionsService SS)
 {
     ActionService        = As;
     roleService          = Rs;
     ClientService        = Cs;
     ResellerService      = ResellerServ;
     SubscriptionsService = SS;
 }
Пример #14
0
        public void TestRemoveSubscriptionNotValid()
        {
            subscriptionsService = GetSubscriptionsService(removeCode: HttpStatusCode.InternalServerError);
            var mainController = GetMainController();

            var result = mainController.RemoveSubscription(string.Empty, string.Empty).Result;

            Assert.IsTrue(result is BadRequestObjectResult);
        }
Пример #15
0
        public void TestGetSubscribedAuthorsNoService()
        {
            subscriptionsService = GetEmptySubscriptionsService();
            var mainController = GetMainController();

            var result = mainController.GetSubscribedAuthors(string.Empty).Result;

            Assert.IsTrue(result == null);
        }
Пример #16
0
 public DataSender(
     ICompanySubscriptionsService companySubscriptionsService,
     ISubscriptionsService subscriptionsService,
     IEmailSender emailSender)
 {
     this.subscriptionsService        = subscriptionsService;
     this.companySubscriptionsService = companySubscriptionsService;
     this.emailSender = emailSender;
 }
Пример #17
0
        public void TestInitialize()
        {
            var loggerMock = new Mock <ILogger <GatewayController> >();

            logger               = loggerMock.Object;
            accountsService      = GetAccountsService();
            newsService          = GetNewsService();
            subscriptionsService = GetSubscriptionsService();
        }
Пример #18
0
        public void TestRemoveSubscriptionNoService()
        {
            subscriptionsService = GetEmptySubscriptionsService();
            var mainController = GetMainController();

            var result = mainController.RemoveSubscription(string.Empty, string.Empty).Result;

            Assert.IsTrue(result is NotFoundObjectResult);
        }
Пример #19
0
        public void TestRemoveSubscriptionValid()
        {
            subscriptionsService = GetSubscriptionsService(removeCode: HttpStatusCode.OK);
            var mainController = GetMainController();

            var result = mainController.RemoveSubscription(string.Empty, string.Empty).Result;

            Assert.IsTrue(result is OkResult);
        }
Пример #20
0
 public ProfileController(IUserService usersService, ISubscriptionsService subscriptions, IMembershipService membershipService, ICoursesContentService coursesContentService, ICertificatesService certificatesService, IPaymentService paymentService, IOrdersService ordersService)
 {
     _usersService          = usersService;
     _subscriptions         = subscriptions;
     _membershipService     = membershipService;
     _coursesContentService = coursesContentService;
     _certificatesService   = certificatesService;
     _paymentService        = paymentService;
     _ordersService         = ordersService;
 }
Пример #21
0
        public void SetUp()
        {
            _ministryPlatformService = new Mock <MPInterfaces.IMinistryPlatformService>();
            _emailListHandler        = new Mock <Util.Interfaces.IEmailListHandler>();
            _apiUserService          = new Mock <IApiUserRepository>();

            _subscriptionService = new SubscriptionsService(_ministryPlatformService.Object, _emailListHandler.Object, _apiUserService.Object);

            _emailListHandler.Setup(m => m.AddListSubscriber(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>())).Returns(new OptInResponse());
        }
Пример #22
0
 public CourseService(ApplicationDbContext context, IUserService userService,
                      UserManager <AppUser> userManager, IPaymentService paymentService,
                      ITeacherService teacherService, ISubscriptionsService subscriptionsService)
 {
     _context              = context;
     _userService          = userService;
     _userManager          = userManager;
     _paymentService       = paymentService;
     _teacherService       = teacherService;
     _subscriptionsService = subscriptionsService;
 }
Пример #23
0
 public LessonsController(ILessonRepository lessonRepository, ICourseRepository courseRepository,
                          IMapper mapper, ILogger <LessonsController> logger, IUserRepository userRepository,
                          ISubscriptionsService subscriptionsService)
 {
     _lessonRepository     = lessonRepository ?? throw new ArgumentNullException(nameof(lessonRepository));
     _courseRepository     = courseRepository ?? throw new ArgumentNullException(nameof(courseRepository));
     _userRepository       = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
     _mapper               = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _logger               = logger ?? throw new ArgumentNullException(nameof(logger));
     _subscriptionsService = subscriptionsService ?? throw new ArgumentNullException(nameof(subscriptionsService));
 }
Пример #24
0
 public CoursesController(ICourseRepository courseRepository, IUserRepository userRepository,
                          ISubscriptionsService subscriptionsService, IMapper mapper, ILogger <CoursesController> logger,
                          IAdministrationService administrationService)
 {
     _courseRepository     = courseRepository;
     _userRepository       = userRepository;
     _subscriptionsService = subscriptionsService;
     _mapper = mapper;
     _logger = logger;
     _administrationService = administrationService;
 }
        public NotificationsManager(IConfiguration configuration,
                                    ISubscriptionsService subscriptionsService)
        {
            IConfigurationSection vapidConfiguration = configuration.GetSection("VAPID");
            string subject    = vapidConfiguration.GetSection("Subject").Value;
            string publicKey  = vapidConfiguration.GetSection("PublicKey").Value;
            string privateKey = vapidConfiguration.GetSection("PrivateKey").Value;

            vapidDetails              = new(subject, publicKey, privateKey);
            webPushClient             = new WebPushClient();
            this.subscriptionsService = subscriptionsService;
        }
Пример #26
0
 public GatewayController(ILogger <GatewayController> logger,
                          IAccountsService accountsService,
                          ISubscriptionsService subscriptionsService,
                          INewsService newsService,
                          IEventBus eventBus)
 {
     this.logger               = logger;
     this.accountsService      = accountsService;
     this.subscriptionsService = subscriptionsService;
     this.newsService          = newsService;
     this.eventBus             = eventBus;
 }
Пример #27
0
        public void TestGetSubscribedAuthors()
        {
            var authors = new List <string> {
                "author1", "author2"
            };

            subscriptionsService = GetSubscriptionsService(authors: authors);
            var mainController = GetMainController();

            var result = mainController.GetSubscribedAuthors(string.Empty).Result;

            Assert.AreEqual(result, authors);
        }
Пример #28
0
 public TeacherController(SignInManager <AppUser> signInManager,
                          ITeacherService teacherSecvice, IUserService userService,
                          ICourseService courseService, ISchoolService schoolService,
                          ISubscriptionsService subscriptionsService, IPaymentService paymentService)
 {
     _signInManager        = signInManager;
     _teacherSecvice       = teacherSecvice;
     _userService          = userService;
     _courseService        = courseService;
     _schoolService        = schoolService;
     _subscriptionsService = subscriptionsService;
     _paymentService       = paymentService;
 }
Пример #29
0
 public DepartmentRegistrationController(IDepartmentsService departmentsService, IUsersService usersService, IEmailService emailService,
                                         IInvitesService invitesService, IUserProfileService userProfileService, ISubscriptionsService subscriptionsService, IAffiliateService affiliateService,
                                         IEventAggregator eventAggregator, IEmailMarketingProvider emailMarketingProvider)
 {
     _departmentsService     = departmentsService;
     _usersService           = usersService;
     _emailService           = emailService;
     _invitesService         = invitesService;
     _userProfileService     = userProfileService;
     _subscriptionsService   = subscriptionsService;
     _affiliateService       = affiliateService;
     _eventAggregator        = eventAggregator;
     _emailMarketingProvider = emailMarketingProvider;
 }
Пример #30
0
 public DepartmentGroupsService(IDepartmentGroupsRepository departmentGroupsRepository, IDepartmentGroupMembersRepository departmentGroupMembersRepository,
                                ISubscriptionsService subscriptionsService, IAddressService addressService, IDepartmentsService departmentsService, IGeoLocationProvider geoLocationProvider,
                                IDepartmentSettingsService departmentSettingsService, IEventAggregator eventAggregator, ICacheProvider cacheProvider,
                                IIdentityRepository identityRepository)
 {
     _departmentGroupsRepository       = departmentGroupsRepository;
     _departmentGroupMembersRepository = departmentGroupMembersRepository;
     _subscriptionsService             = subscriptionsService;
     _addressService            = addressService;
     _departmentsService        = departmentsService;
     _geoLocationProvider       = geoLocationProvider;
     _departmentSettingsService = departmentSettingsService;
     _eventAggregator           = eventAggregator;
     _cacheProvider             = cacheProvider;
     _identityRepository        = identityRepository;
 }
Пример #31
0
        public SubscriptionsController(ISubscriptionsService subscriptionsService,
                                       IUserRepository userRepository, ILogger <SubscriptionsController> logger,
                                       IMapper mapper)
        {
            _subscriptionsService = subscriptionsService ??
                                    throw new ArgumentNullException(nameof(subscriptionsService));

            _userRepository = userRepository ??
                              throw new ArgumentNullException(nameof(userRepository));

            _logger = logger ??
                      throw new ArgumentNullException(nameof(logger));

            _mapper = mapper ??
                      throw new ArgumentNullException(nameof(mapper));
        }
 /// <summary>
 /// The SetVersionedServices method sets the subscription Service to the correct method from AnetApiVersionFilter
 /// </summary>
 /// <param name="services">The services parameter</param>        
 public override void SetVersionedServices(Dictionary<Type, object> services)
 {
     this.subscriptionsService = services[typeof(ISubscriptionsService)] as ISubscriptionsService;
 }
 public SubscriptionsController(ISubscriptionsService subscriptionService, MPInterfaces.IAuthenticationService authenticationService)
 {
     _subscriptionService = subscriptionService;
     _authenticationService = authenticationService;
 }