30 references to ImplementationFactory
Aspire.Hosting.Testing (1)
DistributedApplicationFactory.cs (1)
399{ ImplementationFactory: { } factory } => ServiceDescriptor.KeyedSingleton<IHost>(this, (sp, _) => (IHost)factory(sp)),
Aspire.Hosting.Tests (2)
DistributedApplicationTests.cs (2)
142Assert.Single(lifecycleHookDescriptors.Where(sd => sd.ImplementationFactory == callback1)); 143Assert.DoesNotContain(lifecycleHookDescriptors, sd => sd.ImplementationFactory == callback2);
Aspire.Microsoft.EntityFrameworkCore.Cosmos (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
71if (oldDbContextOptionsDescriptor.ImplementationFactory?.Invoke(sp) is not DbContextOptions<TContext> dbContextOptions)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
71if (oldDbContextOptionsDescriptor.ImplementationFactory?.Invoke(sp) is not DbContextOptions<TContext> dbContextOptions)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
71if (oldDbContextOptionsDescriptor.ImplementationFactory?.Invoke(sp) is not DbContextOptions<TContext> dbContextOptions)
Aspire.Oracle.EntityFrameworkCore (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
71if (oldDbContextOptionsDescriptor.ImplementationFactory?.Invoke(sp) is not DbContextOptions<TContext> dbContextOptions)
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
71if (oldDbContextOptionsDescriptor.ImplementationFactory?.Invoke(sp) is not DbContextOptions<TContext> dbContextOptions)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentsServiceCollectionExtensionsTest.cs (1)
125{ ImplementationFactory: { } factory } => factory(serviceProvider).GetType(),
Microsoft.AspNetCore.Mvc.Test (3)
MvcServiceCollectionExtensionsTest.cs (3)
277{ ImplementationFactory: { } factory } => factory(serviceProvider).GetType(), 658else if (service.ImplementationFactory is not null) 660var instance = service.ImplementationFactory(sp);
Microsoft.Extensions.DependencyInjection (5)
DependencyInjectionEventSource.cs (2)
252else if (!descriptor.IsKeyedService && descriptor.ImplementationFactory != null) 255builder.Append(descriptor.ImplementationFactory.Method);
ServiceLookup\CallSiteFactory.cs (2)
386else if (!descriptor.IsKeyedService && descriptor.ImplementationFactory != null) 388callSite = new FactoryCallSite(lifetime, descriptor.ServiceType, descriptor.ImplementationFactory);
ServiceLookup\ServiceDescriptorExtensions.cs (1)
28: serviceDescriptor.ImplementationFactory;
Microsoft.Extensions.DependencyInjection.Abstractions (8)
ServiceDescriptor.cs (8)
230/// If <see cref="IsKeyedService"/> is <see langword="false"/>, <see cref="ImplementationFactory"/> should be called instead. 277if (ImplementationFactory != null) 279return lifetime + $"{nameof(ImplementationFactory)}: {ImplementationFactory.Method}"; 298else if (ImplementationFactory != null) 300Type[]? typeArguments = ImplementationFactory.GetType().GenericTypeArguments; 1042else if (ImplementationFactory != null) 1044debugText += $@", ImplementationFactory = {ImplementationFactory.Method}";
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (5)
DependencyInjection\ServiceCollectionExtensionsTest.cs (5)
33Assert.Null(actual.ImplementationFactory); 41Assert.Null(actual.ImplementationFactory); 63Assert.Null(actual.ImplementationFactory); 71Assert.Null(actual.ImplementationFactory); 79Assert.Null(actual.ImplementationFactory);