55 references to ActivatorUtilities
BasicWebSite (1)
RequestScopedActionConstraint.cs (1)
28return (Constraint)ActivatorUtilities.CreateInstance(services, typeof(Constraint), new[] { _requestId });
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationHandlerProvider.cs (1)
50ActivatorUtilities.CreateInstance(context.RequestServices, scheme.HandlerType))
Microsoft.AspNetCore.Components (1)
DefaultComponentActivator.cs (1)
36factory = ActivatorUtilities.CreateFactory(componentType, Type.EmptyTypes);
Microsoft.AspNetCore.Hosting (2)
GenericHost\GenericWebHostBuilder.cs (1)
235instance ??= ActivatorUtilities.CreateInstance(new HostServiceProvider(webHostBuilderContext), startupType);
Internal\StartupLoader.cs (1)
50instance = ActivatorUtilities.GetServiceOrCreateInstance(hostingServiceProvider, startupType);
Microsoft.AspNetCore.Http.Abstractions (1)
Extensions\UseMiddlewareExtensions.cs (1)
131var instance = ActivatorUtilities.CreateInstance(_app.ApplicationServices, _middleware, ctorArgs);
Microsoft.AspNetCore.Mvc.Core (11)
Controllers\ControllerActivatorProvider.cs (1)
58var typeActivator = ActivatorUtilities.CreateFactory(controllerType, Type.EmptyTypes);
Filters\FilterCollection.cs (4)
21/// <see cref="Microsoft.Extensions.DependencyInjection.ActivatorUtilities"/>. 37/// <see cref="Microsoft.Extensions.DependencyInjection.ActivatorUtilities"/>. 56/// <see cref="Microsoft.Extensions.DependencyInjection.ActivatorUtilities"/>. 72/// <see cref="Microsoft.Extensions.DependencyInjection.ActivatorUtilities"/>.
Infrastructure\ClientErrorResultFilterFactory.cs (1)
19var resultFilter = ActivatorUtilities.CreateInstance<ClientErrorResultFilter>(serviceProvider);
Infrastructure\ITypeActivatorCache.cs (1)
10/// <see cref="Extensions.DependencyInjection.ActivatorUtilities.CreateFactory(Type, Type[])"/>.
Infrastructure\TypeActivatorCache.cs (2)
11/// <see cref="ActivatorUtilities.CreateFactory(Type, Type[])"/>. 16(type) => ActivatorUtilities.CreateFactory(type, Type.EmptyTypes);
ModelBinding\Binders\BinderTypeModelBinder.cs (1)
36_factory = ActivatorUtilities.CreateFactory(binderType, Type.EmptyTypes);
TypeFilterAttribute.cs (1)
67_factory = ActivatorUtilities.CreateFactory(ImplementationType, argumentTypes ?? Type.EmptyTypes);
Microsoft.AspNetCore.Mvc.Razor (1)
Infrastructure\DefaultTagHelperActivator.cs (1)
26private static readonly ObjectFactory _objectFactory = ActivatorUtilities.CreateFactory(typeof(TTagHelper), Type.EmptyTypes);
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\DefaultPageModelActivatorProvider.cs (1)
32var factory = ActivatorUtilities.CreateFactory(modelTypeInfo, Type.EmptyTypes);
Microsoft.AspNetCore.OpenApi (3)
Transformers\TypeBasedOpenApiDocumentTransformer.cs (1)
20_transformerFactory = ActivatorUtilities.CreateFactory(_transformerType, []);
Transformers\TypeBasedOpenApiOperationTransformer.cs (1)
20_transformerFactory = ActivatorUtilities.CreateFactory(_transformerType, []);
Transformers\TypeBasedOpenApiSchemaTransformer.cs (1)
20_transformerFactory = ActivatorUtilities.CreateFactory(_transformerType, []);
Microsoft.AspNetCore.OutputCaching (1)
Policies\TypedPolicy.cs (1)
34return _instance ??= ActivatorUtilities.CreateInstance(options.Value.ApplicationServices, _policyType) as IOutputCachePolicy;
Microsoft.AspNetCore.RateLimiting (1)
RateLimiterOptions.cs (1)
78var instance = (IRateLimiterPolicy<TPartitionKey>)ActivatorUtilities.CreateInstance(serviceProvider, typeof(TPolicy));
Microsoft.AspNetCore.ResponseCompression (1)
CompressionProviderFactory.cs (1)
27return (ICompressionProvider)ActivatorUtilities.CreateInstance(serviceProvider, ProviderType, Type.EmptyTypes);
Microsoft.AspNetCore.Routing (2)
Builder\EndpointFilterExtensions.cs (2)
41filterFactory = ActivatorUtilities.CreateFactory(typeof(TFilterType), new[] { typeof(EndpointFilterFactoryContext) }); 45filterFactory = ActivatorUtilities.CreateFactory(typeof(TFilterType), Type.EmptyTypes);
Microsoft.AspNetCore.SignalR.Core (2)
Internal\DefaultHubActivator.cs (1)
13private static readonly Lazy<ObjectFactory> _objectFactory = new Lazy<ObjectFactory>(() => ActivatorUtilities.CreateFactory(typeof(THub), Type.EmptyTypes));
Internal\HubFilterFactory.cs (1)
18_objectFactory = ActivatorUtilities.CreateFactory(filterType, Array.Empty<Type>());
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
BuildModelFactoryTests.cs (1)
63_buildModelFactory = ActivatorUtilities.CreateInstance<BuildModelFactory>(provider);
Microsoft.Extensions.DependencyInjection.Abstractions (3)
ActivatorUtilities.cs (1)
16[assembly: System.Reflection.Metadata.MetadataUpdateHandler(typeof(Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ActivatorUtilitiesUpdateHandler))]
ActivatorUtilitiesConstructorAttribute.cs (1)
9/// Marks the constructor to be used when activating type using <see cref="ActivatorUtilities"/>.
ObjectFactory.cs (1)
9/// The result of <see cref="ActivatorUtilities.CreateFactory(Type, Type[])"/>.
Microsoft.Extensions.Diagnostics.HealthChecks (9)
DependencyInjection\HealthChecksBuilderAddCheckExtensions.cs (9)
82/// This method will use <see cref="ActivatorUtilities.GetServiceOrCreateInstance{T}(IServiceProvider)"/> to create the health check 111/// This method will use <see cref="ActivatorUtilities.GetServiceOrCreateInstance{T}(IServiceProvider)"/> to create the health check 131ActivatorUtilities.GetServiceOrCreateInstance<T>(serviceProvider); 146/// This method will use <see cref="ActivatorUtilities.CreateInstance{T}(IServiceProvider, object[])"/> to create the health check 172/// This method will use <see cref="ActivatorUtilities.CreateInstance{T}(IServiceProvider, object[])"/> to create the health check 202/// This method will use <see cref="ActivatorUtilities.CreateInstance{T}(IServiceProvider, object[])"/> to create the health check 221ActivatorUtilities.CreateInstance<T>(serviceProvider, args); 239/// This method will use <see cref="ActivatorUtilities.CreateInstance{T}(IServiceProvider, object[])"/> to create the health check 258T CreateInstance(IServiceProvider serviceProvider) => ActivatorUtilities.CreateInstance<T>(serviceProvider, args);
Microsoft.Extensions.Diagnostics.Probes (1)
TcpEndpointProbesExtensions.cs (1)
52return ActivatorUtilities.CreateInstance<TcpEndpointProbesService>(provider, options);
Microsoft.Extensions.Http (2)
DefaultTypedHttpClientFactory.cs (1)
42return ActivatorUtilities.CreateFactory(typeof(TClient), new Type[] { typeof(HttpClient), });
ITypedHttpClientFactory.cs (1)
33/// <see cref="ActivatorUtilities.CreateInstance(IServiceProvider, Type, object[])" /> for details.
Microsoft.Extensions.ML.Tests (6)
FileLoaderTests.cs (3)
34var loaderUnderTest = ActivatorUtilities.CreateInstance<FileModelLoader>(sp); 47var loaderUnderTest = ActivatorUtilities.CreateInstance<FileModelLoader>(sp); 66var loaderUnderTest = ActivatorUtilities.CreateInstance<FileLoaderMock>(sp);
UriLoaderTests.cs (3)
34var loaderUnderTest = ActivatorUtilities.CreateInstance<UriModelLoader>(sp); 47var loaderUnderTest = ActivatorUtilities.CreateInstance<UriLoaderMock>(sp); 66var loaderUnderTest = ActivatorUtilities.CreateInstance<UriLoaderMock>(sp);
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
DependencyInjectionPooledObjectPolicy.cs (1)
21_factory = ActivatorUtilities.CreateFactory(typeof(TImplementation), Type.EmptyTypes);
Microsoft.Maui (1)
Platform\ElementExtensions.cs (1)
53 ActivatorUtilities.CreateInstance(mauiContext.Services, handlerType);
Microsoft.Maui.Controls (2)
Routing.cs (1)
279 return (Element)Extensions.DependencyInjection.ActivatorUtilities.GetServiceOrCreateInstance(services, _type);
Shell\ShellContent.cs (1)
87 return Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(services, template.Type);