using GreenTree.Nachtragsmanagement.Core.Plugins; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GreenTree.Nachtragsmanagement.Services.Misc { public class NotificationService : INotificationService { /// /// Searches for all implementations of the INotificationPlugin /// public IEnumerable GetNotificationPlugins() { var type = typeof(INotificationPlugin); var types = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(s => s.GetTypes()) .Where(p => type.IsAssignableFrom(p) && !p.IsInterface) .OfType(); return types; } } }