public void BeforeEach()
        {
            _productRepo = Substitute.For<IProductRepository>();
            _orderFulfillmentService = Substitute.For<IOrderFulfillmentService>();
            _customerRepository = Substitute.For<ICustomerRepository>();
            _taxRateService = Substitute.For<ITaxRateService>();
            _emailService = Substitute.For<IEmailService>();

            _subject = new OrderService(_orderFulfillmentService,
                _customerRepository,
                _taxRateService,
                _emailService);

            _bestCustomer = new Customer
            {
                CustomerId = 42,
                PostalCode = "12345",
                Country = "Merica"
            };

            _listOfTaxEntries = new List<TaxEntry>
            {
                new TaxEntry {Description = "High Tax", Rate = (decimal) 0.60},
                new TaxEntry {Description = "Low Tax", Rate = (decimal) 0.10}
            };

            _orderConfirmation = new OrderConfirmation
            {
                OrderId = 1234,
                OrderNumber = "hello"
            };
            _customerRepository.Get(_bestCustomer.CustomerId.Value).Returns(_bestCustomer);
            _taxRateService.GetTaxEntries(_bestCustomer.PostalCode, _bestCustomer.Country).Returns(_listOfTaxEntries);
        }
Пример #2
0
        public UserService(UserManager<IUserDto, int> userManager,
            IUserDtoMapper userDtoMapper,
            IEmailService emailService,
            EntityValidator entityValidator,
            IUserRepository userRepository,
            Func<object, ValidationContext> validationContextFactory = null)
        {
            if (userManager == null)
            {
                throw new ArgumentNullException("userManager");
            }

            if (userDtoMapper == null)
            {
                throw new ArgumentNullException("userDtoMapper");
            }

            if (emailService == null)
            {
                throw new ArgumentNullException("emailService");
            }

            _userRepository = userRepository;
            _userDtoMapper = userDtoMapper;
            _emailService = emailService;
            _entityValidator = entityValidator;
            _validationContextFactory = validationContextFactory ?? (o => new ValidationContext(o, null, null));
            _userManager = userManager;
            _userManager.UserValidator = new UserValidator<IUserDto, int>(_userManager){AllowOnlyAlphanumericUserNames = false};
        }
Пример #3
0
 public ManageUsersController(ApplicationDbContext context, ApplicationUserManager userManager, IEmailService emailService, ICurrentUser currentUser)
 {
     _context = context;
     _userManager = userManager;
     _emailService = emailService;
     _currentUser = currentUser;
 }
		public AccountController(UserManager<ApplicationUser> userManager, IUserAuthentication userAuthentication, IEmailService<Email> emailService, ILogger logger)
		{
			UserManager = userManager;
			_userAuthentication = userAuthentication;
			_emailService = emailService;
			_logger = logger;
		}
Пример #5
0
        protected override void Context()
        {
            _smtpWrapper = new SmtpWrapper("localhost");
            _settingsProvider = new SettingsProvider();

            _emailService = new EmailService(_smtpWrapper, _settingsProvider);
        }
Пример #6
0
 public UsersController(IEmailValidator emailValidator, IActivationLinkGenerator activationLinkGenerator, IEmailService emailService, IUsersDatabase usersDatabase)
 {
     _emailValidator = emailValidator;
     _activationLinkGenerator = activationLinkGenerator;
     _emailService = emailService;
     _usersDatabase = usersDatabase;
 }
Пример #7
0
 public MediaVerifyController(
       IMemberService MemberService
     , IEmailService EmailService
     , IMember_ActionService Member_ActionService
     , IOutDoorService OutDoorService
     , IIndustryCateService IndustryCateService,
     ICrowdCateService CrowdCateService,
     IOwnerCateService OwnerCateService,
     IAreaCateService AreaCateService,
     IPurposeCateService PurposeCateService,
     IFormatCateService FormatCateService,
     IPeriodCateService PeriodCateService,
     ICityCateService CityCateService,
     IMediaCateService MediaCateService,
     ICompanyService CompanyService)
 {
     this.MemberService = MemberService;
     this.EmailService = EmailService;
     this.Member_ActionService = Member_ActionService;
     this.OutDoorService = OutDoorService;
     this.IndustryCateService = IndustryCateService;
     this.CrowdCateService = CrowdCateService;
     this.OwnerCateService = OwnerCateService;
     this.AreaCateService = AreaCateService;
     this.PurposeCateService = PurposeCateService;
     this.FormatCateService = FormatCateService;
     this.PeriodCateService = PeriodCateService;
     this.CityCateService = CityCateService;
     this.MediaCateService = MediaCateService;
     this.CompanyService = CompanyService;
 }
Пример #8
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="context"></param>
 /// <param name="settingsService"> </param>
 /// <param name="emailService"> </param>
 /// <param name="localizationService"> </param>
 /// <param name="activityService"> </param>
 /// <param name="privateMessageService"> </param>
 /// <param name="membershipUserPointsService"> </param>
 /// <param name="topicNotificationService"> </param>
 /// <param name="voteService"> </param>
 /// <param name="badgeService"> </param>
 /// <param name="categoryNotificationService"> </param>
 /// <param name="loggingService"></param>
 /// <param name="uploadedFileService"></param>
 /// <param name="postService"></param>
 /// <param name="pollVoteService"></param>
 /// <param name="pollAnswerService"></param>
 /// <param name="pollService"></param>
 /// <param name="topicService"></param>
 /// <param name="favouriteService"></param>
 /// <param name="categoryService"></param>
 public MembershipService(IMVCForumContext context, ISettingsService settingsService,
     IEmailService emailService, ILocalizationService localizationService, IActivityService activityService,
     IPrivateMessageService privateMessageService, IMembershipUserPointsService membershipUserPointsService,
     ITopicNotificationService topicNotificationService, IVoteService voteService, IBadgeService badgeService,
     ICategoryNotificationService categoryNotificationService, ILoggingService loggingService, IUploadedFileService uploadedFileService,
     IPostService postService, IPollVoteService pollVoteService, IPollAnswerService pollAnswerService,
     IPollService pollService, ITopicService topicService, IFavouriteService favouriteService, 
     ICategoryService categoryService, IPostEditService postEditService)
 {
     _settingsService = settingsService;
     _emailService = emailService;
     _localizationService = localizationService;
     _activityService = activityService;
     _privateMessageService = privateMessageService;
     _membershipUserPointsService = membershipUserPointsService;
     _topicNotificationService = topicNotificationService;
     _voteService = voteService;
     _badgeService = badgeService;
     _categoryNotificationService = categoryNotificationService;
     _loggingService = loggingService;
     _uploadedFileService = uploadedFileService;
     _postService = postService;
     _pollVoteService = pollVoteService;
     _pollAnswerService = pollAnswerService;
     _pollService = pollService;
     _topicService = topicService;
     _favouriteService = favouriteService;
     _categoryService = categoryService;
     _postEditService = postEditService;
     _context = context as MVCForumContext;
 }
Пример #9
0
 public EditorController(IRepository<Editor> editorRepository, IAccessService accessService, IEmailService emailService, IMembershipService membershipService)
 {
     _editorRepository = editorRepository;
     _accessService = accessService;
     _emailService = emailService;
     _membershipService = membershipService;
 }
Пример #10
0
 public OrderService(IOrderRepository orderRepository, ICustomerFactory customerFactory, IEmailService emailService, IOrderSettings orderSettings)
 {
     _orderRepository = orderRepository;
     _customerFactory = customerFactory;
     _emailService = emailService;
     _orderSettings = orderSettings;
 }
Пример #11
0
 public LoanController(IEmailService mailService, IGenericRepository<Component> componentRepo, IGenericRepository<LoanInformation> loanInformationRepo, IGenericRepository<Loaner> loanerRepo)
 {
     _componentRepo = componentRepo;
     _loanInformationRepo = loanInformationRepo;
     _loanerRepo = loanerRepo;
     _mailService = mailService;
 }
		public void Setup()
		{
			basketRepository = MockRepository.GenerateStub<IRepository<Basket>>();
			unitOfWorkManager = MockRepository.GenerateStub<IUnitOfWorkManager>();

			userService = MockRepository.GenerateStub<IUserService>();
			postageService = MockRepository.GenerateStub<IPostageService>();
			countryRepository = MockRepository.GenerateStub<IRepository<Country>>();
			cardTypeRepository = MockRepository.GenerateStub<IRepository<CardType>>();
			orderRepository = MockRepository.GenerateStub<IRepository<Order>>();
			subscriptionRepository = MockRepository.GenerateStub<IRepository<MailingListSubscription>>();
			emailService = MockRepository.GenerateStub<IEmailService>();

			var mocks = new MockRepository(); //TODO: No need to partial mock once email sending is fixed
			controller = new CheckoutController(
				basketRepository,
				userService,
				postageService,
				countryRepository,
				cardTypeRepository,
				orderRepository,
				unitOfWorkManager,
				emailService,
				subscriptionRepository
			);
			mocks.ReplayAll();
			userService.Expect(us => us.CurrentUser).Return(new User { UserId = 4, RoleId = Role.AdministratorId });
		}
Пример #13
0
        public InboxViewModel(IEmailService emailService, IRegionManager regionManager)
        {
            this.synchronizationContext = SynchronizationContext.Current ?? new SynchronizationContext();

            this.composeMessageCommand = new DelegateCommand<object>(this.ComposeMessage);
            this.replyMessageCommand = new DelegateCommand<object>(this.ReplyMessage, this.CanReplyMessage);
            this.openMessageCommand = new DelegateCommand<EmailDocument>(this.OpenMessage);

            this.messagesCollection = new ObservableCollection<EmailDocument>();
            this.Messages = new PagedCollectionView(this.messagesCollection);
            this.Messages.CurrentChanged += (s, e) =>
                this.replyMessageCommand.RaiseCanExecuteChanged();

            this.emailService = emailService;
            this.regionManager = regionManager;

            this.emailService.BeginGetEmailDocuments(
                r =>
                {
                    var messages = this.emailService.EndGetEmailDocuments(r);

                    this.synchronizationContext.Post(
                        s =>
                        {
                            foreach (var message in messages)
                            {
                                this.messagesCollection.Add(message);
                            }
                        },
                        null);
                },
                null);
        }
Пример #14
0
 public PaymentService(IUserService userService, IEmailService emailService)
 {
     _emailService = emailService;
     _userService = userService;
     _owin = HttpContext.Current.GetOwinContext();
     _dbContext = _owin.Get<ApplicationDbContext>();
 }
Пример #15
0
 public PasswordService(IPersonRepository personRepository, IChurchRepository churchRepository, IUsernamePasswordRepository usernamePasswordRepository, IEmailService emailService)
 {
     _personRepository = personRepository;
     _churchRepository = churchRepository;
     _usernamePasswordRepository = usernamePasswordRepository;
     _emailService = emailService;
 }
		public TimetableServiceWithEmail(ITimetableService innerTimetableService, IEmailService emailService)
		{
			if (innerTimetableService == null) throw new ArgumentNullException("Inner timetable service");
			if (emailService == null) throw new ArgumentNullException("Email service");
			_innerTimetableService = innerTimetableService;
			_emailService = emailService;
		}
Пример #17
0
 //  private readonly IEventManagerService _eventManagerService;
 public EmailService(IEmailService emailService, IMessageBusService messageBusService, IAuditService auditService/*, IEventManagerService eventManagerService*/)
 {
     _emailService = emailService;
     _messageBusService = messageBusService;
     _auditService = auditService;
      //   _eventManagerService = eventManagerService;
 }
Пример #18
0
 public EmailQueueManager(IEmailService eServ, IUnitOfWork uow)
 {
     serv = eServ;
     db = uow;
     exceptionStack = new Stack<Exception>();
     sentStack = new Stack<Email>();
 }
 public AdminController(IEmailService emailService, IEmployeeService employeeservice, IProjectService projectService, ISkillSetService skillsetservice)
 {
     _projectService = projectService;
     _employeeService = employeeservice;
     _emailService = emailService;
     _skillsetservice = skillsetservice;
 }
 public UsersService(IEmailService emailServices
                        , IRecoverPasswordRepository recoverPasswordRepository
     )
 {
     _emailServices = emailServices;
     _recoverPasswordRepository = recoverPasswordRepository;
 }
Пример #21
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="membershipRepository"> </param>
 /// <param name="settingsRepository"> </param>
 /// <param name="emailService"> </param>
 /// <param name="localizationService"> </param>
 /// <param name="activityService"> </param>
 /// <param name="privateMessageService"> </param>
 /// <param name="membershipUserPointsService"> </param>
 /// <param name="topicNotificationService"> </param>
 /// <param name="voteService"> </param>
 /// <param name="badgeService"> </param>
 /// <param name="categoryNotificationService"> </param>
 /// <param name="loggingService"></param>
 /// <param name="uploadedFileService"></param>
 /// <param name="postRepository"></param>
 /// <param name="pollVoteRepository"></param>
 /// <param name="pollAnswerRepository"></param>
 /// <param name="pollRepository"></param>
 /// <param name="topicRepository"></param>
 /// <param name="favouriteRepository"></param>
 /// <param name="categoryService"></param>
 public MembershipService(IMembershipRepository membershipRepository, ISettingsRepository settingsRepository,
     IEmailService emailService, ILocalizationService localizationService, IActivityService activityService,
     IPrivateMessageService privateMessageService, IMembershipUserPointsService membershipUserPointsService,
     ITopicNotificationService topicNotificationService, IVoteService voteService, IBadgeService badgeService,
     ICategoryNotificationService categoryNotificationService, ILoggingService loggingService, IUploadedFileService uploadedFileService,
     IPostRepository postRepository, IPollVoteRepository pollVoteRepository, IPollAnswerRepository pollAnswerRepository,
     IPollRepository pollRepository, ITopicRepository topicRepository, IFavouriteRepository favouriteRepository,
     ICategoryService categoryService)
 {
     _membershipRepository = membershipRepository;
     _settingsRepository = settingsRepository;
     _emailService = emailService;
     _localizationService = localizationService;
     _activityService = activityService;
     _privateMessageService = privateMessageService;
     _membershipUserPointsService = membershipUserPointsService;
     _topicNotificationService = topicNotificationService;
     _voteService = voteService;
     _badgeService = badgeService;
     _categoryNotificationService = categoryNotificationService;
     _loggingService = loggingService;
     _uploadedFileService = uploadedFileService;
     _postRepository = postRepository;
     _pollVoteRepository = pollVoteRepository;
     _pollAnswerRepository = pollAnswerRepository;
     _pollRepository = pollRepository;
     _topicRepository = topicRepository;
     _favouriteRepository = favouriteRepository;
     _categoryService = categoryService;
 }
 /// AccountHelper
 public AccountHelper(IGenericUnitofWork uow, IMembershipService membershipService, IUserHelper userHelper, IEmailService emailService)
 {
     UnitofWork = uow;
     MembershipService = membershipService;
     UserHelper = userHelper;
     EmailService = emailService;
 }
Пример #23
0
 public PersonService(
     IPersonRepository personRepository, 
     IPersonGroupRepository personGroupRepository, 
     IPermissionRepository permissionRepository, 
     IPersonRoleRepository personRoleRepository, 
     IPersonOptionalFieldRepository personOptionalFieldRepository, 
     IRelationshipRepository relationshipRepository,
     IChurchMatcherRepository churchMatcherRepository,
     IGroupRepository groupRepository,
     IFamilyRepository familyRepository,
     IEmailService emailService,
     IAddressRepository addressRepository,
     IPhotoRepository photoRepository)
 {
     _personRepository = personRepository;
     _personGroupRepository = personGroupRepository;
     _permissionRepository = permissionRepository;
     _personRoleRepository = personRoleRepository;
     _personOptionalFieldRepository = personOptionalFieldRepository;
     _relationshipRepository = relationshipRepository;
     _churchMatcherRepository = churchMatcherRepository;
     _groupRepository = groupRepository;
     _familyRepository = familyRepository;
     _emailService = emailService;
     _addressRepository = addressRepository;
     _photoRepository = photoRepository;
 }
        public AttendingUserDetailsViewModel(ICTimeService cTimeService, IApplicationStateService applicationStateService, IContactsService contactsService, IDialogService dialogService, IPhoneService phoneService, IEmailService emailService)
        {
            Guard.NotNull(cTimeService, nameof(cTimeService));
            Guard.NotNull(applicationStateService, nameof(applicationStateService));
            Guard.NotNull(contactsService, nameof(contactsService));
            Guard.NotNull(dialogService, nameof(dialogService));
            Guard.NotNull(phoneService, nameof(phoneService));
            Guard.NotNull(emailService, nameof(emailService));

            this._cTimeService = cTimeService;
            this._applicationStateService = applicationStateService;
            this._contactsService = contactsService;
            this._dialogService = dialogService;
            this._phoneService = phoneService;
            this._emailService = emailService;

            this.LoadAttendingUser = UwCoreCommand.Create(this.LoadAttendingUserImpl)
                .HandleExceptions()
                .ShowLoadingOverlay(CTime2Resources.Get("Loading.Employee"));
            this.LoadAttendingUser.ToProperty(this, f => f.AttendingUser, out this._attendingUserHelper);
            
            var canCall = Observable
                .Return(this._phoneService.CanCall)
                .CombineLatest(this.WhenAnyValue(f => f.AttendingUser), (serviceCanCall, user) => 
                    serviceCanCall && string.IsNullOrWhiteSpace(user?.PhoneNumber) == false);
            this.Call = UwCoreCommand.Create(canCall, this.CallImpl)
                .HandleExceptions();

            var canSendMail = this.WhenAnyValue(f => f.AttendingUser, selector: user => string.IsNullOrWhiteSpace(user?.EmailAddress) == false);
            this.SendMail = UwCoreCommand.Create(canSendMail, this.SendMailImpl)
                .HandleExceptions();

            this.AddAsContact = UwCoreCommand.Create(this.AddAsContactImpl)
                .HandleExceptions();
        }
Пример #25
0
 public UserService(IRepository<User> repository, IRepository<Role> roleRepository, IEmailService emailService, ICryptographyService cryptographyService)
 {
     _repository = repository;
     _roleRepository = roleRepository;
     _emailService = emailService;
     _cryptographyService = cryptographyService;
 }
Пример #26
0
 public AccountController(IUserService userService, ICryptographyService cryptographyService, IEmailService emailService, IImageService imageService)
 {
     _userService = userService;
     _cryptographyService = cryptographyService;
     _emailService = emailService;
     _imageService = imageService;
 }
Пример #27
0
 public UserManager(IEmailService emailService, IAuthenticationService authenticationService, IPasswordHelper passwordHelper,ISession session)
 {
     this.emailService = emailService;
     this.authenticationService = authenticationService;
     this.passwordHelper = passwordHelper;
     this.session = session;
 }
Пример #28
0
        public InboxViewModel(IEmailService emailService, IRegionManager regionManager)
        {
            synchronizationContext = SynchronizationContext.Current ?? new SynchronizationContext();

            _composeMessageCommand = new DelegateCommand<object>(ComposeMessage);
            _replyMessageCommand = new DelegateCommand<object>(ReplyMessage, CanReplyMessage);
            _openMessageCommand = new DelegateCommand<EmailDocument>(OpenMessage);

            messagesCollection = new ObservableCollection<EmailDocument>();
            Messages = new CollectionView(this.messagesCollection);
            Messages.CurrentChanged += (s, e) =>
                _replyMessageCommand.RaiseCanExecuteChanged();

            _emailService = emailService;
            _regionManager = regionManager;

            if (_emailService != null)
            {
                _emailService.BeginGetEmailDocuments(
                    r =>
                        {
                            var messages = _emailService.EndGetEmailDocuments(r);
                            synchronizationContext.Post(
                                s =>
                                    {
                                        foreach (var message in messages)
                                        {
                                            messagesCollection.Add(message);
                                        }
                                    }, null);
                        }, null);
            }
        }
Пример #29
0
 public PetitionController(IEmailService emailService, ICeremonyService ceremonyService, IPetitionService petitionService, IErrorService errorService)
 {
     _emailService = emailService;
     _ceremonyService = ceremonyService;
     _petitionService = petitionService;
     _errorService = errorService;
 }
Пример #30
0
 public EmailServiceTests()
 {
     TemplateRepository = MockRepository.GenerateStub<IRepository<Template>>();
     EmailQueueRepository = MockRepository.GenerateStub<IRepository<EmailQueue>>();
     LetterGenerator = MockRepository.GenerateStub<ILetterGenerator>();
     EmailService = new EmailService(TemplateRepository, EmailQueueRepository, LetterGenerator);
 }
Пример #31
0
        public async Task <IActionResult> Index(GameInvitationModel gameInvitationModel, [FromServices] IEmailService emailService)
        {
            var gameInvitationService = Request.HttpContext.RequestServices.GetService <IGameInvitationService>();

            if (ModelState.IsValid)
            {
                try
                {
                    var invitationModel = new InvitationEmailModel
                    {
                        DisplayName     = $"{gameInvitationModel.EmailTo}",
                        InvitedBy       = await _userService.GetUserByEmail(gameInvitationModel.InvitedBy),
                        ConfirmationUrl = Url.Action("ConfirmGameInvitation", "GameInvitation",
                                                     new { id = gameInvitationModel.Id }, Request.Scheme, Request.Host.ToString()),
                        InvitedDate = gameInvitationModel.ConfirmationDate
                    };

                    var emailRenderService = HttpContext.RequestServices.GetService <IEmailTemplateRenderService>();
                    var message            = await emailRenderService.RenderTemplate <InvitationEmailModel>("EmailTemplates/InvitationEmail", invitationModel, Request.Host.ToString());

                    await emailService.SendEmail(gameInvitationModel.EmailTo, _stringLocalizer["Invitation for playing a Tic-Tac-Toe game"], message);
                }
                catch
                {
                }

                var invitation = gameInvitationService.Add(gameInvitationModel).Result;
                return(RedirectToAction("GameInvitationConfirmation", new { id = gameInvitationModel.Id }));
            }
            return(View(gameInvitationModel));
        }
Пример #32
0
 public static void InitializeEmailServiceFactory(IEmailService emailService)
 {
     _emailService = emailService;
 }
 public IdentityNotificationController(IEmailService emailService
                                       , IPlainTextContentRenderer plainTextContentRenderer
                                       , IHtmlContentRenderer viewRenderer) : base(emailService, plainTextContentRenderer
                                                                                   , viewRenderer)
 {
 }
 public SubscriptionHandler(IStudentRepository studentRepository, IEmailService emailService)
 {
     this._repository   = studentRepository;
     this._emailService = emailService;
 }
 public WebhookController(IEmailService emailService)
 {
     _emailService = emailService;
 }
Пример #36
0
 protected ClaimImplBase(IUnitOfWork unitOfWork, IEmailService emailService,
                         IFieldDefaultValueGenerator fieldDefaultValueGenerator) : base(unitOfWork)
 {
     EmailService = emailService;
     FieldDefaultValueGenerator = fieldDefaultValueGenerator;
 }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="smsBotService">Sms bot service</param>
 public SmsBotController(ISmsBotService smsBotService, IEmailService emailService)
 {
     _smsBotService = smsBotService;
     _emailService  = emailService;
 }
Пример #38
0
 public CompanyService(ICompanyRepository repository, IEmailService emailService) : base(repository)
 {
     _repository   = repository;
     _emailService = emailService;
 }
Пример #39
0
 public FormService(IAuthenticationService authenticationService, IEmailConfigurationService emailConfigurationService, IEmailService emailService, IFormRepository formRepository, IPageService pageService, IWebHelperService webHelperService)
 {
     _authenticationService     = authenticationService;
     _emailConfigurationService = emailConfigurationService;
     _emailService     = emailService;
     _formRepository   = formRepository;
     _pageService      = pageService;
     _webHelperService = webHelperService;
 }
Пример #40
0
 public AccountService(IAccountRepository repository, IEmailService mailService)
 {
     this.repository  = repository;
     this.mailService = mailService;
 }
 /// <summary>
 /// Account Management Constructor
 /// </summary>
 /// <param name="userManager"></param>
 /// <param name="config"></param>
 /// <param name="mapper"></param>
 /// <param name="emailService"></param>
 public AccountController(UserManager <IUser> userManager, IConfiguration config, IMapper mapper, IEmailService emailService)
 {
     _config       = config;
     _userManager  = userManager;
     _mapper       = mapper;
     _emailService = emailService;
 }
Пример #42
0
 public FlightController(IFlightService flightService, IEmailService emailService, IOptions <ApplicationSettings> options)
 {
     _flightService = flightService;
     _emailService  = emailService;
     _settings      = options.Value;
 }
Пример #43
0
 public ValuesController(IEmailService emailService)
 {
     _emailService = emailService;
 }
 public FlightController(IFlightService flightService, IEmailService emailService, IOptions <ApplicationSettings> options, IUserRepository userRepository) : base(userRepository)
 {
     _flightService = flightService;
     _emailService  = emailService;
     _settings      = options.Value;
 }
Пример #45
0
 public CustomerHandler(ICustomerRepository repository, IEmailService emailService)
 {
     _repository   = repository;
     _emailService = emailService;
 }
 public GeneratePasswordResetTokenNotificationEventConsumer(IUnitOfWork unitOfWork, IEmailService emailService)
 {
     _unitOfWork   = unitOfWork;
     _emailService = emailService;
 }
Пример #47
0
 public HomeController(SscisContext context, IEmailService emailService, IConfiguration configuration)
 {
     Db             = context;
     _emailService  = emailService;
     _configuration = configuration;
 }
Пример #48
0
 public AccountController(IIdentityServerInteractionService interaction, ILdapUserStore <LdapUser> users,
                          IEventService events, ILoginManager <LdapUser> login, IEmailService mail,
                          IViewRenderService viewRenderService, SigningCredentials signingCredentials)
 {
     this._interaction               = interaction;
     this._users                     = users;
     this._events                    = events;
     this._login                     = login;
     this._mail                      = mail;
     this._viewRenderService         = viewRenderService;
     this._signingCredentials        = signingCredentials;
     this._tokenValidationParameters = new TokenValidationParameters {
         ValidIssuer              = "https://account.vcp.sh",
         ValidateAudience         = false,
         IssuerSigningKey         = this._signingCredentials.Key,
         ValidateIssuerSigningKey = true,
         ValidateIssuer           = true,
         ValidateLifetime         = true,
         ValidateTokenReplay      = true
     };
 }
Пример #49
0
 public GmailAPIService(IEmailService emailService, IGmailParseManager gmailParseManager, IMessageToEmailDTOMapper messageToEmailDTOPmapper)
 {
     this.emailService             = emailService ?? throw new ArgumentNullException(nameof(emailService));
     this.messageToEmailDTOPmapper = messageToEmailDTOPmapper ?? throw new ArgumentNullException(nameof(messageToEmailDTOPmapper));
 }
Пример #50
0
 public LetterReportController(MyContext context, IEmailService es, IConfiguration conf)
 {
     _context      = context;
     _EmailService = es;
     _config       = conf;
 }
Пример #51
0
 public InvitationService(IEmailService emailService, IMailMessageBuilder mailMessageBuilder, IApplicationUserManagerFactory applicationUserManagerFactory)
 {
     _emailService       = emailService;
     _mailMessageBuilder = mailMessageBuilder;
 }
Пример #52
0
 public EmailController(IEmailConfiguration emailConfiguration, IEmailService emailService)
 {
     this._emailService       = emailService;
     this._emailConfiguration = emailConfiguration;
 }
 public CreateUserCommandHandler(IMediator mediator, IDocumentContext documentContext, ICoreConfiguration coreConfiguration, IEmailService emailService)
 {
     _mediator = mediator;
     _coreConfiguration = coreConfiguration;
     _documentContext = documentContext;
     _emailService = emailService;
 }
Пример #54
0
 public AccountController(UserManager <IdentityUser> userManager, SignInManager <IdentityUser> signInManager, IEmailService emailService)
 {
     _UserManager   = userManager;
     _SigninManager = signInManager;
     _EmailService  = emailService;
 }
Пример #55
0
 public static Task SendEmailConfirmationAsync(this IEmailService emailSender, string email, string link)
 {
     return(emailSender.SendEmailAsync(email, "Confirm your email",
                                       $"Please confirm your account by clicking this link: <a href='{HtmlEncoder.Default.Encode(link)}'>link</a>"));
 }
Пример #56
0
 public ContactController(IEmailService mailService, IConfigurationRoot config, ILogger <ContactController> logger)
 {
     _config      = config;
     _mailService = mailService;
     _logger      = logger;
 }
Пример #57
0
 /// <summary>
 /// Constructor - Initializes the email service
 /// </summary>
 /// <param name="emailService">Email service</param>
 /// <param name="reCaptchaService">ReCaptcha service</param>
 public ContactController(IEmailService emailService, IReCaptchaService reCaptchaService)
 {
     _emailService     = emailService;
     _reCaptchaService = reCaptchaService;
 }
 public PasswordController(IUserService userService, IEmailService emailService, IFormsAuthenticationService formsAuthenticationService)
 {
     this.userService = userService;
     this.formsAuthenticationService = formsAuthenticationService;
     this.emailService = emailService;
 }
Пример #59
0
        public JobInfoPageViewModel(IEmailService emailService,
                                    ICapacityEngine capacityEngine, ICacheService cacheService) : base(cacheService)
        {
            _cacheService   = cacheService;
            _emailService   = emailService;
            _capacityEngine = capacityEngine;

            JobTypes = new List <string>()
            {
                "SF",
                "MF",
                "LA"
            };

            Phases = new ObservableCollection <Phase>();

            BuildingSystems = new List <BuildingSystem>();

            MessagingCenter.Subscribe <PhaseCreationPage>(this, "Phases Saved", (sender) =>
            {
                var creator = sender as PhaseCreationPage;
                Phases      = creator.JobItem.Phases;
                OnPropertyChanged(nameof(Phases));
                if (Phases != null)
                {
                    BuildingSystems = Phases.First().BuildingSystems;
                }
                OnPropertyChanged(nameof(BuildingSystems));
            });

            DeliveryDate       = DateTime.Today;
            RoundTripMiles     = 0;
            HasWindows         = true;
            WindowsInstalled   = false;
            WindowDeliveryDate = DateTime.Today;

            OkClickedCommand = new Command(
                execute: async() =>
            {
                JobInfoItem = new JobItem
                {
                    JobName         = JobName,
                    DeliveryDate    = DeliveryDate,
                    FloorSquareFeet = FloorSquareFeet,
                    HasWindows      = HasWindows,
                    RoundTripMiles  = RoundTripMiles,
                    Phases          = Phases,
                    //SelectedBuildingSystem = SelectedBuildingSystem,
                    SelectedJobType = SelectedJobType,
                    //SelectedPhase = SelectedPhase,
                    WallBoardFeet      = WallBoardFeet,
                    WindowDeliveryDate = WindowDeliveryDate,
                    WindowsInstalled   = WindowsInstalled
                };

                await _cacheService.SaveJobItem(JobInfoItem);
                var schedule = await _capacityEngine.CalculateSchedules(JobInfoItem);

                await _cacheService.SaveJobSchedule(schedule);
                await SendCompletionEmail();
                await App.Current.MainPage.Navigation.PopModalAsync();
            });

            CancelClickedCommand = new Command(
                execute: () =>
            {
                JobInfoItem = null;
                App.Current.MainPage.Navigation.PopModalAsync();
            }
                );
        }
 public CustomerCreatedHandler(IEmailService email)
 {
     _email = email;
 }