namespace Connected.Middleware { public static class MiddlewareExtensions { public static List GetImplementedMiddleware(this Type type) { var result = new List(); var interfaces = type.GetInterfaces(); foreach (var i in interfaces) { if (typeof(IMiddleware).FullName is not string fullname) continue; if (i.GetInterface(fullname) is not null) result.Add(i); } return result; } } }