public void SetUp() { settings = new SMSSettings(); settings.CountryCode = "+7"; settings.NumberLength = 10; formatter = new PhoneNumberFormatter(settings); }
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; }
public AuthenticationController( IConfiguration configuration, IPhoneNumberFormatter phoneNumberFormatter, SignInManager <IdentityUser> signInManager, ApplicationDbContext dbContext, UserManager <IdentityUser> userManager ) { _configuration = configuration; _phoneNumberFormatter = phoneNumberFormatter; _dbContext = dbContext; _userManager = userManager; _signInManager = signInManager; }
// 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(/**/) { }
public BipscoreSMSMessageSender(IPhoneNumberFormatter formatter) { _formatter = formatter; }
public XWirelessMessageSender(IPhoneNumberFormatter formatter) { _formatter = formatter; }
public BytehandSMSSender(SMSSettings smsSettings, IPhoneNumberFormatter numberFormatter) { this._smsSettings = smsSettings; this._numberFormatter = numberFormatter; }