public async Task<bool> Initialize() { await Task.WhenAll(Accounts.Select(item => item.Deactivate()).ToArray()); Accounts.Clear(); try { var cookieGetter = CookieGetter.CreateInstance(BrowserType.GoogleChrome); if (cookieGetter.Status.IsAvailable == false) return false; foreach (var item in await PlatformClient.Factory.ImportFrom(cookieGetter).ConfigureAwait(false)) { var account = new Account(item); Accounts.Add(account); } OnInitialized(new EventArgs()); return true; } catch (FailToOperationException) { if (System.Diagnostics.Debugger.IsAttached) System.Diagnostics.Debugger.Break(); return false; } }
public StreamManager(Account account) { _accountModel = account; Streams = new ObservableCollection<Stream>(); }
public NotificationManager(Account account) { _account = account; }
public NotificationStream(NotificationInfoContainer notificationModel, Account account) { _notificationModel = notificationModel; _account = account; Status = StreamStateType.UnLoaded; Items = new ObservableCollection<NotificationInfo>(); }