public void NotifyChanges(object sender, PhoneNumberChangedEventArgs e) { _country = e.Country; if (e.PhoneNumber != null) { _phoneNumber = e.PhoneNumber; } }
public override object Convert(object value, Type targetType, object parameter, CultureInfo culture) { CountryISOCode countryISOCode = value as CountryISOCode; if (countryISOCode != null) { return("+" + CountryCode.GetCountryCodeByIndex(CountryCode.GetCountryCodeIndexByCountryISOCode(countryISOCode)).CountryDialCode); } return(null); }
public async Task GetConfirmationCode(CountryISOCode countryCode, string phoneNumber) { if (countryCode != null && phoneNumber.HasValue()) { await _accountServiceClient.GetConfirmationCode(new ConfirmationCodeRequest { Email = _account.Email, CountryCode = countryCode.Code, PhoneNumber = phoneNumber }); } else { throw new ArgumentException("countryCode and phoneNumber should not be null or empty"); } }
public Account(Guid id, string name, CountryISOCode country, string phone, string email, string payBack, string facebookId = null, string twitterId = null, string language = null, bool isAdmin = false) : this(id) { if (Params.Get(name, country.Code, phone, email).Any(p => p.IsNullOrEmpty())) { throw new InvalidOperationException("Missing required fields"); } Update(new AccountRegistered { SourceId = id, Name = name, Email = email, Country = country, Phone = phone, TwitterId = twitterId, FacebookId = facebookId, Language = language, IsAdmin = isAdmin, PayBack = payBack }); }
public Account(Guid id, string name, CountryISOCode country, string phone, string email, byte[] password, string confirmationToken, string language, bool accountActivationDisabled, string payBack, bool isAdmin = false) : this(id) { if (Params.Get(name, country.SelectOrDefault(countryCode => countryCode.Code), phone, email, confirmationToken).Any(p => p.IsNullOrEmpty()) || (password == null)) { throw new InvalidOperationException("Missing required fields"); } Update(new AccountRegistered { SourceId = id, Name = name, Email = email, Country = country, Phone = phone, Password = password, ConfirmationToken = confirmationToken, Language = language, IsAdmin = isAdmin, AccountActivationDisabled = accountActivationDisabled, PayBack = payBack }); }
/// <summary> /// Specifies the usage location for the user. Required for users that /// will be assigned licenses due to legal requirement to check for /// availability of services in countries. /// </summary> /// <param name="usageLocation">A two letter country code (ISO standard 3166).</param> /// <return>The next stage of user update.</return> ActiveDirectoryUser.Update.IUpdate ActiveDirectoryUser.Update.IWithUsageLocationBeta.WithUsageLocation(CountryISOCode usageLocation) { return(this.WithUsageLocation(usageLocation)); }
/// <summary> /// Specifies the usage location for the user. Required for users that /// will be assigned licenses due to legal requirement to check for /// availability of services in countries. /// </summary> /// <param name="usageLocation">A two letter country code (ISO standard 3166).</param> /// <return>The next stage of user definition.</return> ActiveDirectoryUser.Definition.IWithCreate ActiveDirectoryUser.Definition.IWithUsageLocationBeta.WithUsageLocation(CountryISOCode usageLocation) { return(this.WithUsageLocation(usageLocation)); }
public CountryISOCode UsageLocation() { return(CountryISOCode.Parse(Inner.UsageLocation)); }
public ActiveDirectoryUserImpl WithUsageLocation(CountryISOCode usageLocation) { createParameters.UsageLocation = usageLocation.Value; updateParameters.UsageLocation = usageLocation.Value; return(this); }
/// <summary> /// Specifies the country of the address. /// </summary> /// <param name="country">The country of the address.</param> /// <return>The next stage of the definition.</return> DomainContact.Definition.IWithPostalCode <AppServiceDomain.Definition.IWithCreate> DomainContact.Definition.IWithCountry <AppServiceDomain.Definition.IWithCreate> .WithCountry(CountryISOCode country) { return(this.WithCountry(country) as DomainContact.Definition.IWithPostalCode <AppServiceDomain.Definition.IWithCreate>); }
///GENMHASH:A2410FFAF22DDB24E8AAB7622E498164:3400BF47ADE77DCA1540472C1E1BB0BB public DomainContactImpl WithCountry(CountryISOCode country) { Inner.AddressMailing.Country = country.ToString(); return(this); }
public void AddOrUpdateCreditCard(string creditCardCompany, Guid creditCardId, string nameOnCard, string last4Digits, string expirationMonth, string expirationYear, string token, string label, string zipCode, string streetNumber, string streetName, string email, string phone, CountryISOCode country) { Update(new CreditCardAddedOrUpdated { CreditCardCompany = creditCardCompany, CreditCardId = creditCardId, NameOnCard = nameOnCard, Last4Digits = last4Digits, ExpirationMonth = expirationMonth, ExpirationYear = expirationYear, Token = token, Label = label, ZipCode = zipCode, StreetName = streetName, StreetNumber = streetNumber, Email = email, Phone = phone, Country = country }); }
public CreditCardDetails() { Country = new CountryISOCode(); }
public BookingSettings() { Country = new CountryISOCode(); }
public static bool IsPossibleNumber(CountryISOCode countryCode, string phoneNumber) { var country = CountryCode.GetCountryCodeByIndex(CountryCode.GetCountryCodeIndexByCountryISOCode(countryCode)); return(IsPossibleNumber(country, phoneNumber)); }