3 instantiations of ControllerContext
Microsoft.AspNetCore.Mvc.Core (3)
ControllerBase.cs (1)
74
_controllerContext = new
ControllerContext
();
Infrastructure\ControllerActionInvokerProvider.cs (1)
72
var controllerContext = new
ControllerContext
(context.ActionContext)
Routing\ControllerRequestDelegateFactory.cs (1)
88
var controllerContext = new
ControllerContext
(context, routeData, controller)
102 references to ControllerContext
Microsoft.AspNetCore.Mvc.Core (93)
ControllerBase.cs (4)
27
private
ControllerContext
? _controllerContext;
60
/// Gets or sets the <see cref="Mvc.
ControllerContext
"/>.
65
/// <see cref="Mvc.
ControllerContext
"/>.
68
public
ControllerContext
ControllerContext
ControllerContext.cs (3)
22
/// Creates a new <see cref="
ControllerContext
"/>.
32
/// Creates a new <see cref="
ControllerContext
"/>.
47
/// Creates a new <see cref="
ControllerContext
"/>.
ControllerContextAttribute.cs (1)
8
/// <see cref="
ControllerContext
"/> when creating the controller. The property must have a public
Controllers\ControllerActivatorProvider.cs (12)
15
private static readonly Action<
ControllerContext
, object> _dispose = Dispose;
16
private static readonly Func<
ControllerContext
, object, ValueTask> _disposeAsync = DisposeAsync;
17
private static readonly Func<
ControllerContext
, object, ValueTask> _syncDisposeAsync = SyncDisposeAsync;
18
private readonly Func<
ControllerContext
, object>? _controllerActivatorCreate;
19
private readonly Action<
ControllerContext
, object>? _controllerActivatorRelease;
20
private readonly Func<
ControllerContext
, object, ValueTask>? _controllerActivatorReleaseAsync;
40
public Func<
ControllerContext
, object> CreateActivator(ControllerActionDescriptor descriptor)
63
public Action<
ControllerContext
, object>? CreateReleaser(ControllerActionDescriptor descriptor)
81
public Func<
ControllerContext
, object, ValueTask>? CreateAsyncReleaser(ControllerActionDescriptor descriptor)
103
private static void Dispose(
ControllerContext
context, object controller)
110
private static ValueTask DisposeAsync(
ControllerContext
context, object controller)
117
private static ValueTask SyncDisposeAsync(
ControllerContext
context, object controller)
Controllers\ControllerBinderDelegate.cs (1)
7
ControllerContext
controllerContext,
Controllers\ControllerBinderDelegateProvider.cs (1)
52
async Task Bind(
ControllerContext
controllerContext, object controller, Dictionary<string, object?> arguments)
Controllers\ControllerFactoryProvider.cs (9)
12
private readonly Func<
ControllerContext
, object>? _factoryCreateController;
13
private readonly Action<
ControllerContext
, object>? _factoryReleaseController;
14
private readonly Func<
ControllerContext
, object, ValueTask>? _factoryReleaseControllerAsync;
38
public Func<
ControllerContext
, object> CreateControllerFactory(ControllerActionDescriptor descriptor)
58
object CreateController(
ControllerContext
controllerContext)
73
public Action<
ControllerContext
, object>? CreateControllerReleaser(ControllerActionDescriptor descriptor)
94
public Func<
ControllerContext
, object, ValueTask>? CreateAsyncControllerReleaser(ControllerActionDescriptor descriptor)
115
private Action<
ControllerContext
, object>[] GetPropertiesToActivate(ControllerActionDescriptor actionDescriptor)
117
var propertyActivators = new Action<
ControllerContext
, object>[_propertyActivators.Length];
Controllers\DefaultControllerActivator.cs (6)
28
public object Create(
ControllerContext
controllerContext)
35
nameof(
ControllerContext
.ActionDescriptor),
36
nameof(
ControllerContext
)));
45
nameof(
ControllerContext
.ActionDescriptor)));
53
public void Release(
ControllerContext
context, object controller)
64
public ValueTask ReleaseAsync(
ControllerContext
context, object controller)
Controllers\DefaultControllerFactory.cs (5)
39
public object CreateController(
ControllerContext
context)
46
nameof(
ControllerContext
.ActionDescriptor),
47
nameof(
ControllerContext
)));
60
public void ReleaseController(
ControllerContext
context, object controller)
68
public ValueTask ReleaseControllerAsync(
ControllerContext
context, object controller)
Controllers\DefaultControllerPropertyActivator.cs (11)
13
private static readonly Func<Type, PropertyActivator<
ControllerContext
>[]> _getPropertiesToActivate =
15
private readonly ConcurrentDictionary<Type, PropertyActivator<
ControllerContext
>[]> _activateActions = new();
17
public void Activate(
ControllerContext
context, object controller)
33
public Action<
ControllerContext
, object> GetActivatorDelegate(ControllerActionDescriptor actionDescriptor)
47
void Activate(
ControllerContext
controllerContext, object controller)
59
private static PropertyActivator<
ControllerContext
>[] GetPropertiesToActivate(Type type)
61
IEnumerable<PropertyActivator<
ControllerContext
>> activators;
62
activators = PropertyActivator<
ControllerContext
>.GetPropertiesToActivate(
65
p => new PropertyActivator<
ControllerContext
>(p, c => c));
67
activators = activators.Concat(PropertyActivator<
ControllerContext
>.GetPropertiesToActivate(
70
p => new PropertyActivator<
ControllerContext
>(p, c => c)));
Controllers\IControllerActivator.cs (6)
14
/// <param name="context">The <see cref="
ControllerContext
"/> for the executing action.</param>
15
object Create(
ControllerContext
context);
20
/// <param name="context">The <see cref="
ControllerContext
"/> for the executing action.</param>
22
void Release(
ControllerContext
context, object controller);
27
/// <param name="context">The <see cref="
ControllerContext
"/> for the executing action.</param>
29
ValueTask ReleaseAsync(
ControllerContext
context, object controller)
Controllers\IControllerActivatorProvider.cs (3)
16
Func<
ControllerContext
, object> CreateActivator(ControllerActionDescriptor descriptor);
23
Action<
ControllerContext
, object>? CreateReleaser(ControllerActionDescriptor descriptor);
30
Func<
ControllerContext
, object, ValueTask>? CreateAsyncReleaser(ControllerActionDescriptor descriptor)
Controllers\IControllerFactory.cs (6)
14
/// <param name="context"><see cref="
ControllerContext
"/> for the action to execute.</param>
16
object CreateController(
ControllerContext
context);
21
/// <param name="context"><see cref="
ControllerContext
"/> for the executing action.</param>
23
void ReleaseController(
ControllerContext
context, object controller);
28
/// <param name="context"><see cref="
ControllerContext
"/> for the executing action.</param>
30
ValueTask ReleaseControllerAsync(
ControllerContext
context, object controller)
Controllers\IControllerFactoryProvider.cs (3)
16
Func<
ControllerContext
, object> CreateControllerFactory(ControllerActionDescriptor descriptor);
23
Action<
ControllerContext
, object>? CreateControllerReleaser(ControllerActionDescriptor descriptor);
30
Func<
ControllerContext
, object, ValueTask>? CreateAsyncControllerReleaser(ControllerActionDescriptor descriptor)
Controllers\IControllerPropertyActivatorFactory.cs (2)
8
void Activate(
ControllerContext
context, object controller);
10
Action<
ControllerContext
, object> GetActivatorDelegate(ControllerActionDescriptor actionDescriptor);
Controllers\ServiceBasedControllerActivator.cs (2)
15
public object Create(
ControllerContext
actionContext)
25
public virtual void Release(
ControllerContext
context, object controller)
Infrastructure\ControllerActionInvoker.cs (9)
23
private readonly
ControllerContext
_controllerContext;
37
ControllerContext
controllerContext,
49
internal
ControllerContext
ControllerContext => _controllerContext;
67
var
controllerContext = _controllerContext;
411
var
controllerContext = invoker._controllerContext;
589
public static void ExecutingControllerFactory(ILogger logger,
ControllerContext
context)
604
public static void ExecutedControllerFactory(ILogger logger,
ControllerContext
context)
619
public static void ActionMethodExecuting(ILogger logger,
ControllerContext
context, object?[]? arguments)
647
public static void ActionMethodExecuted(ILogger logger,
ControllerContext
context, IActionResult result, TimeSpan timeSpan)
Infrastructure\ControllerActionInvokerCache.cs (1)
40
public (ControllerActionInvokerCacheEntry cacheEntry, IFilterMetadata[] filters) GetCachedResult(
ControllerContext
controllerContext)
Infrastructure\ControllerActionInvokerCacheEntry.cs (4)
14
Func<
ControllerContext
, object> controllerFactory,
15
Func<
ControllerContext
, object, ValueTask>? controllerReleaser,
32
public Func<
ControllerContext
, object> ControllerFactory { get; }
34
public Func<
ControllerContext
, object, ValueTask>? ControllerReleaser { get; }
Infrastructure\ControllerActionInvokerProvider.cs (1)
72
var
controllerContext = new ControllerContext(context.ActionContext)
ModelBinding\CompositeValueProvider.cs (2)
40
/// <param name="controllerContext">The <see cref="
ControllerContext
"/> associated with the current request.</param>
45
public static async Task<CompositeValueProvider> CreateAsync(
ControllerContext
controllerContext)
Routing\ControllerRequestDelegateFactory.cs (1)
88
var
controllerContext = new ControllerContext(context, routeData, controller)
Microsoft.AspNetCore.Mvc.ViewFeatures (9)
ViewDataDictionaryControllerPropertyActivator.cs (9)
16
private readonly Func<Type, PropertyActivator<
ControllerContext
>[]> _getPropertiesToActivate;
18
private ConcurrentDictionary<Type, PropertyActivator<
ControllerContext
>[]> _activateActions;
33
public void Activate(
ControllerContext
actionContext, object controller)
53
public Action<
ControllerContext
, object> GetActivatorDelegate(ControllerActionDescriptor actionDescriptor)
66
void Activate(
ControllerContext
controllerContext, object controller)
78
private PropertyActivator<
ControllerContext
>[] GetPropertiesToActivate(Type type)
80
var activators = PropertyActivator<
ControllerContext
>.GetPropertiesToActivate(
83
p => new PropertyActivator<
ControllerContext
>(p, GetViewDataDictionary));
88
private ViewDataDictionary GetViewDataDictionary(
ControllerContext
context)