Example #1
0
 private void InitializeStores()
 {
     _stores = new List <string>(_serverCore.ListStores());
     foreach (var s in _stores)
     {
         var  transactions = new HashSet <Guid>();
         Guid last         = Guid.Empty;
         foreach (var txn in _serverCore.GetRecentTransactions(s, 100, TimeSpan.FromDays(7.0)))
         {
             if (txn.TransactionStatus == TransactionStatus.CompletedOk)
             {
                 transactions.Add(txn.JobId);
                 last = txn.JobId;
             }
         }
         _storeInfo.Add(s, new StoreTransactionInfo(transactions, last));
     }
 }
 /// <summary>
 /// List the names of the stores managed by this brightstar instance
 /// </summary>
 /// <returns></returns>
 public IEnumerable <string> ListStores()
 {
     try
     {
         return(_serverCore.ListStores().ToArray());
     }
     catch (Exception ex)
     {
         Logging.LogError(BrightstarEventId.ServerCoreException, "Error Listing Stores");
         throw new BrightstarClientException("Error listing stores." + ex.Message, ex);
     }
 }