2 instantiations of ServiceProviderEngineScope
Microsoft.Extensions.DependencyInjection (2)
ServiceProvider.cs (2)
55Root = new ServiceProviderEngineScope(this, isRootScope: true); 244return new ServiceProviderEngineScope(this, isRootScope: false);
51 references to ServiceProviderEngineScope
Microsoft.Extensions.DependencyInjection (51)
ServiceLookup\CallSiteRuntimeResolver.cs (4)
22public object? Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) 82ServiceProviderEngineScope serviceProviderEngine = context.Scope.RootProvider.Root; 112private object? VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) 194public ServiceProviderEngineScope Scope { get; set; }
ServiceLookup\CompiledServiceProviderEngine.cs (1)
23public override Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite) => ResolverBuilder.Build(callSite);
ServiceLookup\DynamicServiceProviderEngine.cs (1)
21public override Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite)
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (18)
17private static readonly ParameterExpression ScopeParameter = Expression.Parameter(typeof(ServiceProviderEngineScope)); 25typeof(ServiceProviderEngineScope).GetProperty(nameof(ServiceProviderEngineScope.ResolvedServices), BindingFlags.Instance | BindingFlags.NonPublic)!)); 31typeof(ServiceProviderEngineScope).GetProperty(nameof(ServiceProviderEngineScope.Sync), BindingFlags.Instance | BindingFlags.NonPublic)!)); 43private readonly ServiceProviderEngineScope _rootScope; 45private readonly ConcurrentDictionary<ServiceCacheKey, Func<ServiceProviderEngineScope, object>> _scopeResolverCache; 47private readonly Func<ServiceCacheKey, ServiceCallSite, Func<ServiceProviderEngineScope, object>> _buildTypeDelegate; 52_scopeResolverCache = new ConcurrentDictionary<ServiceCacheKey, Func<ServiceProviderEngineScope, object>>(); 56public Func<ServiceProviderEngineScope, object> Build(ServiceCallSite callSite) 71public Func<ServiceProviderEngineScope, object> BuildNoCache(ServiceCallSite callSite) 73Expression<Func<ServiceProviderEngineScope, object>> expression = BuildExpression(callSite); 78private Expression<Func<ServiceProviderEngineScope, object>> BuildExpression(ServiceCallSite callSite) 82return Expression.Lambda<Func<ServiceProviderEngineScope, object>>( 91return Expression.Lambda<Func<ServiceProviderEngineScope, object>>( 209Func<ServiceProviderEngineScope, object> lambda = Build(callSite); 283typeof(ServiceProviderEngineScope) 284.GetProperty(nameof(ServiceProviderEngineScope.IsRootScope), BindingFlags.Instance | BindingFlags.Public)!),
ServiceLookup\Expressions\ExpressionsServiceProviderEngine.cs (1)
18public override Func<ServiceProviderEngineScope, object> RealizeService(ServiceCallSite callSite)
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (12)
18private static readonly MethodInfo ResolvedServicesGetter = typeof(ServiceProviderEngineScope).GetProperty( 19nameof(ServiceProviderEngineScope.ResolvedServices), BindingFlags.Instance | BindingFlags.NonPublic)!.GetMethod!; 21private static readonly MethodInfo ScopeLockGetter = typeof(ServiceProviderEngineScope).GetProperty( 22nameof(ServiceProviderEngineScope.Sync), BindingFlags.Instance | BindingFlags.NonPublic)!.GetMethod!; 24private static readonly MethodInfo ScopeIsRootScope = typeof(ServiceProviderEngineScope).GetProperty( 25nameof(ServiceProviderEngineScope.IsRootScope), BindingFlags.Instance | BindingFlags.Public)!.GetMethod!; 47public Func<ServiceProviderEngineScope, object?> Lambda; 53private readonly ServiceProviderEngineScope _rootScope; 66public Func<ServiceProviderEngineScope, object?> Build(ServiceCallSite callSite) 93parameterTypes: new[] { typeof(ILEmitResolverBuilderRuntimeContext), typeof(ServiceProviderEngineScope) }, 128Lambda = (Func<ServiceProviderEngineScope, object?>)dynamicMethod.CreateDelegate(typeof(Func<ServiceProviderEngineScope, object?>), runtimeContext),
ServiceLookup\ILEmit\ILEmitServiceProviderEngine.cs (1)
19public override Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite)
ServiceLookup\RuntimeServiceProviderEngine.cs (1)
15public override Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite)
ServiceLookup\ServiceLookupHelpers.cs (2)
20internal static readonly MethodInfo CaptureDisposableMethodInfo = typeof(ServiceProviderEngineScope) 21.GetMethod(nameof(ServiceProviderEngineScope.CaptureDisposable), LookupFlags)!;
ServiceLookup\ServiceProviderEngine.cs (1)
10public abstract Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite);
ServiceLookup\ServiceProviderEngineScope.cs (2)
248private readonly ServiceProviderEngineScope _serviceProvider; 250public ServiceProviderEngineScopeDebugView(ServiceProviderEngineScope serviceProvider)
ServiceProvider.cs (7)
35internal ServiceProviderEngineScope Root { get; } 114internal object? GetKeyedService(Type serviceType, object? serviceKey, ServiceProviderEngineScope serviceProviderEngineScope) 127internal object GetRequiredKeyedService(Type serviceType, object? serviceKey, ServiceProviderEngineScope serviceProviderEngineScope) 172internal object? GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) 222Func<ServiceProviderEngineScope, object?> realizedService = _engine.RealizeService(callSite); 228internal void ReplaceServiceAccessor(ServiceCallSite callSite, Func<ServiceProviderEngineScope, object?> accessor) 291public Func<ServiceProviderEngineScope, object?>? RealizedService { get; set; }