Skip to content

Commit

Permalink
Comments added.
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnetjunkie committed Oct 23, 2017
1 parent 3e80f4b commit e2bdded
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -114,6 +114,8 @@ public IEnumerable<object> GetServices(Type serviceType)

var services = (IEnumerable<object>)this.ServiceProvider.GetService(collectionType);

// NOTE: The contract of IDependencyResolver isn't very clear, but MVC will break when null
// is returned.
return services ?? Enumerable.Empty<object>();
}
}
Expand Down
Expand Up @@ -185,6 +185,8 @@ IEnumerable<object> IDependencyScope.GetServices(Type serviceType)

var services = (IEnumerable<object>)this.ServiceProvider.GetService(collectionType);

// NOTE: The contract of IDependencyScope isn't very clear, but Web API will break when null
// is returned.
return services ?? Enumerable.Empty<object>();
}

Expand Down

0 comments on commit e2bdded

Please sign in to comment.