public void Init(string twitterId, string facebookId, string name, string email)
        {
            string countryISOCode = new RegionInfo(CultureProvider.CultureInfo.LCID).TwoLetterISORegionName;

            PhoneNumber = new PhoneNumberModel()
            {
                Country = new CountryISOCode(countryISOCode)
            };

            Data = new RegisterAccount
            {
                FacebookId = facebookId,
                TwitterId  = twitterId,
                Name       = name,
                Email      = email,
                Country    = PhoneNumber.Country
            };
                        #if DEBUG
            // If we are using facebook id or twitterid we should not override the values provided by facebook or twitter.
            if (!facebookId.HasValue() && !twitterId.HasValue())
            {
                Data.Email      = "*****@*****.**";
                Data.Name       = "test account";
                Data.Country    = new CountryISOCode("CA");
                Data.Password   = "******";
                ConfirmPassword = "******";
                return;
            }

            Data.Phone              = "5147777777";
            PhoneNumber.Country     = Data.Country;
            PhoneNumber.PhoneNumber = Data.Phone;
                        #endif
        }
 public AccountConfirmationViewModel(IRegisterWorkflowService registerService, IAccountServiceClient accountServiceClient, ILogger logger)
 {
     _registerService      = registerService;
     _accountServiceClient = accountServiceClient;
     _logger     = logger;
     PhoneNumber = new PhoneNumberModel();
 }
示例#3
0
        public RideSettingsViewModel(IAccountService accountService,
                                     IVehicleTypeService vehicleTypeService,
                                     IPaymentService paymentService,
                                     IAccountPaymentService accountPaymentService,
                                     IOrderWorkflowService orderWorkflowService,
                                     INetworkRoamingService networkRoamingService)
        {
            _vehicleTypeService    = vehicleTypeService;
            _orderWorkflowService  = orderWorkflowService;
            _paymentService        = paymentService;
            _accountPaymentService = accountPaymentService;
            _accountService        = accountService;
            _networkRoamingService = networkRoamingService;

            _payments = new ListItem[0];

            PhoneNumber = new PhoneNumberModel();

            Observe(_accountService.GetAndObservePaymentsList(), paymentTypes => PaymentTypesChanged(paymentTypes).FireAndForget());
        }