Exemplo n.º 1
0
 internal async Task DeleteCompletedAsync(string catalogName, DeleteCompletedEventType eventType)
 {
     await ExecuteWithinLockAsync(
         () =>
         _httpClient.PostAsync(_config.Endpoints.DeleteCompleted, new DeleteCompletedData
     {
         CatalogName = catalogName,
         EventType   = eventType
     }), $"Failed to fire DeleteCompleted for catalog {catalogName}."
         );
 }
Exemplo n.º 2
0
        internal void DeleteCompleted(string catalogName, DeleteCompletedEventType eventType)
        {
            lock (EpiLockObject.Instance)
            {
                try
                {
                    var data = new DeleteCompletedData
                    {
                        CatalogName = catalogName,
                        EventType   = eventType
                    };

                    _httpClient.Post(_config.Endpoints.DeleteCompleted, data);
                }
                catch (Exception exception)
                {
                    IntegrationLogger.Write(LogLevel.Error, $"Failed to fire DeleteCompleted for catalog {catalogName}.", exception);
                    throw;
                }
            }
        }
Exemplo n.º 3
0
 public bool DeleteCompleted(string catalogName, DeleteCompletedEventType eventType, Configuration config)
 {
     lock (SingletonEPiLock.Instance)
     {
         try
         {
             RestEndpoint <DeleteCompletedData> endpoint = new RestEndpoint <DeleteCompletedData>(config.Settings, "DeleteCompleted", this._context);
             DeleteCompletedData data = new DeleteCompletedData
             {
                 CatalogName = catalogName,
                 EventType   = eventType
             };
             string result = endpoint.Post(data);
             _context.Log(LogLevel.Debug, string.Format("DeleteCompleted returned: {0}", result));
             return(true);
         }
         catch (Exception exception)
         {
             _context.Log(LogLevel.Error, string.Format("Failed to fire DeleteCompleted for catalog {0}.", catalogName), exception);
             return(false);
         }
     }
 }