private bool ShouldIgnoreProcessor(Type type) { if (EnabledProcessors.FirstOrDefault(p => p.GetType() == type) != null) { logger.LogDebug($"Processor {type} is already registered."); return(true); } if (type.IsAbstract || !type.IsClass || type.IsNotPublic) { logger.LogDebug($"Processor {type} is not a valid, public processor type."); return(true); } if (ProcessorIgnorer != null && ProcessorIgnorer.ShouldIgnoreProcessorFrom(type)) { logger.LogDebug($"Processor of {type} was explicity ignored."); return(true); } return(false); }
public void RegisterProcessor(IProcessor processor) { EnabledProcessors.Add(processor); Builder.MessageQueueMap[processor.GetQueueName()] = processor.GetMessageType(); }