src/Shared/EntityFramework/Infrastructure/DependencyResolution/ResolverChain.cs
// <summary>
// Calls GetService on each resolver in the chain in turn and returns the first non-null value
// or returns null if all GetService calls return null. Resolvers are called in the reverse order
// to which they are added so that the most recently added resolvers get a chance to resolve first.
// </summary>
// <param name="type">The type of service to resolve.</param>
// <param name="key">
// An optional key value which may be used to determine the service instance to create.
// </param>
// <returns>The resolved service, or null if no resolver in the chain could resolve the service.</returns>
Calls GetService on each resolver in the chain in turn and returns the first non-null value
or returns null if all GetService calls return null. Resolvers are called in the reverse order
to which they are added so that the most recently added resolvers get a chance to resolve first.
Calls GetService on each resolver in the chain in turn and returns the first non - null value or returns null if all GetService calls return null . Resolvers are called in the reverse order to which they are added so that the most recently added resolvers get a chance to resolve first .
public virtual object GetService(Type type, object key)
        {
            return _resolversSnapshot
                .Select(r => r.GetService(type, key))
                .FirstOrDefault(s => s != null);
        }
public virtual object GetService ( Type type , object key ) { return _resolversSnapshot . Select ( r => r . GetService ( type , key ) ) . FirstOrDefault ( s => s != null ) ; }
Calls GetService on each resolver in the chain in turn and returns the first non-null value
or returns null if all GetService calls return null.
Calls GetService on each resolver in the chain in turn and returns the first non - null value or returns null if all GetService calls return null .
The resolved service, or null if no resolver in the chain could resolve the service.
The resolved service or null if no resolver in the chain could resolve the service .
type
Type
The type of service to resolve.
The type of service to resolve .
key
object
An optional key value which may be used to determine the service instance to create.
An optional key value which may be used to determine the service instance to create .