Exemple #1
0
        public CustomerRepository(IPhoneNumberValidator phoneNumberValidator)
        {
            if (phoneNumberValidator == null)
            {
                throw new ArgumentNullException(nameof(phoneNumberValidator));
            }

            _phoneNumberValidator = phoneNumberValidator;
        }
 public OrdersService(
     IOrdersRepository ordersRepository,
     IPostamatsRepository postamatsRepository,
     IPhoneNumberValidator phoneNumberValidator,
     IPostamatNumberValidator postamatNumberValidator
     )
 {
     _ordersRepository        = ordersRepository;
     _postamatsRepository     = postamatsRepository;
     _phoneNumberValidator    = phoneNumberValidator;
     _postamatNumberValidator = postamatNumberValidator;
 }
        public SmsVitriniClient(string userName, string password, TimeSpan timeOut, IPhoneNumberValidator phoneNumberValidator, IJsonSerializer serializer)
        {
            if (String.IsNullOrEmpty(userName))
            {
                throw new ArgumentNullException("userName");
            }

            if (String.IsNullOrEmpty(password))
            {
                throw new ArgumentNullException("password");
            }

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

            _userName             = userName;
            _password             = password;
            _timeOut              = timeOut;
            _serializer           = serializer;
            _phoneNumberValidator = phoneNumberValidator;
        }
 public SmsVitriniClient(string userName, string password, TimeSpan timeOut, IPhoneNumberValidator phoneNumberValidator)
     : this(userName, password, timeOut, phoneNumberValidator, new SimpleJsonSerializer())
 {
 }
Exemple #5
0
 public RolodexValidator(IPhoneNumberValidator phoneNumberValidator)
 {
     PhoneNumberValidator = phoneNumberValidator;
 }