public void GetRegularTypes()
{
var interfaceType = typeof(IRegularPuzzle);
var implementingTypes = AppDomain.CurrentDomain
.GetAssemblies()
.SelectMany(a => a.GetTypes())
.Where(type => interfaceType.IsAssignableFrom(type)
&& !type.IsAbstract
&& !type.IsInterface);
foreach (var type in implementingTypes)
{
PropertyInfo nameProperty = type.GetProperty("Name");
string name = (string)nameProperty.GetValue(null);
_regularTypes[name.ToLower()] = type;
}
}
public void GetRegularTypes()
{
var interfaceType = typeof(IRegularPuzzle);
var implementingTypes = AppDomain.CurrentDomain
.GetAssemblies()
.SelectMany(a => a.GetTypes())
.Where(type => interfaceType.IsAssignableFrom(type)
&& !type.IsAbstract
&& !type.IsInterface);
foreach (var type in implementingTypes)
{
PropertyInfo nameProperty = type.GetProperty("Name");
string name = (string)nameProperty.GetValue(null);
_regularTypes[name.ToLower()] = type;
}
}