Ejemplo n.º 1
0
        public Task RegisterPreprocessorAsync(IEventPreprocessor preprocessor, Type type)
        {
            if (!_preprocessorsDictionary.TryGetValue(type, out List <IEventPreprocessor> handlers))
            {
                handlers = new List <IEventPreprocessor>();
                _preprocessorsDictionary[type] = handlers;
            }

            handlers.Add(preprocessor);
            return(Task.CompletedTask);
        }
Ejemplo n.º 2
0
 public Task UnregisterPreprocessorAsync(IEventPreprocessor preprocessor, Type type) => Task.CompletedTask;
Ejemplo n.º 3
0
 public Task UnregisterPreprocessorAsync <T>(IEventPreprocessor preprocessor) where T : IEventNotification => UnregisterPreprocessorAsync(preprocessor, typeof(T));