private static void ProcessEventListenerAssemblyAttributes(EventListenerContributor contributor, IEnumerable <EventListenerAssemblyAttribute> attributes)
{
foreach (var attribute in attributes)
{
if (attribute.Assembly != null)
{
foreach (var type in GetExportedTypesFromAssembly(attribute.Assembly))
{
if (EventListenerContributor.GetEventTypes(type).Length > 0)
{
var config = contributor.Get(type) ?? contributor.Add(new EventListenerConfig(type));
ConfigureEventListener(attribute, config);
}
}
}
if (attribute.Type != null)
{
var config = contributor.Get(attribute.Type) ?? contributor.Add(new EventListenerConfig(attribute.Type));
ConfigureEventListener(attribute, config);
}
}
}