7 interfaces inheriting from IServiceProvider
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Maui (2)
System.ComponentModel.Primitives (1)
System.ComponentModel.TypeConverter (3)
79 implementations of IServiceProvider
Aspire.Hosting (1)
Aspire.Hosting.Tests (1)
Microsoft.AspNetCore.Components.Authorization.Tests (1)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.Performance (1)
Microsoft.AspNetCore.Components.Tests (1)
Microsoft.AspNetCore.Components.Web.Tests (1)
Microsoft.AspNetCore.Diagnostics.Tests (1)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Hosting.Tests (2)
Microsoft.AspNetCore.Http.Abstractions (2)
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Http.Extensions.Tests (3)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Results.Tests (2)
Microsoft.AspNetCore.Http.Tests (1)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
Microsoft.AspNetCore.Mvc.Core.Test (1)
Microsoft.AspNetCore.OpenApi.Tests (1)
Microsoft.AspNetCore.Owin (1)
Microsoft.AspNetCore.Routing (2)
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
Microsoft.AspNetCore.Routing.Tests (7)
Microsoft.AspNetCore.Tests (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.Extensions.DependencyInjection (2)
Microsoft.Maui (1)
Microsoft.Maui.Controls (1)
Microsoft.Maui.Controls.Xaml (1)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
MockHostTypes (1)
PresentationFramework (16)
ReachFramework (1)
System.ComponentModel.Annotations (1)
System.ComponentModel.TypeConverter (2)
System.Windows.Forms (2)
System.Windows.Forms.Design (5)
System.Xaml (1)
System.Xaml.Tests (4)
2643 references to IServiceProvider
Aspire.Azure.Messaging.EventHubs (1)
Aspire.Components.Common.Tests (1)
Aspire.Confluent.Kafka (38)
AspireKafkaConsumerExtensions.cs (19)
25/// <inheritdoc cref="AddKafkaConsumer{TKey,TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider,ConsumerBuilder{TKey,TValue}}?)"/>
29/// <inheritdoc cref="AddKafkaConsumer{TKey,TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider,ConsumerBuilder{TKey,TValue}}?)"/>
33/// <inheritdoc cref="AddKafkaConsumer{TKey,TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider,ConsumerBuilder{TKey,TValue}}?)"/>
37/// <inheritdoc cref="AddKafkaConsumer{TKey,TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider,ConsumerBuilder{TKey,TValue}}?)"/>
38public static void AddKafkaConsumer<TKey, TValue>(this IHostApplicationBuilder builder, string connectionName, Action<IServiceProvider, ConsumerBuilder<TKey, TValue>>? configureBuilder)
41/// <inheritdoc cref="AddKafkaConsumer{TKey,TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider,ConsumerBuilder{TKey,TValue}}?)"/>
53public static void AddKafkaConsumer<TKey, TValue>(this IHostApplicationBuilder builder, string connectionName, Action<KafkaConsumerSettings>? configureSettings, Action<IServiceProvider, ConsumerBuilder<TKey, TValue>>? configureBuilder)
56/// <inheritdoc cref="AddKeyedKafkaConsumer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider, ConsumerBuilder{TKey, TValue}}?)"/>
63/// <inheritdoc cref="AddKeyedKafkaConsumer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider, ConsumerBuilder{TKey, TValue}}?)"/>
70/// <inheritdoc cref="AddKeyedKafkaConsumer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider, ConsumerBuilder{TKey, TValue}}?)"/>
77/// <inheritdoc cref="AddKeyedKafkaConsumer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider, ConsumerBuilder{TKey, TValue}}?)"/>
78public static void AddKeyedKafkaConsumer<TKey, TValue>(this IHostApplicationBuilder builder, string name, Action<IServiceProvider, ConsumerBuilder<TKey, TValue>>? configureBuilder)
84/// <inheritdoc cref="AddKeyedKafkaConsumer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaConsumerSettings}?, Action{IServiceProvider, ConsumerBuilder{TKey, TValue}}?)"/>
99public static void AddKeyedKafkaConsumer<TKey, TValue>(this IHostApplicationBuilder builder, string name, Action<KafkaConsumerSettings>? configureSettings, Action<IServiceProvider, ConsumerBuilder<TKey, TValue>>? configureBuilder)
108Action<IServiceProvider, ConsumerBuilder<TKey, TValue>>? configureBuilder,
186IServiceProvider serviceProvider, KafkaConsumerSettings settings, string? key = null)
194private static InstrumentedConsumerBuilder<TKey, TValue> CreateConsumerBuilder<TKey, TValue>(IServiceProvider serviceProvider, Action<IServiceProvider, ConsumerBuilder<TKey, TValue>>? configureBuilder, KafkaConsumerSettings settings)
264private static Action<IServiceProvider, ConsumerBuilder<TKey, TValue>>? Wrap<TKey, TValue>(Action<ConsumerBuilder<TKey, TValue>>? action)
AspireKafkaProducerExtensions.cs (19)
25/// <inheritdoc cref="AddKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
29/// <inheritdoc cref="AddKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
33/// <inheritdoc cref="AddKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
37/// <inheritdoc cref="AddKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
38public static void AddKafkaProducer<TKey, TValue>(this IHostApplicationBuilder builder, string connectionName, Action<IServiceProvider, ProducerBuilder<TKey, TValue>>? configureBuilder)
41/// <inheritdoc cref="AddKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
53public static void AddKafkaProducer<TKey, TValue>(this IHostApplicationBuilder builder, string connectionName, Action<KafkaProducerSettings>? configureSettings, Action<IServiceProvider, ProducerBuilder<TKey, TValue>>? configureBuilder)
56/// <inheritdoc cref="AddKeyedKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
63/// <inheritdoc cref="AddKeyedKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
70/// <inheritdoc cref="AddKeyedKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
77/// <inheritdoc cref="AddKeyedKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
78public static void AddKeyedKafkaProducer<TKey, TValue>(this IHostApplicationBuilder builder, string name, Action<IServiceProvider, ProducerBuilder<TKey, TValue>>? configureBuilder)
84/// <inheritdoc cref="AddKeyedKafkaProducer{TKey, TValue}(IHostApplicationBuilder, string, Action{KafkaProducerSettings}?, Action{IServiceProvider, ProducerBuilder{TKey, TValue}}?)"/>
99public static void AddKeyedKafkaProducer<TKey, TValue>(this IHostApplicationBuilder builder, string name, Action<KafkaProducerSettings>? configureSettings, Action<IServiceProvider, ProducerBuilder<TKey, TValue>>? configureBuilder)
108Action<IServiceProvider, ProducerBuilder<TKey, TValue>>? configureBuilder,
186IServiceProvider serviceProvider, KafkaProducerSettings settings, string? key = null)
194private static InstrumentedProducerBuilder<TKey, TValue> CreateProducerBuilder<TKey, TValue>(IServiceProvider serviceProvider, Action<IServiceProvider, ProducerBuilder<TKey, TValue>>? configureBuilder, KafkaProducerSettings settings)
264private static Action<IServiceProvider, ProducerBuilder<TKey, TValue>>? Wrap<TKey, TValue>(Action<ProducerBuilder<TKey, TValue>>? action)
Aspire.Confluent.Kafka.Tests (2)
Aspire.Dashboard (1)
Aspire.Elastic.Clients.Elasticsearch (1)
Aspire.Hosting (49)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Testing (2)
Aspire.Hosting.Tests (8)
Aspire.Milvus.Client (1)
Aspire.MongoDB.Driver (1)
Aspire.NATS.Net (17)
AspireNatsClientExtensions.cs (17)
24/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
28/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
32/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
36/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
37public static void AddNatsClient(this IHostApplicationBuilder builder, string connectionName, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions)
40/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
54public static void AddNatsClient(this IHostApplicationBuilder builder, string connectionName, Action<NatsClientSettings>? configureSettings, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions)
59/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
66/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
73/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
80/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
81public static void AddKeyedNatsClient(this IHostApplicationBuilder builder, string name, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions)
87/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/>
105public static void AddKeyedNatsClient(this IHostApplicationBuilder builder, string name, Action<NatsClientSettings>? configureSettings, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions)
111private static void AddNatsClientInternal(this IHostApplicationBuilder builder, string connectionName, object? serviceKey, Action<NatsClientSettings>? configureSettings, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions)
129NatsConnection Factory(IServiceProvider provider)
200private static Func<IServiceProvider, NatsOpts, NatsOpts>? Wrap(Func<NatsOpts, NatsOpts>? func)
Aspire.NATS.Net.Tests (1)
Aspire.OpenAI (3)
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
Aspire.Qdrant.Client (1)
Aspire.RabbitMQ.Client (1)
Aspire.StackExchange.Redis (8)
Aspire.StackExchange.Redis.DistributedCaching (3)
Aspire.StackExchange.Redis.OutputCaching (3)
BasicWebSite (5)
BasketService (1)
CatalogDb (1)
ConfigurationSchemaGenerator.Tests (1)
CustomEncryptorSample (3)
DatabaseMigration.MigrationService (1)
DesignSurfaceExt (3)
GenericHostWebSite (1)
GetDocument.Insider (6)
InMemory.FunctionalTests (1)
IStartupInjectionAssemblyName (1)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore (5)
Microsoft.AspNetCore.Antiforgery.Test (4)
Microsoft.AspNetCore.Authentication.BearerToken (2)
Microsoft.AspNetCore.Authentication.Test (1)
Microsoft.AspNetCore.Authorization.Policy (5)
Microsoft.AspNetCore.Authorization.Test (3)
Microsoft.AspNetCore.Components (33)
CascadingValueServiceCollectionExtensions.cs (6)
23this IServiceCollection serviceCollection, Func<IServiceProvider, TValue> initialValueFactory)
36this IServiceCollection serviceCollection, string name, Func<IServiceProvider, TValue> initialValueFactory)
52this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory)
65this IServiceCollection serviceCollection, Func<IServiceProvider, TValue> valueFactory)
83this IServiceCollection serviceCollection, string name, Func<IServiceProvider, TValue> valueFactory)
104this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory)
Microsoft.AspNetCore.Components.Authorization.Tests (2)
Microsoft.AspNetCore.Components.Endpoints (2)
Microsoft.AspNetCore.Components.Endpoints.Tests (26)
Microsoft.AspNetCore.Components.Forms (5)
Microsoft.AspNetCore.Components.Forms.Tests (3)
Microsoft.AspNetCore.Components.Performance (1)
Microsoft.AspNetCore.Components.QuickGrid (2)
Microsoft.AspNetCore.Components.Server (6)
Microsoft.AspNetCore.Components.Server.Tests (25)
Microsoft.AspNetCore.Components.Tests (12)
Microsoft.AspNetCore.Components.Web (6)
Microsoft.AspNetCore.Components.Web.Tests (48)
Microsoft.AspNetCore.Components.WebAssembly (7)
Microsoft.AspNetCore.Components.WebAssembly.Server (5)
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Microsoft.AspNetCore.Components.WebView (6)
Microsoft.AspNetCore.Components.WebView.Maui (4)
Microsoft.AspNetCore.Components.WebView.Photino (2)
Microsoft.AspNetCore.Components.WebView.Test (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (5)
Microsoft.AspNetCore.Components.WebView.Wpf (6)
Microsoft.AspNetCore.Connections.Abstractions (17)
Microsoft.AspNetCore.DataProtection (34)
Microsoft.AspNetCore.DataProtection.Abstractions (10)
Microsoft.AspNetCore.DataProtection.Abstractions.Tests (14)
Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (2)
Microsoft.AspNetCore.DataProtection.Tests (8)
Microsoft.AspNetCore.Diagnostics (3)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.AspNetCore.Grpc.JsonTranscoding (6)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (4)
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.Hosting (55)
Internal\StartupLoader.cs (16)
41public static StartupMethods LoadMethods(IServiceProvider hostingServiceProvider, [DynamicallyAccessedMembers(StartupLinkerOptions.Accessibility)] Type startupType, string environmentName, object? instance = null)
83public abstract Func<IServiceCollection, IServiceProvider> Build();
89IServiceProvider hostingServiceProvider,
100public IServiceProvider HostingServiceProvider { get; }
105public override Func<IServiceCollection, IServiceProvider> Build()
132Func<IServiceCollection, IServiceProvider> ConfigureServices(
133Func<IServiceCollection, IServiceProvider?> configureServicesCallback,
138IServiceProvider ConfigureServicesWithContainerConfiguration(IServiceCollection services)
141var applicationServiceProvider = configureServicesCallback.Invoke(services);
168private Func<IServiceCollection, IServiceProvider?> BuildStartupServicesFilterPipeline(Func<IServiceCollection, IServiceProvider?> startup)
172IServiceProvider? RunPipeline(IServiceCollection services)
198var result = startup(serviceCollection);
203var message = $"A ConfigureServices method that returns an {nameof(IServiceProvider)} is " +
308return null != FindMethod(startupType, "Configure{0}Services", environmentName, typeof(IServiceProvider), required: false);
313var servicesMethod = FindMethod(startupType, "Configure{0}Services", environmentName, typeof(IServiceProvider), required: false)
Microsoft.AspNetCore.Hosting.Abstractions (3)
Microsoft.AspNetCore.Hosting.Tests (27)
Microsoft.AspNetCore.Http (17)
Microsoft.AspNetCore.Http.Abstractions (16)
Extensions\UseMiddlewareExtensions.cs (7)
148throw new InvalidOperationException(Resources.FormatException_UseMiddlewareIServiceProviderNotAvailable(nameof(IServiceProvider)));
200private static Func<T, HttpContext, IServiceProvider, Task> ReflectionFallback<T>(MethodInfo methodInfo, ParameterInfo[] parameters)
265private static Func<T, HttpContext, IServiceProvider, Task> CompileExpression<T>(MethodInfo methodInfo, ParameterInfo[] parameters)
298var providerArg = Expression.Parameter(typeof(IServiceProvider), "serviceProvider");
323var lambda = Expression.Lambda<Func<T, HttpContext, IServiceProvider, Task>>(body, instanceArg, httpContextArg, providerArg);
328private static object GetService(IServiceProvider sp, Type type, Type middleware)
335private static object GetKeyedService(IServiceProvider sp, object key, Type type, Type middleware)
Microsoft.AspNetCore.Http.Abstractions.Tests (9)
Microsoft.AspNetCore.Http.Extensions (8)
RequestDelegateFactory.cs (6)
55private static readonly MethodInfo GetRequiredServiceMethod = typeof(ServiceProviderServiceExtensions).GetMethod(nameof(ServiceProviderServiceExtensions.GetRequiredService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider) })!;
56private static readonly MethodInfo GetServiceMethod = typeof(ServiceProviderServiceExtensions).GetMethod(nameof(ServiceProviderServiceExtensions.GetService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider) })!;
57private static readonly MethodInfo GetRequiredKeyedServiceMethod = typeof(ServiceProviderKeyedServiceExtensions).GetMethod(nameof(ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider), typeof(object) })!;
58private static readonly MethodInfo GetKeyedServiceMethod = typeof(ServiceProviderKeyedServiceExtensions).GetMethod(nameof(ServiceProviderKeyedServiceExtensions.GetKeyedService), BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(IServiceProvider), typeof(object) })!;
274var serviceProvider = options?.ServiceProvider ?? options?.EndpointBuilder?.ApplicationServices ?? EmptyServiceProvider.Instance;
2881public RdfEndpointBuilder(IServiceProvider applicationServices)
Microsoft.AspNetCore.Http.Extensions.Tests (12)
Microsoft.AspNetCore.Http.Features (3)
Microsoft.AspNetCore.Http.Microbenchmarks (7)
Microsoft.AspNetCore.Http.Results.Tests (29)
Microsoft.AspNetCore.Http.Tests (1)
Microsoft.AspNetCore.Identity (12)
IdentityApiEndpointRouteBuilderExtensions.cs (10)
58([FromBody] RegisterRequest registration, HttpContext context, [FromServices] IServiceProvider sp) =>
91([FromBody] LoginRequest login, [FromQuery] bool? useCookies, [FromQuery] bool? useSessionCookies, [FromServices] IServiceProvider sp) =>
123([FromBody] RefreshRequest refreshRequest, [FromServices] IServiceProvider sp) =>
143([FromQuery] string userId, [FromQuery] string code, [FromQuery] string? changedEmail, [FromServices] IServiceProvider sp) =>
194([FromBody] ResendConfirmationEmailRequest resendRequest, HttpContext context, [FromServices] IServiceProvider sp) =>
207([FromBody] ForgotPasswordRequest resetRequest, [FromServices] IServiceProvider sp) =>
226([FromBody] ResetPasswordRequest resetRequest, [FromServices] IServiceProvider sp) =>
261(ClaimsPrincipal claimsPrincipal, [FromBody] TwoFactorRequest tfaRequest, [FromServices] IServiceProvider sp) =>
337(ClaimsPrincipal claimsPrincipal, [FromServices] IServiceProvider sp) =>
349(ClaimsPrincipal claimsPrincipal, [FromBody] InfoRequest infoRequest, HttpContext context, [FromServices] IServiceProvider sp) =>
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.InternalTesting (5)
AssemblyTestLog.cs (5)
36private readonly IServiceProvider _serviceProvider;
46private AssemblyTestLog(ILoggerFactory globalLoggerFactory, ILogger globalLogger, string baseDirectory, Assembly assembly, IServiceProvider serviceProvider)
69var serviceProvider = CreateLoggerServices(output, className, minLogLevel, out resolvedTestName, out logOutputDirectory, testName, logStart);
101public IServiceProvider CreateLoggerServices(ITestOutputHelper output, string className, LogLevel minLogLevel, out string normalizedTestName, [CallerMemberName] string testName = null, DateTimeOffset? logStart = null)
105public IServiceProvider CreateLoggerServices(ITestOutputHelper output, string className, LogLevel minLogLevel, out string normalizedTestName, out string logOutputDirectory, [CallerMemberName] string testName = null, DateTimeOffset? logStart = null)
Microsoft.AspNetCore.MiddlewareAnalysis (1)
Microsoft.AspNetCore.Mvc.Abstractions (7)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
Microsoft.AspNetCore.Mvc.Core (44)
Microsoft.AspNetCore.Mvc.Core.Test (86)
Microsoft.AspNetCore.Mvc.Core.TestCommon (3)
Microsoft.AspNetCore.Mvc.Cors (1)
Microsoft.AspNetCore.Mvc.IntegrationTests (7)
Microsoft.AspNetCore.Mvc.Razor (9)
Microsoft.AspNetCore.Mvc.Razor.Test (3)
Microsoft.AspNetCore.Mvc.RazorPages (8)
Microsoft.AspNetCore.Mvc.RazorPages.Test (32)
Infrastructure\DefaultPageLoaderTest.cs (7)
20private readonly IOptions<RazorPagesOptions> RazorPagesOptions = Options.Create(new RazorPagesOptions { Conventions = new PageConventionCollection(Mock.Of<IServiceProvider>()) });
38var endpointFactory = new ActionEndpointFactory(Mock.Of<RoutePatternTransformer>(), Enumerable.Empty<IRequestDelegateFactory>(), Mock.Of<IServiceProvider>());
121var endpointFactory = new ActionEndpointFactory(transformer.Object, Enumerable.Empty<IRequestDelegateFactory>(), Mock.Of<IServiceProvider>());
161var endpointFactory = new ActionEndpointFactory(Mock.Of<RoutePatternTransformer>(), Enumerable.Empty<IRequestDelegateFactory>(), Mock.Of<IServiceProvider>());
238var endpointFactory = new ActionEndpointFactory(transformer.Object, Enumerable.Empty<IRequestDelegateFactory>(), Mock.Of<IServiceProvider>());
300var endpointFactory = new ActionEndpointFactory(transformer.Object, Enumerable.Empty<IRequestDelegateFactory>(), Mock.Of<IServiceProvider>());
337var endpointFactory = new ActionEndpointFactory(Mock.Of<RoutePatternTransformer>(), Enumerable.Empty<IRequestDelegateFactory>(), Mock.Of<IServiceProvider>());
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Microsoft.AspNetCore.Mvc.Test (2)
Microsoft.AspNetCore.Mvc.Testing (6)
Microsoft.AspNetCore.Mvc.ViewFeatures (17)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (28)
Microsoft.AspNetCore.OpenApi (21)
Services\OpenApiDocumentService.cs (13)
38IServiceProvider serviceProvider,
58public async Task<OpenApiDocument> GetOpenApiDocumentAsync(IServiceProvider scopedServiceProvider, CancellationToken cancellationToken = default)
97private async Task ApplyTransformersAsync(OpenApiDocument document, IServiceProvider scopedServiceProvider, CancellationToken cancellationToken)
113internal void InitializeTransformers(IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, IOpenApiOperationTransformer[] operationTransformers)
221IServiceProvider scopedServiceProvider,
242IServiceProvider scopedServiceProvider,
277IServiceProvider scopedServiceProvider,
331IServiceProvider scopedServiceProvider,
366IServiceProvider scopedServiceProvider,
405IServiceProvider scopedServiceProvider,
473private async Task<OpenApiRequestBody?> GetRequestBodyAsync(OpenApiDocument document, ApiDescription description, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, CancellationToken cancellationToken)
496IServiceProvider scopedServiceProvider,
647IServiceProvider scopedServiceProvider,
Services\Schemas\OpenApiSchemaService.cs (2)
127internal async Task<OpenApiSchema> GetOrCreateSchemaAsync(OpenApiDocument document, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default)
232internal async Task ApplySchemaTransformersAsync(OpenApiSchema schema, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default)
Microsoft.AspNetCore.OpenApi.Microbenchmarks (2)
Microsoft.AspNetCore.OpenApi.Tests (12)
Microsoft.AspNetCore.OutputCaching (4)
Microsoft.AspNetCore.OutputCaching.Tests (2)
Microsoft.AspNetCore.Owin (3)
Microsoft.AspNetCore.Owin.Tests (4)
Microsoft.AspNetCore.RateLimiting (4)
Microsoft.AspNetCore.RateLimiting.Tests (9)
Microsoft.AspNetCore.ResponseCompression (6)
Microsoft.AspNetCore.Routing (35)
Microsoft.AspNetCore.Routing.Microbenchmarks (10)
Microsoft.AspNetCore.Routing.Tests (35)
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Microsoft.AspNetCore.Shared.Tests (7)
Microsoft.AspNetCore.SignalR.Client.Core (7)
Microsoft.AspNetCore.SignalR.Client.Tests (3)
Microsoft.AspNetCore.SignalR.Core (17)
Internal\DefaultHubDispatcher.cs (4)
606private ValueTask<object?> ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, object?[] arguments, HubConnectionContext connection, IServiceProvider serviceProvider)
665private static Task<bool> IsHubMethodAuthorized(IServiceProvider provider, HubConnectionContext hubConnectionContext, HubMethodDescriptor descriptor, object?[] hubMethodArguments, Hub hub)
676private static async Task<bool> IsHubMethodAuthorizedSlow(IServiceProvider provider, ClaimsPrincipal principal, IList<IAuthorizeData> policies, HubInvocationContext resource)
834private static Activity? StartActivity(string operationName, ActivityKind kind, Activity? linkedActivity, IServiceProvider serviceProvider, string methodName, IDictionary<string, string>? headers, ILogger logger)
Microsoft.AspNetCore.SignalR.Tests (184)
HubConnectionHandlerTests.cs (133)
44var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(s => s.AddSingleton(trackDispose), LoggerFactory);
67var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(s =>
98var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(s => s.AddSingleton(state), LoggerFactory);
122var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
148var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
172var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
194var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
220var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
231var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
242var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
698var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
740var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
772var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
798var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
824var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
850var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
914var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
987var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1014var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1043var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1068var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1094var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1129var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1157var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1182var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1207var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1232var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1257var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1276var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1301var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1334var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1359var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1409var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
1882var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
2009var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
2044var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
2089var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
2128var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
2193var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2229var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2278var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(loggerFactory: LoggerFactory);
2329var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2374var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2416var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
2446var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2485var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2509var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2546var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2612var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
2643var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
2668var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
2695var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2741var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2803var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2839var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2867var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
2902var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3010var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3069var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3104var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
3141var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
3176var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3214var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
3249var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
3284var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
3321var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
3376var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
3432var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
3502var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
3556var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3589var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3620var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider();
3643var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider();
3671var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider();
3726var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3767var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3798var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3820var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(s => s.AddSingleton(state), LoggerFactory);
3843var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(s => s.AddSingleton(state), LoggerFactory);
3867var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(loggerFactory: LoggerFactory);
3918var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(loggerFactory: LoggerFactory);
3942var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3967var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
3994var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(loggerFactory: LoggerFactory);
4014var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(loggerFactory: LoggerFactory);
4033var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(loggerFactory: LoggerFactory);
4052var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
4090var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
4130var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(loggerFactory: LoggerFactory);
4167var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(loggerFactory: LoggerFactory);
4210var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
4251var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
4296var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
4327var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
4354var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(builder =>
4383var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
4408IServiceProvider serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(loggerFactory: LoggerFactory);
4473var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(
4507var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services =>
4537var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
4562var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider();
4593var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(serviceBuilder =>
4627var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
4652var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4669var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4686var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4705var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4732var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4749var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4771var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4792var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4813var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4838var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4861var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4883var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4903var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4923var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4946var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4969var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
4993var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
5016var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
5039var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
5053var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
5069var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
5080var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
5116var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(s => s.AddSingleton(state), LoggerFactory);
5140var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(s => s.AddSingleton(state), LoggerFactory);
5165var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
5192var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(provider =>
5244var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(s => s.AddSingleton(state), LoggerFactory);
5307var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(s => s.AddSingleton(state), LoggerFactory);
5364private readonly IServiceProvider _serviceProvider;
5368public CustomHubActivator(IServiceProvider serviceProvider)
Microsoft.AspNetCore.SignalR.Tests.Utils (2)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (3)
Microsoft.AspNetCore.StaticAssets (5)
Microsoft.AspNetCore.TestHost (8)
Microsoft.AspNetCore.TestHost.Tests (10)
Microsoft.AspNetCore.Testing.Tests (1)
Microsoft.AspNetCore.Tests (3)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (8)
Microsoft.CodeAnalysis.ExternalAccess.Copilot (2)
Microsoft.CodeAnalysis.Remote.ServiceHub (6)
Microsoft.Extensions.AI (19)
Embeddings\EmbeddingGeneratorBuilder.cs (7)
18private readonly Func<IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>> _innerGeneratorFactory;
21private List<Func<IEmbeddingGenerator<TInput, TEmbedding>, IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>>>? _generatorFactories;
33public EmbeddingGeneratorBuilder(Func<IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>> innerGeneratorFactory)
42/// The <see cref="IServiceProvider"/> that should provide services to the <see cref="IEmbeddingGenerator{TInput, TEmbedding}"/> instances.
43/// If null, an empty <see cref="IServiceProvider"/> will be used.
46public IEmbeddingGenerator<TInput, TEmbedding> Build(IServiceProvider? services = null)
80Func<IEmbeddingGenerator<TInput, TEmbedding>, IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>> generatorFactory)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.Tests (8)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Caching.StackExchangeRedis (3)
Microsoft.Extensions.Compliance.Testing (1)
Microsoft.Extensions.DependencyInjection (17)
Microsoft.Extensions.DependencyInjection.Abstractions (143)
ActivatorUtilities.cs (22)
38new Func<IServiceProvider, Type, Type, bool, object?, object?>(GetService).Method;
41/// Instantiates a type with constructor arguments provided directly and/or from an <see cref="IServiceProvider"/>.
48IServiceProvider provider,
266/// and/or from an <see cref="IServiceProvider"/>.
273/// A factory that will instantiate instanceType using an <see cref="IServiceProvider"/>
303/// and/or from an <see cref="IServiceProvider"/>.
310/// A factory that will instantiate type <typeparamref name="T" /> using an <see cref="IServiceProvider"/>
338provider = Expression.Parameter(typeof(IServiceProvider), "provider");
344/// Instantiates a type with constructor arguments provided directly and/or from an <see cref="IServiceProvider"/>.
350public static T CreateInstance<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(IServiceProvider provider, params object[] parameters)
361public static T GetServiceOrCreateInstance<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(IServiceProvider provider)
373IServiceProvider provider,
379private static object? GetService(IServiceProvider sp, Type type, Type requiredBy, bool hasDefaultValue, object? key)
460return (IServiceProvider serviceProvider, object?[]? arguments) =>
779public object? GetService(IServiceProvider serviceProvider, int parameterIndex)
862public object CreateInstance(IServiceProvider provider)
930IServiceProvider serviceProvider)
970IServiceProvider serviceProvider)
988IServiceProvider serviceProvider,
1124IServiceProvider serviceProvider,
1150IServiceProvider serviceProvider,
1222private static object? GetKeyedService(IServiceProvider provider, Type type, object? serviceKey)
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (6)
67Func<IServiceProvider, object?, object> implementationFactory)
122Func<IServiceProvider, object?, TService> implementationFactory)
183Func<IServiceProvider, object?, object> implementationFactory)
238Func<IServiceProvider, object?, TService> implementationFactory)
299Func<IServiceProvider, object?, object> implementationFactory)
373Func<IServiceProvider, object?, TService> implementationFactory)
ServiceCollectionServiceExtensions.cs (10)
49Func<IServiceProvider, object> implementationFactory)
123Func<IServiceProvider, TService> implementationFactory)
146Func<IServiceProvider, TImplementation> implementationFactory)
191Func<IServiceProvider, object> implementationFactory)
265Func<IServiceProvider, TService> implementationFactory)
288Func<IServiceProvider, TImplementation> implementationFactory)
334Func<IServiceProvider, object> implementationFactory)
408Func<IServiceProvider, TService> implementationFactory)
431Func<IServiceProvider, TImplementation> implementationFactory)
499Func<IServiceProvider, object> implementationFactory,
ServiceCollectionServiceExtensions.Keyed.cs (10)
53Func<IServiceProvider, object?, object> implementationFactory)
137Func<IServiceProvider, object?, TService> implementationFactory)
162Func<IServiceProvider, object?, TImplementation> implementationFactory)
211Func<IServiceProvider, object?, object> implementationFactory)
295Func<IServiceProvider, object?, TService> implementationFactory)
320Func<IServiceProvider, object?, TImplementation> implementationFactory)
369Func<IServiceProvider, object?, object> implementationFactory)
453Func<IServiceProvider, object?, TService> implementationFactory)
478Func<IServiceProvider, object?, TImplementation> implementationFactory)
552Func<IServiceProvider, object?, object> implementationFactory,
ServiceDescriptor.cs (27)
90Func<IServiceProvider, object> factory,
110Func<IServiceProvider, object?, object> factory,
120Func<IServiceProvider, object> nullKeyedFactory = sp => factory(sp, null);
223public Func<IServiceProvider, object>? ImplementationFactory => IsKeyedService ? null : (Func<IServiceProvider, object>?) _implementationFactory;
232public Func<IServiceProvider, object?, object>? KeyedImplementationFactory
240return (Func<IServiceProvider, object?, object>?)_implementationFactory;
411Func<IServiceProvider, TImplementation> implementationFactory)
433Func<IServiceProvider, object?, TImplementation> implementationFactory)
450public static ServiceDescriptor Transient<TService>(Func<IServiceProvider, TService> implementationFactory)
467public static ServiceDescriptor KeyedTransient<TService>(object? serviceKey, Func<IServiceProvider, object?, TService> implementationFactory)
483public static ServiceDescriptor Transient(Type service, Func<IServiceProvider, object> implementationFactory)
500public static ServiceDescriptor KeyedTransient(Type service, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory)
582Func<IServiceProvider, TImplementation> implementationFactory)
604Func<IServiceProvider, object?, TImplementation> implementationFactory)
621public static ServiceDescriptor Scoped<TService>(Func<IServiceProvider, TService> implementationFactory)
638public static ServiceDescriptor KeyedScoped<TService>(object? serviceKey, Func<IServiceProvider, object?, TService> implementationFactory)
654public static ServiceDescriptor Scoped(Type service, Func<IServiceProvider, object> implementationFactory)
671public static ServiceDescriptor KeyedScoped(Type service, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory)
760Func<IServiceProvider, TImplementation> implementationFactory)
782Func<IServiceProvider, object?, TImplementation> implementationFactory)
799public static ServiceDescriptor Singleton<TService>(Func<IServiceProvider, TService> implementationFactory)
818Func<IServiceProvider, object?, TService> implementationFactory)
836Func<IServiceProvider, object> implementationFactory)
856Func<IServiceProvider, object?, object> implementationFactory)
995public static ServiceDescriptor Describe(Type serviceType, Func<IServiceProvider, object> implementationFactory, ServiceLifetime lifetime)
1010public static ServiceDescriptor DescribeKeyed(Type serviceType, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory, ServiceLifetime lifetime)
Microsoft.Extensions.DependencyInjection.AutoActivation (12)
AutoActivationExtensions.cs (5)
98public static IServiceCollection AddActivatedSingleton<TService, TImplementation>(this IServiceCollection services, Func<IServiceProvider, TImplementation> implementationFactory)
135public static IServiceCollection AddActivatedSingleton<TService>(this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory)
191Func<IServiceProvider, object> implementationFactory)
262public static void TryAddActivatedSingleton(this IServiceCollection services, Type serviceType, Func<IServiceProvider, object> implementationFactory)
305public static void TryAddActivatedSingleton<TService>(this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory)
AutoActivationExtensions.Keyed.cs (5)
105Func<IServiceProvider, object?, TImplementation> implementationFactory)
147Func<IServiceProvider, object?, TService> implementationFactory)
204Func<IServiceProvider, object?, object> implementationFactory)
286Func<IServiceProvider, object?, object> implementationFactory)
339Func<IServiceProvider, object?, TService> implementationFactory)
Microsoft.Extensions.Diagnostics.HealthChecks (9)
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (4)
Microsoft.Extensions.Diagnostics.Testing (1)
Microsoft.Extensions.Hosting (15)
Microsoft.Extensions.Hosting.Abstractions (6)
Microsoft.Extensions.Hosting.Testing (1)
Microsoft.Extensions.Hosting.Testing.Tests (4)
Microsoft.Extensions.Http (63)
DependencyInjection\HttpClientBuilderExtensions.cs (19)
45/// The <see cref="IServiceProvider"/> provided to <paramref name="configureClient"/> will be the
48public static IHttpClientBuilder ConfigureHttpClient(this IHttpClientBuilder builder, Action<IServiceProvider, HttpClient> configureClient)
99/// The <see cref="IServiceProvider"/> argument provided to <paramref name="configureHandler"/> will be
103public static IHttpClientBuilder AddHttpMessageHandler(this IHttpClientBuilder builder, Func<IServiceProvider, DelegatingHandler> configureHandler)
180/// The <see cref="IServiceProvider"/> argument provided to <paramref name="configureHandler"/> will be
184public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this IHttpClientBuilder builder, Func<IServiceProvider, HttpMessageHandler> configureHandler)
234/// The <see cref="IServiceProvider"/> argument provided to <paramref name="configureHandler"/> will be
238public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this IHttpClientBuilder builder, Action<HttpMessageHandler, IServiceProvider> configureHandler)
286public static IHttpClientBuilder UseSocketsHttpHandler(this IHttpClientBuilder builder, Action<SocketsHttpHandler, IServiceProvider>? configureHandler = null)
347/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
382private static TClient AddTransientHelper<TClient>(IServiceProvider s, IHttpClientBuilder builder) where TClient : class
408/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
446private static TClient AddTransientHelper<TClient, TImplementation>(IServiceProvider s, IHttpClientBuilder builder) where TClient : class where TImplementation : class, TClient
468/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
514/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
518/// Calling <see cref="HttpClientBuilderExtensions.AddTypedClient{TClient}(IHttpClientBuilder,Func{HttpClient,IServiceProvider,TClient})"/>
522public static IHttpClientBuilder AddTypedClient<TClient>(this IHttpClientBuilder builder, Func<HttpClient, IServiceProvider, TClient> factory)
531internal static IHttpClientBuilder AddTypedClientCore<TClient>(this IHttpClientBuilder builder, Func<HttpClient, IServiceProvider, TClient> factory, bool validateSingleType)
636public static IHttpClientBuilder ConfigureAdditionalHttpMessageHandlers(this IHttpClientBuilder builder, Action<IList<DelegatingHandler>, IServiceProvider> configureAdditionalHandlers)
DependencyInjection\HttpClientFactoryServiceCollectionExtensions.cs (23)
165public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient)
196/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
236/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
273/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
316/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
357/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
396/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
401this IServiceCollection services, Action<IServiceProvider, HttpClient> configureClient)
439/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
483/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
488this IServiceCollection services, Action<IServiceProvider, HttpClient> configureClient)
523/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
565/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
573this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient)
611/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
658/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
666this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient)
703/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
740/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
782/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
786public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Func<HttpClient, IServiceProvider, TImplementation> factory)
819/// can be retrieved from <see cref="IServiceProvider.GetService(Type)" /> (and related methods) by providing
823public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Func<HttpClient, IServiceProvider, TImplementation> factory)
Microsoft.Extensions.Http.Diagnostics (5)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Microsoft.Extensions.Http.Polly (3)
Microsoft.Extensions.Http.Resilience (16)
Resilience\Internal\PipelineKeyProviderHelper.cs (4)
21public static void SelectPipelineBy(IServiceCollection services, string pipelineName, Func<IServiceProvider, Func<HttpRequestMessage, string>> selectorFactory)
26public static Func<HttpRequestMessage, string>? GetPipelineKeyProvider(this IServiceProvider provider, string pipelineName)
31private static void UsePipelineKeyProvider(IServiceCollection services, string pipelineName, Func<IServiceProvider, Func<HttpRequestMessage, string>> factory)
33_ = services.AddOptions<PipelineKeyOptions>(pipelineName).Configure<IServiceProvider>((options, provider) => options.KeyProvider = factory(provider));
Microsoft.Extensions.Identity.Core (3)
Microsoft.Extensions.ML (4)
Microsoft.Extensions.ObjectPool.DependencyInjection (2)
Microsoft.Extensions.ServiceDiscovery (2)
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (1)
Microsoft.Extensions.Telemetry.Tests (8)
Microsoft.Extensions.WebEncoders (1)
Microsoft.Maui (67)
Microsoft.Maui.Controls (31)
Shell\ShellSection.cs (3)
318 async Task PrepareCurrentStackForBeingReplaced(ShellNavigationRequest request, ShellRouteParameters queryData, IServiceProvider services, bool? animate, List<string> globalRoutes, bool isRelativePopping)
485 Page GetOrCreateFromRoute(string route, ShellRouteParameters queryData, IServiceProvider services, bool isLast, bool isPopping)
497 internal async Task GoToAsync(ShellNavigationRequest request, ShellRouteParameters queryData, IServiceProvider services, bool? animate, bool isRelativePopping)
Microsoft.Maui.Controls.Build.Tasks (2)
Microsoft.Maui.Controls.Compatibility (3)
Microsoft.Maui.Controls.SourceGen (2)
Microsoft.Maui.Controls.Xaml (46)
ApplyPropertiesVisitor.cs (5)
368 public static bool TrySetPropertyValue(object element, XmlName propertyName, string xKey, object value, object rootElement, IXmlLineInfo lineInfo, IServiceProvider serviceProvider, out Exception xpe)
574 static bool TrySetValue(object element, BindableProperty property, bool attached, object value, IXmlLineInfo lineInfo, IServiceProvider serviceProvider, out Exception exception)
655 static bool TrySetProperty(object element, string localName, object value, IXmlLineInfo lineInfo, IServiceProvider serviceProvider, object rootElement, out Exception exception)
732 static bool TryAddToProperty(object element, XmlName propertyName, object value, string xKey, IXmlLineInfo lineInfo, IServiceProvider serviceProvider, object rootElement, out Exception exception)
802 static bool TryAddValue(BindableObject bindable, BindableProperty property, object value, IServiceProvider serviceProvider, out Exception exception)
Microsoft.Maui.Maps (2)
Microsoft.ML.AutoML (4)
Microsoft.ML.Fairlearn (2)
Microsoft.VisualStudio.LanguageServices (53)
Microsoft.VisualStudio.LanguageServices.CSharp (19)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
Microsoft.VisualStudio.LanguageServices.Xaml (4)
MockHostTypes (4)
mscorlib (1)
Mvc.RoutingWebSite (1)
netstandard (1)
OrderProcessor (2)
PresentationFramework (137)
System\Windows\StaticResourceExtension.cs (9)
51public override object ProvideValue(IServiceProvider serviceProvider)
84internal object ProvideValueInternal(IServiceProvider serviceProvider, bool allowDeferredReference)
95internal object TryProvideValueInternal(IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)
107private object TryProvideValueWithDiagnosticEvent(IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)
162private object TryProvideValueImpl(IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)
194private ResourceDictionary FindTheResourceDictionary(IServiceProvider serviceProvider, bool isDeferredContentSearch)
268internal object FindResourceInDeferredContent(IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)
291private object FindResourceInAppOrSystem(IServiceProvider serviceProvider,
315private object FindResourceInEnviroment(IServiceProvider serviceProvider,
ReachFramework (12)
Roslyn.VisualStudio.DiagnosticsWindow (4)
SocialWeather (2)
Sockets.BindTests (1)
Sockets.FunctionalTests (1)
System.ComponentModel.Annotations (6)
System.ComponentModel.TypeConverter (8)
System.Runtime.Caching (4)
System.Windows.Forms (25)
System.Windows.Forms.Design (205)
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (5)
235public static Type[] GetCustomItemTypes(IComponent component, IServiceProvider serviceProvider)
343public static ToolStripItem[] GetCustomItemMenuItems(IComponent component, EventHandler onClick, bool convertTo, IServiceProvider serviceProvider)
367public static NewItemsContextMenuStrip GetNewItemDropDown(IComponent component, ToolStripItem currentItem, EventHandler onClick, bool convertTo, IServiceProvider serviceProvider, bool populateCustom)
404public static void GetCustomNewItemDropDown(NewItemsContextMenuStrip contextMenu, IComponent component, ToolStripItem currentItem, EventHandler onClick, bool convertTo, IServiceProvider serviceProvider)
421public static void InvalidateSelection(ArrayList originalSelComps, ToolStripItem nextSelection, IServiceProvider provider, bool shiftPressed)
System.Windows.Forms.Design.Tests (199)
System.Windows.Forms.Primitives (9)
System.Windows.Forms.Tests (9)
System.Windows.Forms.TestUtilities (4)
System.Windows.Forms.UI.IntegrationTests (3)
System.Xaml (18)
System.Xaml.Tests (5)
TestProject.ServiceA (1)
VersioningWebSite (3)
Wasm.Performance.ConsoleHost (1)
WindowsBase.Tests (3)