Esempio n. 1
0
 public void setup()
 {
     wait         = new WebDriverWait(driver, TimeSpan.FromSeconds(60));
     homepage     = new HomePageBase(driver);
     products     = new ProductBase(driver);
     registration = new RegistrationBase(driver);
 }
Esempio n. 2
0
        public InsuranceNeusoft(string centerName)
        {
            TransactionFactory  transactionFactory  = new TransactionFactory();
            RegistrationFactory registrationFactory = new RegistrationFactory();

            transaction  = transactionFactory.CreateTransaction(centerName);
            registration = registrationFactory.CreateRegistration(centerName);
            center       = centerName;
        }
Esempio n. 3
0
        /// <summary>
        ///     Associate a category to filter the push notifications.
        /// </summary>
        /// <param name="categories"></param>
        /// <returns></returns>
        public async Task SetCategories(List <string> categories)
        {
            if (Registration == null)
            {
                Registration = CreateRegistration();
            }
            var config = ReadConfig();

            config.Categories = categories;
            await Registration.UpdateConfig(config);
        }
Esempio n. 4
0
        /// <summary>
        ///     Associate an alias to filter push notifications.
        /// </summary>
        /// <param name="alias"></param>
        /// <returns></returns>
        public async Task SetAlias(string alias)
        {
            if (Registration == null)
            {
                Registration = CreateRegistration();
            }

            var config = ReadConfig();

            config.Alias = alias;
            await Registration.UpdateConfig(config);
        }
Esempio n. 5
0
        public RegistrationBase  CreateRegistration(string centerName)
        {
            switch (centerName)
            {
            case "ZhengZhou":
                registration = new RegistrationZhengZhou();
                break;

            case "ChangGe":
                registration = new RegistrationChangGe();
                break;

            default:
                break;
            }
            return(registration);
        }
Esempio n. 6
0
        /// <summary>
        ///     Method to register to push notifications.
        /// </summary>
        /// <param name="handleNotification">Attached handler triggered when push notifications are received.</param>
        /// <returns></returns>
        public async Task Register(EventHandler <PushReceivedEvent> handleNotification)
        {
            if (Registration == null)
            {
                Registration = CreateRegistration();
            }

            Registration.PushReceivedEvent += handleNotification;

            try
            {
                var config = ReadConfig();
                await Registration.Register(config);
            }
            catch (SerializationException)
            {
                _logger.e(LogTag,
                          "push configuration not found skipping push register, update fhconfig with UPS details", null);
            }
        }
 private void Add(string name, RegistrationBase registration)
 {
     registrations.GetOrAdd(name, k => new ConcurrentBag<RegistrationBase>()).Add(registration);
 }
 public SubRegistration(string name, RegistrationBase next, Func <INotifyPropertyChanged, INotifyPropertyChanged> getter)
 {
     this.name   = name;
     this.next   = next;
     this.getter = getter;
 }