Example #1
0
        public bool DeleteCompleted(DeleteCompletedData data)
        {
            if (_config.RunInRiverEventsHandlers)
            {
                IEnumerable <IInRiverEventsHandler> eventsHandlers = ServiceLocator.Current.GetAllInstances <IInRiverEventsHandler>();
                foreach (IInRiverEventsHandler handler in eventsHandlers)
                {
                    handler.DeleteCompleted(data.CatalogName, data.EventType);
                }

                _logger.Debug("*** DeleteCompleted events with parameters CatalogName={data.CatalogName}, EventType={data.EventType}");
            }

            return(true);
        }
        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;
                }
            }
        }
Example #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);
         }
     }
 }
 public void DeleteCompleted(DeleteCompletedData data)
 {
     DoWithErrorHandling(() => _catalogImporter.DeleteCompleted(data));
 }