CQRSSample.Infrastructure.Installers.EventHandlerHelper.GetEventHandlers C# (CSharp) 메소드

GetEventHandlers() 공개 정적인 메소드

public static GetEventHandlers ( ) : IList>.IDictionary
리턴 IList>.IDictionary
        public static IDictionary<Type, IList<Type>> GetEventHandlers()
        {
            var handlers = new Dictionary<Type, IList<Type>>();
            typeof(CustomerListView)
                .Assembly
                .GetExportedTypes()
                .Where(x => x.GetInterfaces().Any(y => y.IsGenericType && y.GetGenericTypeDefinition() == typeof(HandlesEvent<>)))
                .ToList()
                .ForEach(x => AddItem(handlers, x));
            return handlers;
        }