// constructor
        public ModifyReservationForm(Form prevMenu, ParkingDatabase database,
            ParkingReservation reservationToModify, IClock clock, IMailer mailer)
        {
            rand = new Random();
            Mailer = mailer;
            ModificationClock = clock;
            this.PreviousMenu = prevMenu;
            this.Database = database;
            OldReservation = reservationToModify;
            VehicleList = Database.GetVehicles(OldReservation.Customer.CustomerID);
            CardList = Database.GetCreditCards(OldReservation.Customer.CustomerID);

            InitializeComponent();

            // bind the vehicle combo box to the vehicle list
            vehicleComboBox.DataSource = VehicleList;
            vehicleComboBox.DisplayMember = "AsString";

            // set initial values based on current reservation details
            desiredMonthCalendar.MaxSelectionCount = 1;
            desiredMonthCalendar.SelectionStart = OldReservation.Date;
            desiredTimeDateTimePicker.Value = OldReservation.Date;
            durationComboBox.SelectedIndex = MinutesToDurationIndex(OldReservation.DurationMinutes);
            vehicleComboBox.SelectedItem = OldReservation.ReservationVehicle;
        }
Esempio n. 2
0
        public SomeClass(IMailer mailer)
        {
            if (mailer == null)
                throw new ArgumentNullException("mailer");

            this.mailer = mailer;
        }
 public PasswordsController(
     IMembershipService membershipService,
     IMailer mailer)
 {
     this.membershipService = membershipService;
     this.mailer = mailer;
 }
Esempio n. 4
0
 public UsersController(
     Func<string, string, bool, string> signup,
     IMailer mailer)
 {
     this.signup = signup;
     this.mailer = mailer;
 }
 public ContactsEventSink(
     IDistributionPolicyFactory distributionPolicyFactory, 
     IEventRepository eventRepository, 
     IMailer mailer, IUserPresentationProvider userPresentationProvider)
     : base(distributionPolicyFactory, eventRepository, mailer, userPresentationProvider)
 {
 }
 public CreateAccountForm(ParkingDatabase db, IClock clock, IMailer mailer)
 {
     Database = db;
     FormClock = clock;
     Mailer = mailer;
     InitializeComponent();
 }
Esempio n. 7
0
        public MorningEmailTask(IMailer mailer, 
                                IRepository<DogEvent> dogEventRepo,
                                IRepository<DogFeedingEntry> dogFeedingRepo,
                                IRepository<DogMedication> dogMedicationRepo,
                                IList<string> to, string from, string subject)
        {
            if (mailer == null)
                throw new ArgumentNullException("mailer");
            _mailer = mailer;
            if (dogEventRepo == null)
                throw new ArgumentNullException("dogEventRepo");
            _dogEventRepo = dogEventRepo;
            if (dogFeedingRepo == null)
                throw new ArgumentNullException("dogFeedingRepo");
            _dogFeedingRepo = dogFeedingRepo;
            if (dogMedicationRepo == null)
                throw new ArgumentNullException("dogMedicationRepo");
            _dogMedicationRepo = dogMedicationRepo;

            if (to == null || !to.Any())
                throw new ArgumentNullException("to");
            _to = to;
            if (string.IsNullOrEmpty(from))
                throw new ArgumentNullException("from");
            _from = from;
            if (string.IsNullOrEmpty("subject"))
                throw new ArgumentNullException("subject");
            _subject = subject;
        }
Esempio n. 8
0
 public AdminForm(IClock adminClock, IMailer mailer)
 {
     AdminClock = adminClock;
     Mailer = mailer;
     Database = new ParkingDatabase(adminClock, Mailer);
     InitializeComponent();
 }
Esempio n. 9
0
        public MorningEmailTask(IMailer mailer, 
                                IRepository<DogEvent> dogEventRepo,
                                IRepository<DogFeedingEntry> dogFeedingRepo,
                                IRepository<DogMedication> dogMedicationRepo,
                                IRepository<TaskEmailRecipient> taskEmailRecipientRepo, 
                                string from, string subject)
        {
            if (mailer == null)
                throw new ArgumentNullException(nameof(mailer));
            _mailer = mailer;
            if (dogEventRepo == null)
                throw new ArgumentNullException(nameof(dogEventRepo));
            _dogEventRepo = dogEventRepo;
            if (dogFeedingRepo == null)
                throw new ArgumentNullException(nameof(dogFeedingRepo));
            _dogFeedingRepo = dogFeedingRepo;
            if (dogMedicationRepo == null)
                throw new ArgumentNullException(nameof(dogMedicationRepo));
            _dogMedicationRepo = dogMedicationRepo;
            if (taskEmailRecipientRepo == null)
                throw new ArgumentNullException(nameof(taskEmailRecipientRepo));
            _taskEmailRecipientRepo = taskEmailRecipientRepo;

            if (string.IsNullOrEmpty(from))
                throw new ArgumentNullException(nameof(@from));
            _from = from;
            if (string.IsNullOrEmpty("subject"))
                throw new ArgumentNullException(nameof(subject));
            _subject = subject;
        }
        public void SetUp()
        {
            _urdmsUserService = Substitute.For<IUrdmsUserService>();
            _mailer = Substitute.For<IMailer>();
            _approvalStateChangedRepository = Substitute.For<IApprovalStateChangedRepository>();

        }
Esempio n. 11
0
 public AccountController(IMembershipProvider membership, IOrganizationRepository organizationRepository, IUserRepository userRepository, BillingManager billingManager, IMailer mailer, DataHelper dataHelper) {
     _membershipProvider = membership;
     _organizationRepository = organizationRepository;
     _userRepository = userRepository;
     _billingManager = billingManager;
     _mailer = mailer;
     _dataHelper = dataHelper;
 }
Esempio n. 12
0
 public ResultsMailer(IMailer mailClient = null)
 {
     //Idealy this would be injected
     if (mailClient == null)
     {
         MailClient = new GmailSmtpClient();
     }
 }
Esempio n. 13
0
 public CustomerForm(CustomerAccount cust, ParkingDatabase db, IClock clock, IMailer mailer)
 {
     CustomerClock = clock;
     Mailer = mailer;
     InitializeComponent();
     Customer = cust;
     Database = db;
 }
 public EmailConfirmationManager(IMailer mailer)
 {
     if (mailer == null)
     {
         throw new ArgumentNullException("mailer");
     }
     Mailer = mailer;
 }
Esempio n. 15
0
 public PasswordsController(
     Func<string,string> forgotPassword,
     Func<string,string,string,bool> changePassword,
     IMailer mailer) {
     this.forgotPassword = forgotPassword;
     this.changePassword = changePassword;
     this.mailer = mailer;
 }
Esempio n. 16
0
 public AccountController(IFormsAuth formsAuth, IMailer mailer, IFacebookApi facebookApi)
 {
     this.users = new Users();
     this.pwdResetTokens = new PasswordResetTokens();
     this.formsAuth = formsAuth;
     this.mailer = mailer;
     this.facebookApi = facebookApi;
 }
Esempio n. 17
0
 public DailySummaryJob(IProjectRepository projectRepository, IOrganizationRepository organizationRepository, IUserRepository userRepository, IEventRepository eventRepository, EventStats stats, IMailer mailer, ICacheClient cacheClient, ILoggerFactory loggerFactory = null) : base(loggerFactory) {
     _projectRepository = projectRepository;
     _organizationRepository = organizationRepository;
     _userRepository = userRepository;
     _eventRepository = eventRepository;
     _stats = stats;
     _mailer = mailer;
     _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromHours(1));
 }
Esempio n. 18
0
 public LocaleController(ILocaleInfoBoxViewModelFactory localeInfoBoxViewModelFactory, ILocalesRepository localeRepository, ILocalePageViewModelFactory localePageViewModelFactory, IGenusRepository genusRepository, ILakeRepository lakeRepository, IMailer mailer)
 {
     this.localeInfoBoxViewModelFactory = localeInfoBoxViewModelFactory;
     this.localeRepository = localeRepository;
     this.localePageViewModelFactory = localePageViewModelFactory;
     this.genusRepository = genusRepository;
     this.lakeRepository = lakeRepository;
     this.mailer = mailer;
 }
Esempio n. 19
0
 // constructor
 public TerminalForm(IBarrier barrier, ITerminalPrinter printer, IClock termClock, IMailer mailer)
 {
     TerminalMailer = mailer;
     rand = new Random();
     Barrier = barrier;
     Printer = printer;
     TerminalClock = termClock;
     Database = new ParkingDatabase(termClock, TerminalMailer);
     InitializeComponent();
 }
Esempio n. 20
0
		public BrandedEmailSender(IIOService ioService, IRazorTemplateResolver templateResolver, IMailer mailer)
		{
			this.ioService = ioService;
			this.templateResolver = templateResolver;
			this.mailer = mailer;

			EmailPath = "~/Emails";
			BrandedTemplateFolder = "BrandTemplates";
			BrandedMessageFolder = "Messages";
		}
Esempio n. 21
0
 public DailySummaryJob(IProjectRepository projectRepository, IOrganizationRepository organizationRepository, IUserRepository userRepository, IStackRepository stackRepository, IEventRepository eventRepository, EventStats stats, IMailer mailer, ILockProvider lockProvider) {
     _projectRepository = projectRepository;
     _organizationRepository = organizationRepository;
     _userRepository = userRepository;
     _stackRepository = stackRepository;
     _eventRepository = eventRepository;
     _stats = stats;
     _mailer = mailer;
     _lockProvider = lockProvider;
 }
 public UsersController(
     IMembershipService membershipService,
     IMailer mailer,
     IUrlSafeSecureDataSerializer urlSafeSecureDataSerializer,
     INewUserConfirmedHandler newUserConfirmedHandler)
 {
     this.membershipService = membershipService;
     this.mailer = mailer;
     this.urlSafeSecureDataSerializer = urlSafeSecureDataSerializer;
     this.newUserConfirmedHandler = newUserConfirmedHandler;
 }
 public UsersController(
     Func<string, string, bool, string> signup,
     IMailer mailer,
     IUrlSafeSecureDataSerializer urlSafeSecureDataSerializer,
     ISeedDataLoader seedDataLoader)
 {
     this.signup = signup;
     this.mailer = mailer;
     this.urlSafeSecureDataSerializer = urlSafeSecureDataSerializer;
     this.seedDataLoader = seedDataLoader;
 }
Esempio n. 24
0
        protected EventSinkBase(IDistributionPolicyFactory distributionPolicyFactory, IEventRepository eventRepository,
            IMailer mailer, IUserPresentationProvider userPresentationProvider)
        {
            Require.NotNull(distributionPolicyFactory, nameof(distributionPolicyFactory));
            Require.NotNull(eventRepository, nameof(eventRepository));
            Require.NotNull(mailer, nameof(mailer));

            DistributionPolicyFactory = distributionPolicyFactory;
            EventRepository = eventRepository;
            Mailer = mailer;
            _userPresentationProvider = userPresentationProvider;
        }
 public EventNotificationsJob(IQueue<EventNotificationWorkItem> queue, IMailer mailer,
     IOrganizationRepository organizationRepository, IProjectRepository projectRepository, IStackRepository stackRepository,
     IUserRepository userRepository, IEventRepository eventRepository, ICacheClient cacheClient) {
     _queue = queue;
     _mailer = mailer;
     _organizationRepository = organizationRepository;
     _projectRepository = projectRepository;
     _stackRepository = stackRepository;
     _userRepository = userRepository;
     _eventRepository = eventRepository;
     _cacheClient = cacheClient;
 }
 public CustomerManager(
     string userName,
     DataContext db,
     IAuthService authService,
     IMailer mailer,
     ICustomerLogManager customerLogManager)
     : base(userName)
 {
     _db = db;
     _authService = authService;
     _mailer = mailer;
     _customerLogManager = customerLogManager;
 }
Esempio n. 27
0
 // constructor
 public ParkingDatabase(IClock clock, IMailer mailer)
 {
     customerTableAdapater = new CustomerTableAdapter();
     vehicleTableAdapater = new VehicleTableAdapter();
     customerVehicleTableAdapter = new CustomerVehicleTableAdapter();
     reservationTableAdapter = new ReservationTableAdapter();
     cardTableAdapter = new CreditCardTableAdapter();
     customerCardTableAdapter = new CustomerCreditCardTableAdapter();
     transactionTableAdapater = new TransactionTableAdapter();
     parkingSpotTableAdapter = new ParkingSpotTableAdapter();
     DatabaseClock = clock;
     Mailer = mailer;
 }
		public AccountController(ILoggedUserProvider loggedUserProvider, ServiceFactoryBase serviceFactory, IAuthenticationService authenticationService, IMailer mailer)
			: base(loggedUserProvider, serviceFactory)
		{
			if (mailer == null)
				throw new ArgumentNullException("mailer");
			_mailer = mailer;

			if (authenticationService == null)
				throw new ArgumentNullException("authenticationService");
			_authenticationService = authenticationService;
			_authenticationService.AuthenticationManager = AuthenticationManager;

			_accountService = ServiceFactory.CreateAccountService();
		}
        // constructor
        public SelectReservationToModifyForm(ParkingDatabase db, IClock custClock, IMailer mailer, CustomerAccount cust)
        {
            Mailer = mailer;
            Database = db;
            this.CustomerClock = custClock;
            Customer = cust;

            // create a binding list from the database list
            Reservations = new BindingList<ParkingReservation>(Database.GetCurrentAndFutureReservations(Customer.CustomerID));

            InitializeComponent();

            // bind the bindinglist to the combobox datasource
            reservationComboBox.DataSource = Reservations;
            reservationComboBox.DisplayMember = "ReservationID";
        }
        // constructors
        public ParkingSpotOverviewForm(ParkingDatabase db, IClock clock, IMailer mailer)
        {
            Database = db;
            this.OverviewClock = clock;
            Mailer = mailer;

            // get parking spots from the database
            ParkingSpots = Database.GetParkingSpots();

            InitializeComponent();

            // set control values
            parkingSpotComboBox.DataSource = ParkingSpots;
            parkingSpotComboBox.DisplayMember = "ParkingSpotID";
            currentTimeLabel.Text = OverviewClock.Now.ToString("g");
        }
Esempio n. 31
0
 public MailController(IMailer mailer, IQueue queue)
 {
     this._mailer = mailer;
     this._queue  = queue;
 }
Esempio n. 32
0
 public void TearDown()
 {
     _mailer = null;
     _approvalStateChangedRepository = null;
 }
Esempio n. 33
0
 public RegistrationServiceClassic(ICustomerRepository customerRepository, IMailer mailer)
 {
     _customerRepository = customerRepository;
     _mailConfirmer      = mailer;
 }
Esempio n. 34
0
 public OrderHelper(IMailer mailer)
 {
     this._mailer     = mailer;
     _orderDataAccess = new OrderDataAccess();
 }
Esempio n. 35
0
 public CommerceManager(IStoreRepository storeRepository,
                        IPaymentProcessor paymentProcessor,
                        IMailer mailer)
 {
     _StoreRepository = storeRepository;
 }
Esempio n. 36
0
 public StripeEventHandler(IOrganizationRepository organizationRepository, IUserRepository userRepository, IMailer mailer)
 {
     _organizationRepository = organizationRepository;
     _userRepository         = userRepository;
     _mailer = mailer;
 }
Esempio n. 37
0
 public DailySummaryJob(IProjectRepository projectRepository, IOrganizationRepository organizationRepository, IUserRepository userRepository, IStackRepository stackRepository, IEventRepository eventRepository, EventStats stats, IMailer mailer, ILockProvider lockProvider)
 {
     _projectRepository      = projectRepository;
     _organizationRepository = organizationRepository;
     _userRepository         = userRepository;
     _stackRepository        = stackRepository;
     _eventRepository        = eventRepository;
     _stats        = stats;
     _mailer       = mailer;
     _lockProvider = lockProvider;
 }
Esempio n. 38
0
 public void SetUp()
 {
     _urdmsUserService = Substitute.For <IUrdmsUserService>();
     _mailer           = Substitute.For <IMailer>();
     _approvalStateChangedRepository = Substitute.For <IApprovalStateChangedRepository>();
 }
Esempio n. 39
0
 public EmailUserEventSubscriber(IMailer mailer, IOptions <AppSetting> options)
 {
     _mailer       = mailer;
     _optionsValue = options.Value;
 }
Esempio n. 40
0
 public SendNightlyReportsEmailJob(IMailer mailer)
 {
     this._mailer = mailer;
 }
Esempio n. 41
0
 public Handler(IAsyncDocumentSession session, IMailer mailer)
 {
     _session = session;
     _mailer  = mailer;
 }
Esempio n. 42
0
 public MembershipService(ILogger logger, IAuthentication authentication, IRepository <MembershipOption> membershipOptionRepository, IRepository <UserMembership> userMembershipRepository, IRepository <UserCreditPack> userCreditPacksRepository, IRepository <User> usersRepository, IContactService contactService, IMailer mailer, IOptions <WebsiteConfiguration> config, IRepository <PromoCode> promoCodesRepository, IRepository <UserConsultation> userConsultationsRepository)
 {
     _logger                      = logger;
     _authentication              = authentication;
     _membershipOptionRepository  = membershipOptionRepository;
     _userMembershipRepository    = userMembershipRepository;
     _userCreditPacksRepository   = userCreditPacksRepository;
     _usersRepository             = usersRepository;
     _contactService              = contactService;
     _mailer                      = mailer;
     _promoCodesRepository        = promoCodesRepository;
     _userConsultationsRepository = userConsultationsRepository;
     _config                      = config.Value;
     _urlHelper                   = new UrlHelper(HttpContext.Current.Request.RequestContext);
 }
Esempio n. 43
0
 public ErrorEmailer(IMailer mailer, ILog log)
 {
     _mailer = Ensure.That(mailer, "mailer").IsNotNull().Value;
     _log    = Ensure.That(log, "log").IsNotNull().Value;
 }
Esempio n. 44
0
 public AuthController(IOrganizationRepository organizationRepository, IUserRepository userRepository, IMailer mailer, TokenManager tokenManager, DataHelper dataHelper)
 {
     _organizationRepository = organizationRepository;
     _userRepository         = userRepository;
     _mailer       = mailer;
     _tokenManager = tokenManager;
     _dataHelper   = dataHelper;
 }
Esempio n. 45
0
 //  メーラーとしての処理
 public static void FuncMailer(IMailer mailer)
 {
     mailer.SendMail();      //  メールを送信する
     mailer.RecieveMail();   //  メールを受信する
 }
Esempio n. 46
0
 public MailController(IMailer mailer)
 {
     this._mailer = mailer;
 }
Esempio n. 47
0
 public UserController(IUserRepository userRepository, IOrganizationRepository organizationRepository, ICacheClient cacheClient, IMailer mailer, ILoggerFactory loggerFactory, IMapper mapper) : base(userRepository, loggerFactory, mapper)
 {
     _organizationRepository = organizationRepository;
     _cacheClient            = new ScopedCacheClient(cacheClient, "user");
     _mailer = mailer;
 }
Esempio n. 48
0
 public SendSimpleMessage(AnsiConsole console, IMailer mailer,
                          IOptions <TestMessageSettings> settings) : base(console)
 {
     Mailer   = mailer;
     Settings = settings.Value.SimpleMessageSettings;
 }
Esempio n. 49
0
 public AuthController(IOrganizationRepository organizationRepository, IUserRepository userRepository, ITokenRepository tokenRepository, ICacheClient cacheClient, IMailer mailer, ILogger <AuthController> logger)
 {
     _organizationRepository = organizationRepository;
     _userRepository         = userRepository;
     _tokenRepository        = tokenRepository;
     _cacheClient            = new ScopedCacheClient(cacheClient, "auth");
     _mailer = mailer;
     _logger = logger;
 }
Esempio n. 50
0
 public Handler(MongDbContext db, IMailer mailer)
 {
     _db     = db;
     _mailer = mailer;
 }
Esempio n. 51
0
 public UserController(IUserRepository userRepository, IOrganizationRepository organizationRepository, IMailer mailer) : base(userRepository)
 {
     _organizationRepository = organizationRepository;
     _mailer = mailer;
 }
Esempio n. 52
0
 public AuthController(IOrganizationRepository organizationRepository, IUserRepository userRepository, IMailer mailer, TokenManager tokenManager, DataHelper dataHelper, ExceptionlessClient exceptionless)
 {
     _organizationRepository = organizationRepository;
     _userRepository         = userRepository;
     _mailer        = mailer;
     _tokenManager  = tokenManager;
     _dataHelper    = dataHelper;
     _exceptionless = exceptionless;
 }
 public OrganizationNotificationWorkItemHandler(IOrganizationRepository organizationRepository, IUserRepository userRepository, IMailer mailer, ICacheClient cacheClient, ILoggerFactory loggerFactory = null) : base(loggerFactory)
 {
     _organizationRepository = organizationRepository;
     _userRepository         = userRepository;
     _mailer       = mailer;
     _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromHours(1));
 }
Esempio n. 54
0
 public Handler(IMailer mailer, UserManager <User> userManager)
 {
     _mailer      = mailer;
     _userManager = userManager;
 }
Esempio n. 55
0
 public ShoppingCartController(UnitOfWork unitOfWork, IHttpContextAccessor httpContextAccessor, IMailer mailer, IOptions<VNPAY> vnpay)
 {
     _vnpay = vnpay.Value;
     _unitOfWork = unitOfWork;
     _httpContextAccessor = httpContextAccessor;
     _mailer = mailer;
     CheckCookies();
 }
Esempio n. 56
0
 internal async Task <string> RenderAsync(RazorRenderer renderer, IMailer mailer)
 {
     this.Build();
     return(await this.BuildMessage(renderer, mailer).ConfigureAwait(false));
 }
 public OrganizationController(IOrganizationRepository organizationRepository, ICacheClient cacheClient, IEventRepository eventRepository, IUserRepository userRepository, IProjectRepository projectRepository, IQueue <WorkItemData> workItemQueue, BillingManager billingManager, IMailer mailer, IMessagePublisher messagePublisher, IMapper mapper, QueryValidator validator, ILoggerFactory loggerFactory) : base(organizationRepository, mapper, validator, loggerFactory)
 {
     _cacheClient       = cacheClient;
     _eventRepository   = eventRepository;
     _userRepository    = userRepository;
     _projectRepository = projectRepository;
     _workItemQueue     = workItemQueue;
     _billingManager    = billingManager;
     _mailer            = mailer;
     _messagePublisher  = messagePublisher;
 }
Esempio n. 58
0
 public DailySummaryJob(IProjectRepository projectRepository, IOrganizationRepository organizationRepository, IUserRepository userRepository, IEventRepository eventRepository, IMailer mailer, ICacheClient cacheClient, ILoggerFactory loggerFactory = null) : base(loggerFactory)
 {
     _projectRepository      = projectRepository;
     _organizationRepository = organizationRepository;
     _userRepository         = userRepository;
     _eventRepository        = eventRepository;
     _mailer       = mailer;
     _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromHours(1));
 }
Esempio n. 59
0
 public OrganizationController(IOrganizationRepository organizationRepository, ICacheClient cacheClient, IUserRepository userRepository, IProjectRepository projectRepository, IQueue <WorkItemData> workItemQueue, BillingManager billingManager, IMailer mailer, IMessagePublisher messagePublisher, EventStats stats, ILoggerFactory loggerFactory, IMapper mapper) : base(organizationRepository, loggerFactory, mapper)
 {
     _cacheClient       = cacheClient;
     _userRepository    = userRepository;
     _projectRepository = projectRepository;
     _workItemQueue     = workItemQueue;
     _billingManager    = billingManager;
     _mailer            = mailer;
     _messagePublisher  = messagePublisher;
     _stats             = stats;
 }
Esempio n. 60
0
 public DailySummaryJob(EmailOptions emailOptions, IProjectRepository projectRepository, IOrganizationRepository organizationRepository, IUserRepository userRepository, IStackRepository stackRepository, IEventRepository eventRepository, IMailer mailer, ICacheClient cacheClient, BillingPlans plans, ILoggerFactory loggerFactory = null) : base(loggerFactory)
 {
     _emailOptions           = emailOptions;
     _projectRepository      = projectRepository;
     _organizationRepository = organizationRepository;
     _userRepository         = userRepository;
     _stackRepository        = stackRepository;
     _eventRepository        = eventRepository;
     _mailer       = mailer;
     _plans        = plans;
     _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromHours(1));
 }