SingletonDependencyResolver<T>.GetServices(Type, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to resolve a dependencies for a given contract type and optionally a given key. If the resolver cannot resolve the dependency then it must return an empty enumeration and not throw. This method differs from GetService(Type, Object) in that it returns all registered services for the given type and key combination.
public System.Collections.Generic.IEnumerable<object> GetServices (Type type, object key);
abstract member GetServices : Type * obj -> seq<obj>
override this.GetServices : Type * obj -> seq<obj>
Parameters
- type
- Type
The interface or abstract base class that defines the dependency to be resolved. Every returned object is expected to be an instance of this type.
- key
- Object
Optionally, the key of the dependency to be resolved. This may be null for dependencies that are not differentiated by key.
Returns
All services that resolve the dependency, which must be instances of the given contract type, or an empty enumeration if the dependency could not be resolved.
Implements
Applies to
Entity Framework