14 instantiations of ViewComponentContext
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ViewComponent.cs (1)
113
_viewComponentContext = new
ViewComponentContext
();
ViewComponents\DefaultViewComponentHelper.cs (1)
136
var context = new
ViewComponentContext
(descriptor, argumentDictionary, _htmlEncoder, _viewContext, writer);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (11)
ViewComponents\ContentViewComponentResultTest.cs (1)
57
var viewComponentContext = new
ViewComponentContext
(
ViewComponents\DefaultViewComponentActivatorTests.cs (1)
83
return new
ViewComponentContext
ViewComponents\DefaultViewComponentFactoryTest.cs (4)
14
var context = new
ViewComponentContext
39
var context = new
ViewComponentContext
62
var context = new
ViewComponentContext
86
var context = new
ViewComponentContext
ViewComponents\HtmlContentViewComponentResultTest.cs (1)
57
var viewComponentContext = new
ViewComponentContext
(
ViewComponents\ViewComponentContextTest.cs (2)
36
var viewComponentContext = new
ViewComponentContext
(
96
var viewComponentContext = new
ViewComponentContext
(
ViewComponents\ViewViewComponentResultTest.cs (1)
537
var viewComponentContext = new
ViewComponentContext
(
ViewComponentTests.cs (1)
244
var viewComponentContext = new
ViewComponentContext
();
TagHelpersWebSite (1)
TagHelpers\TagCloudViewComponentTagHelper.cs (1)
56
await result.ExecuteAsync(new
ViewComponentContext
(
123 references to ViewComponentContext
Microsoft.AspNetCore.Mvc.ViewFeatures (81)
Diagnostics\MvcDiagnostics.cs (8)
27
public BeforeViewComponentEventData(ActionDescriptor actionDescriptor,
ViewComponentContext
viewComponentContext, object viewComponent)
42
public
ViewComponentContext
ViewComponentContext { get; }
79
public AfterViewComponentEventData(ActionDescriptor actionDescriptor,
ViewComponentContext
viewComponentContext, IViewComponentResult viewComponentResult, object viewComponent)
95
public
ViewComponentContext
ViewComponentContext { get; }
137
public ViewComponentBeforeViewExecuteEventData(ActionDescriptor actionDescriptor,
ViewComponentContext
viewComponentContext, IView view)
151
public
ViewComponentContext
ViewComponentContext { get; }
187
public ViewComponentAfterViewExecuteEventData(ActionDescriptor actionDescriptor,
ViewComponentContext
viewComponentContext, IView view)
202
public
ViewComponentContext
ViewComponentContext { get; }
IViewComponentResult.cs (4)
16
/// <param name="context">The <see cref="
ViewComponentContext
"/> for the current component execution.</param>
17
void Execute(
ViewComponentContext
context);
23
/// <param name="context">The <see cref="
ViewComponentContext
"/> for the current component execution.</param>
25
Task ExecuteAsync(
ViewComponentContext
context);
MvcViewFeaturesDiagnosticListenerExtensions.cs (8)
16
ViewComponentContext
context,
26
private static void BeforeViewComponentImpl(DiagnosticListener diagnosticListener,
ViewComponentContext
context, object viewComponent)
42
ViewComponentContext
context,
53
private static void AfterViewComponentImpl(DiagnosticListener diagnosticListener,
ViewComponentContext
context, IViewComponentResult result, object viewComponent)
70
ViewComponentContext
context,
80
private static void ViewComponentBeforeViewExecuteImpl(DiagnosticListener diagnosticListener,
ViewComponentContext
context, IView view)
96
ViewComponentContext
context,
106
private static void ViewComponentAfterViewExecuteImpl(DiagnosticListener diagnosticListener,
ViewComponentContext
context, IView view)
ViewComponent.cs (2)
28
private
ViewComponentContext
? _viewComponentContext;
106
public
ViewComponentContext
ViewComponentContext
ViewComponents\ContentViewComponentResult.cs (4)
36
/// <param name="context">The <see cref="
ViewComponentContext
"/>.</param>
37
public void Execute(
ViewComponentContext
context)
47
/// <param name="context">The <see cref="
ViewComponentContext
"/>.</param>
49
public Task ExecuteAsync(
ViewComponentContext
context)
ViewComponents\DefaultViewComponentActivator.cs (4)
14
/// <see cref="
ViewComponentContext
"/> to a public property of a view component marked
35
public object Create(
ViewComponentContext
context)
56
public void Release(
ViewComponentContext
context, object viewComponent)
74
public ValueTask ReleaseAsync(
ViewComponentContext
context, object viewComponent)
ViewComponents\DefaultViewComponentFactory.cs (10)
16
private readonly Func<Type, PropertyActivator<
ViewComponentContext
>[]> _getPropertiesToActivate;
17
private readonly ConcurrentDictionary<Type, PropertyActivator<
ViewComponentContext
>[]> _injectActions;
31
_getPropertiesToActivate = type => PropertyActivator<
ViewComponentContext
>.GetPropertiesToActivate(
36
_injectActions = new ConcurrentDictionary<Type, PropertyActivator<
ViewComponentContext
>[]>();
40
public object CreateViewComponent(
ViewComponentContext
context)
51
private void InjectProperties(
ViewComponentContext
context, object viewComponent)
64
private static PropertyActivator<
ViewComponentContext
> CreateActivateInfo(PropertyInfo property)
66
return new PropertyActivator<
ViewComponentContext
>(property, context => context);
70
public void ReleaseViewComponent(
ViewComponentContext
context, object component)
79
public ValueTask ReleaseViewComponentAsync(
ViewComponentContext
context, object component)
ViewComponents\DefaultViewComponentHelper.cs (1)
136
var
context = new ViewComponentContext(descriptor, argumentDictionary, _htmlEncoder, _viewContext, writer);
ViewComponents\DefaultViewComponentInvoker.cs (6)
51
public async Task InvokeAsync(
ViewComponentContext
context)
91
private async Task<IViewComponentResult> InvokeAsyncCore(ObjectMethodExecutor executor, object component,
ViewComponentContext
context)
148
private IViewComponentResult InvokeSyncCore(ObjectMethodExecutor executor, object component,
ViewComponentContext
context)
233
public static IDisposable? ViewComponentScope(ILogger logger,
ViewComponentContext
context)
241
ViewComponentContext
context,
253
ViewComponentContext
context,
ViewComponents\DefaultViewComponentInvokerFactory.cs (1)
38
public IViewComponentInvoker CreateInstance(
ViewComponentContext
context)
ViewComponents\HtmlContentViewComponentResult.cs (4)
37
/// <param name="context">The <see cref="
ViewComponentContext
"/>.</param>
38
public void Execute(
ViewComponentContext
context)
48
/// <param name="context">The <see cref="
ViewComponentContext
"/>.</param>
50
public Task ExecuteAsync(
ViewComponentContext
context)
ViewComponents\IViewComponentActivator.cs (6)
15
/// The <see cref="
ViewComponentContext
"/> for the executing <see cref="ViewComponent"/>.
17
object Create(
ViewComponentContext
context);
23
/// The <see cref="
ViewComponentContext
"/> associated with the <paramref name="viewComponent"/>.
26
void Release(
ViewComponentContext
context, object viewComponent);
32
/// The <see cref="
ViewComponentContext
"/> associated with the <paramref name="viewComponent"/>.
36
ValueTask ReleaseAsync(
ViewComponentContext
context, object viewComponent)
ViewComponents\IViewComponentFactory.cs (4)
14
/// <param name="context"><see cref="
ViewComponentContext
"/> for the view component.</param>
16
object CreateViewComponent(
ViewComponentContext
context);
23
void ReleaseViewComponent(
ViewComponentContext
context, object component);
31
ValueTask ReleaseViewComponentAsync(
ViewComponentContext
context, object component)
ViewComponents\IViewComponentInvoker.cs (4)
12
/// Executes the view component specified by <see cref="
ViewComponentContext
.ViewComponentDescriptor"/>
13
/// of <paramref name="context"/> and writes the result to <see cref="
ViewComponentContext
.Writer"/>.
15
/// <param name="context">The <see cref="
ViewComponentContext
"/>.</param>
17
Task InvokeAsync(
ViewComponentContext
context);
ViewComponents\IViewComponentInvokerFactory.cs (2)
14
/// <param name="context">The <see cref="
ViewComponentContext
"/>.</param>
16
IViewComponentInvoker CreateInstance(
ViewComponentContext
context);
ViewComponents\ServiceBasedViewComponentActivator.cs (2)
15
public object Create(
ViewComponentContext
context)
25
public virtual void Release(
ViewComponentContext
context, object viewComponent)
ViewComponents\ViewComponentContext.cs (3)
18
/// Creates a new <see cref="
ViewComponentContext
"/>.
30
/// Creates a new <see cref="
ViewComponentContext
"/>.
33
/// The <see cref="
ViewComponentContext
"/> for the view component being invoked.
ViewComponents\ViewComponentContextAttribute.cs (1)
8
/// <see cref="
ViewComponentContext
"/> when creating the view component. The property must have a public
ViewComponents\ViewComponentInvokerCache.cs (1)
39
internal ObjectMethodExecutor GetViewComponentMethodExecutor(
ViewComponentContext
viewComponentContext)
ViewComponents\ViewViewComponentResult.cs (6)
50
/// <param name="context">The <see cref="
ViewComponentContext
"/> for the current component execution.</param>
52
/// This method synchronously calls and blocks on <see cref="ExecuteAsync(
ViewComponentContext
)"/>.
54
public void Execute(
ViewComponentContext
context)
66
/// <param name="context">The <see cref="
ViewComponentContext
"/> for the current component execution.</param>
68
public async Task ExecuteAsync(
ViewComponentContext
context)
129
private static IViewEngine ResolveViewEngine(
ViewComponentContext
context)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (42)
ViewComponents\ContentViewComponentResultTest.cs (3)
27
var
viewComponentContext = GetViewComponentContext(Mock.Of<IView>(), buffer);
37
private static
ViewComponentContext
GetViewComponentContext(IView view, Stream stream)
57
var
viewComponentContext = new ViewComponentContext(
ViewComponents\DefaultViewComponentActivatorTests.cs (8)
27
var
context = CreateContext(typeof(TestViewComponent));
51
var
context = CreateContext(typeof(VisibilityViewComponent));
71
var
context = CreateContext(typeof(SyncAndAsyncDisposableViewComponent));
81
private static
ViewComponentContext
CreateContext(Type componentType)
110
protected internal
ViewComponentContext
C { get; set; }
116
public
ViewComponentContext
Context { get; set; }
134
public
ViewComponentContext
Context { get; set; }
153
public
ViewComponentContext
Context { get; set; }
ViewComponents\DefaultViewComponentFactoryTest.cs (10)
14
var
context = new ViewComponentContext
39
var
context = new ViewComponentContext
47
.Callback<
ViewComponentContext
, object>((c, o) => (o as IDisposable)?.Dispose());
62
var
context = new ViewComponentContext
70
.Callback<
ViewComponentContext
, object>((c, o) => (o as IDisposable)?.Dispose())
86
var
context = new ViewComponentContext
94
.Callback<
ViewComponentContext
, object>((c, o) => (o as IAsyncDisposable)?.DisposeAsync())
110
public
ViewComponentContext
Context { get; set; }
128
public
ViewComponentContext
Context { get; set; }
147
public
ViewComponentContext
Context { get; set; }
ViewComponents\HtmlContentViewComponentResultTest.cs (3)
26
var
viewComponentContext = GetViewComponentContext(Mock.Of<IView>(), buffer);
38
private static
ViewComponentContext
GetViewComponentContext(IView view, Stream stream)
57
var
viewComponentContext = new ViewComponentContext(
ViewComponents\ViewComponentContextTest.cs (2)
36
var
viewComponentContext = new ViewComponentContext(
96
var
viewComponentContext = new ViewComponentContext(
ViewComponents\ViewViewComponentResultTest.cs (15)
54
var
viewComponentContext = GetViewComponentContext(view.Object, viewData);
88
var
viewComponentContext = GetViewComponentContext(view.Object, viewData);
124
var
viewComponentContext = GetViewComponentContext(view.Object, viewData, adapter);
172
var
viewComponentContext = GetViewComponentContext(view, viewData);
210
var
viewComponentContext = GetViewComponentContext(view, viewData);
250
var
viewComponentContext = GetViewComponentContext(view, viewData);
288
var
viewComponentContext = GetViewComponentContext(view.Object, viewData);
324
var
viewComponentContext = GetViewComponentContext(view, viewData);
364
var
viewComponentContext = GetViewComponentContext(view, viewData);
410
var
viewComponentContext = GetViewComponentContext(view, viewData);
438
var
viewComponentContext = GetViewComponentContext(view, viewData);
455
var
componentContext = GetViewComponentContext(new Mock<IView>().Object, viewData);
488
var
componentContext = GetViewComponentContext(new Mock<IView>().Object, viewData);
502
private static
ViewComponentContext
GetViewComponentContext(
537
var
viewComponentContext = new ViewComponentContext(
ViewComponentTests.cs (1)
244
var
viewComponentContext = new ViewComponentContext();