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; }
public NotificationStream(NotificationInfoContainer notificationModel, Account account) { _notificationModel = notificationModel; _account = account; _status = StreamStateType.UnLoaded; Items = new ObservableCollection<NotificationInfo>(); }
public NotificationManager(Account account) { _account = account; }
public StreamManager(Account account) { _accountModel = account; Streams = new ObservableCollection<Stream>(); }