| File: ServiceLookup\RuntimeServiceProviderEngine.cs | Web Access |
| Project: src\runtime\src\libraries\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj (Microsoft.Extensions.DependencyInjection) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Diagnostics.CodeAnalysis; namespace Microsoft.Extensions.DependencyInjection.ServiceLookup { internal sealed class RuntimeServiceProviderEngine : ServiceProviderEngine { public static RuntimeServiceProviderEngine Instance { get; } = new RuntimeServiceProviderEngine(); private RuntimeServiceProviderEngine() { } public override Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite) { return scope => { return CallSiteRuntimeResolver.Instance.Resolve(callSite, scope); }; } } }