Chess.Data.Seeding.ApplicationDbContextSeeder.GetInstances C# (CSharp) Метод

GetInstances() приватный Метод

Create a list of all classes in the running Assembly having a particular interface that doesn't match the current running class type.
private GetInstances ( ) : List
Результат List
        private List<T> GetInstances<T>()
        {
            return (from t in Assembly.GetExecutingAssembly().GetTypes()
                    where t.GetInterfaces().Contains(typeof(T)) && t.GetConstructor(Type.EmptyTypes) != null && t.Name != this.GetType().Name
                    select (T)Activator.CreateInstance(t)).ToList();
        }
    }
ApplicationDbContextSeeder