What is the correct term to describe a type which may be either an interface or an abstract, but is not a concrete type?
This question arises as a result of wiring up StructureMap as an IDependencyResolver
for MVC4. I was doing a little refactoring and created this:
public object GetService(Type serviceType)
{
if (serviceType.IsAbstract || serviceType.IsInterface)
{
return GetNonConcreteService(serviceType);
}
return GetConcreteService(serviceType);
}
private object GetConcreteService(Type serviceType)
{
return _container.GetInstance(serviceType);
}
private object GetNonConcreteService(Type serviceType)
{
return _container.TryGetInstance(serviceType);
}
Obviously GetNonConcreteService
is a poor method name, which made me wonder if there would be an equally accurate, yet better, term.