Get All Types That Implement An Interface In Unity
问题 Please skip to the UPDATE if you would like to just know the solution: I have an application that uses the following code to get and run a number of worker methods var type = typeof(IJob); var types = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(x => x.GetTypes()) .Where(x => x.IsClass && type.IsAssignableFrom(x)); foreach (Type t in types) { IJob obj = Activator.CreateInstance(t) as IJob; obj.Run(); } This code works perfectly as is. However, some of the newer jobs utilize dependency