public CustomerInvitationService(string serviceBookingAppUrl, int invitationExpiredDays,
                                  string invitationFromPhone,
                                  ISMSGatewayClient smsGatewayClient, IEmailGatewayClient emailGatewayClient,
                                  TelemetryClient telemetryClient, IDealerConfigurationService dealerConfigurationService,
                                  string serviceBookingUrlPlaceholder, string registrationNoPlaceholder)
 {
     if (invitationExpiredDays <= 0)
     {
         throw new ArgumentOutOfRangeException(nameof(invitationExpiredDays));
     }
     _serviceBookingAppUrl         = serviceBookingAppUrl ?? throw new ArgumentNullException(nameof(serviceBookingAppUrl));
     _invitationExpiredDays        = invitationExpiredDays;
     _smsGatewayClient             = smsGatewayClient ?? throw new ArgumentNullException(nameof(smsGatewayClient));
     _invitationFromPhone          = invitationFromPhone ?? throw new ArgumentNullException(nameof(invitationFromPhone));
     _emailGatewayClient           = emailGatewayClient ?? throw new ArgumentNullException(nameof(emailGatewayClient));
     _telemetryClient              = telemetryClient;
     _dealerConfigurationService   = dealerConfigurationService ?? throw new ArgumentNullException(nameof(dealerConfigurationService));
     _serviceBookingUrlPlaceholder = serviceBookingUrlPlaceholder ?? throw new ArgumentNullException(nameof(serviceBookingUrlPlaceholder));
     _registrationNoPlaceholder    = registrationNoPlaceholder ?? throw new ArgumentNullException(nameof(registrationNoPlaceholder));
 }
Esempio n. 2
0
 public EmailService(IEmailGatewayClient emailGatewayClient, string serviceBookingEmail)
 {
     _emailGatewayClient  = emailGatewayClient ?? throw new ArgumentNullException(nameof(emailGatewayClient));
     _serviceBookingEmail = serviceBookingEmail ?? throw new ArgumentNullException(nameof(serviceBookingEmail));
 }