public virtual object GetService(Type serviceType)
{
if (serviceType == null)
{
throw new ArgumentNullException("serviceType");
}
IList<Func<object>> activators;
if (_resolvers.TryGetValue(serviceType, out activators))
{
if (activators.Count == 0)
{
return null;
}
if (activators.Count > 1)
{
throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_MultipleActivatorsAreaRegisteredCallGetServices, serviceType.FullName));
}
return Track(activators[0]);
}
return null;
}