Пример #1
0
 public void SetUp()
 {
     settings              = new SMSSettings();
     settings.CountryCode  = "+7";
     settings.NumberLength = 10;
     formatter             = new PhoneNumberFormatter(settings);
 }
 public void SetUp()
 {
     settings = new SMSSettings();
     settings.CountryCode = "+7";
     settings.NumberLength = 10;
     formatter = new PhoneNumberFormatter(settings);
 }
Пример #3
0
 public MobileClientController(IPhoneNumberFormatter phoneNumberFormatter, PartnershipArmService partnershipArmService,
     PartnerService partnerService, NonValidatedRecordsPersistenceService recordsPersistenceService, CurrencyService currencyService,
     PartnershipService partnershipService, IUnitOfWork unitOfWork)
     : base(unitOfWork)
 {
     _phoneNumberFormatter = phoneNumberFormatter;
     _partnershipArmService = partnershipArmService;
     _partnerService = partnerService;
     _recordsPersistenceService = recordsPersistenceService;
     _currencyService = currencyService;
     _partnershipService = partnershipService;
 }
 public TenantsController(ApplicationDbContext context,
                          UserManager <IdentityUser> userManager,
                          RoleManager <IdentityRole> roleManager,
                          IConfiguration configuration,
                          IPhoneNumberFormatter phoneNumberFormatter)
 {
     _dbContext            = context;
     _userManager          = userManager;
     _roleManager          = roleManager;
     _configuration        = configuration;
     _phoneNumberFormatter = phoneNumberFormatter;
 }
Пример #5
0
 public AuthenticationController(
     IConfiguration configuration,
     IPhoneNumberFormatter phoneNumberFormatter,
     SignInManager <IdentityUser> signInManager,
     ApplicationDbContext dbContext,
     UserManager <IdentityUser> userManager
     )
 {
     _configuration        = configuration;
     _phoneNumberFormatter = phoneNumberFormatter;
     _dbContext            = dbContext;
     _userManager          = userManager;
     _signInManager        = signInManager;
 }
Пример #6
0
        // For phone numbers in different countries,
        // we might want to introduce different formatting
        public PhoneNumber(IPhoneNumberFormatter formatter, /**/)
        {
            _formatter = formatter;
        }

        public override string ToString() => _formatter.Format(this);
    }

    // Very small responsibility
    public interface IPhoneNumberFormatter
    {
        string Format(PhoneNumber number);
    }
}

namespace WorkshopPresentation.Ok6
{
    public class PhoneNumber
    {
        // For phone numbers in different countries,
        // we might want to introduce different formatting
        public PhoneNumber(/**/)
        {
        }
Пример #7
0
 public BipscoreSMSMessageSender(IPhoneNumberFormatter formatter)
 {
     _formatter = formatter;
 }
Пример #8
0
 public XWirelessMessageSender(IPhoneNumberFormatter formatter)
 {
     _formatter = formatter;
 }
Пример #9
0
 public BytehandSMSSender(SMSSettings smsSettings, IPhoneNumberFormatter numberFormatter)
 {
     this._smsSettings     = smsSettings;
     this._numberFormatter = numberFormatter;
 }
Пример #10
0
 public BytehandSMSSender(SMSSettings smsSettings, IPhoneNumberFormatter numberFormatter)
 {
     this._smsSettings = smsSettings;
     this._numberFormatter = numberFormatter;
 }