Esempio n. 1
0
        public async Task<bool> Activate()
        {
            await Task.WhenAll(Accounts.Select(item => item.Deactivate()).ToArray());
            Accounts.Clear();

            //var cookieGetter = new IEBrowserManager().CreateIEPMCookieGetter();
            var cookieGetter = new GoogleChromeBrowserManager().CreateCookieImporters().First();
            if (cookieGetter.IsAvailable == false)
                return false;

            IPlatformClientBuilder[] builders;
            try { builders = await PlatformClient.Factory.ImportFrom(cookieGetter); }
            catch (FailToOperationException) { return false; }
            foreach (var item in builders)
            {
                var account = new Account(item);
                Accounts.Add(account);
            }
            return true;
        }
Esempio n. 2
0
 public NotificationStream(NotificationInfoContainer notificationModel, Account account)
 {
     _notificationModel = notificationModel;
     _account = account;
     _status = StreamStateType.UnLoaded;
     Items = new ObservableCollection<NotificationInfo>();
 }
Esempio n. 3
0
 public NotificationManager(Account account) { _account = account; }
Esempio n. 4
0
 public StreamManager(Account account)
 {
     _accountModel = account;
     Streams = new ObservableCollection<Stream>();
 }