30 references to ObjectFactory
Microsoft.AspNetCore.Components (2)
DefaultComponentActivator.cs (2)
12
private static readonly ConcurrentDictionary<Type,
ObjectFactory
> _cachedComponentTypeInfo = new();
29
private static
ObjectFactory
GetObjectFactory([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type componentType)
Microsoft.AspNetCore.Mvc.Core (9)
Controllers\ControllerActivatorProvider.cs (1)
58
var
typeActivator = ActivatorUtilities.CreateFactory(controllerType, Type.EmptyTypes);
Infrastructure\ITypeActivatorCache.cs (1)
9
/// Caches <see cref="Extensions.DependencyInjection.
ObjectFactory
"/> instances produced by
Infrastructure\TypeActivatorCache.cs (5)
10
/// Caches <see cref="
ObjectFactory
"/> instances produced by
15
private readonly Func<Type,
ObjectFactory
> _createFactory =
17
private readonly ConcurrentDictionary<Type,
ObjectFactory
> _typeActivatorCache =
18
new ConcurrentDictionary<Type,
ObjectFactory
>();
28
var
createFactory = _typeActivatorCache.GetOrAdd(implementationType, _createFactory);
ModelBinding\Binders\BinderTypeModelBinder.cs (1)
17
private readonly
ObjectFactory
_factory;
TypeFilterAttribute.cs (1)
28
private
ObjectFactory
? _factory;
Microsoft.AspNetCore.Mvc.Razor (1)
Infrastructure\DefaultTagHelperActivator.cs (1)
26
private static readonly
ObjectFactory
_objectFactory = ActivatorUtilities.CreateFactory(typeof(TTagHelper), Type.EmptyTypes);
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\DefaultPageModelActivatorProvider.cs (1)
32
var
factory = ActivatorUtilities.CreateFactory(modelTypeInfo, Type.EmptyTypes);
Microsoft.AspNetCore.OpenApi (3)
Transformers\TypeBasedOpenApiDocumentTransformer.cs (1)
15
private readonly
ObjectFactory
_transformerFactory;
Transformers\TypeBasedOpenApiOperationTransformer.cs (1)
15
private readonly
ObjectFactory
_transformerFactory;
Transformers\TypeBasedOpenApiSchemaTransformer.cs (1)
15
private readonly
ObjectFactory
_transformerFactory;
Microsoft.AspNetCore.Routing (1)
Builder\EndpointFilterExtensions.cs (1)
38
ObjectFactory
filterFactory;
Microsoft.AspNetCore.SignalR.Core (3)
Internal\DefaultHubActivator.cs (2)
13
private static readonly Lazy<
ObjectFactory
> _objectFactory = new Lazy<
ObjectFactory
>(() => ActivatorUtilities.CreateFactory(typeof(THub), Type.EmptyTypes));
Internal\HubFilterFactory.cs (1)
11
private readonly
ObjectFactory
_objectFactory;
Microsoft.Extensions.DependencyInjection.Abstractions (6)
ActivatorUtilities.cs (6)
276
public static
ObjectFactory
CreateFactory(
294
var factoryLambda = Expression.Lambda<
ObjectFactory
>(
297
ObjectFactory
? result = factoryLambda.Compile();
321
var
factory = CreateFactoryReflection(typeof(T), argumentTypes);
447
private static
ObjectFactory
CreateFactoryReflection(
506
ObjectFactory
InvokeCanonical()
Microsoft.Extensions.Http (3)
DefaultTypedHttpClientFactory.cs (3)
38
private static readonly Func<
ObjectFactory
> _createActivator = () =>
50
private
ObjectFactory
? _activator;
54
public
ObjectFactory
Activator => LazyInitializer.EnsureInitialized(
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
DependencyInjectionPooledObjectPolicy.cs (1)
15
private readonly
ObjectFactory
_factory;