Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
 public StreamManager(Account account)
 {
     _accountModel = account;
     Streams = new ObservableCollection<Stream>();
 }
Ejemplo n.º 3
0
 public NotificationManager(Account account) { _account = account; }
Ejemplo n.º 4
0
 public NotificationStream(NotificationInfoContainer notificationModel, Account account)
 {
     _notificationModel = notificationModel;
     _account = account;
     Status = StreamStateType.UnLoaded;
     Items = new ObservableCollection<NotificationInfo>();
 }