94 instantiations of PageContext
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
BindPropertyIntegrationTest.cs (1)
227
var pageContext = new
PageContext
Microsoft.AspNetCore.Mvc.RazorPages (3)
Infrastructure\PageActionInvokerProvider.cs (1)
81
var pageContext = new
PageContext
(actionContext)
Infrastructure\PageRequestDelegateFactory.cs (1)
94
var pageContext = new
PageContext
(context, routeData, page);
PageModel.cs (1)
45
_pageContext = new
PageContext
();
Microsoft.AspNetCore.Mvc.RazorPages.Test (90)
Filters\PageHandlerResultFilterTest.cs (4)
18
var pageContext = new
PageContext
(new ActionContext(
56
var pageContext = new
PageContext
(new ActionContext(
97
var pageContext = new
PageContext
(new ActionContext(
139
var pageContext = new
PageContext
(new ActionContext(
Filters\PageSaveTempDataPropertyFilterTest.cs (3)
59
new
PageContext
()
100
new
PageContext
()
140
new
PageContext
()
Filters\PageViewDataAttributeFilterTest.cs (2)
25
var pageContext = new
PageContext
(actionContext);
44
var pageContext = new
PageContext
(actionContext);
Infrastructure\DefaultPageActivatorProviderTest.cs (8)
33
var pageContext = new
PageContext
();
59
var pageContext = new
PageContext
();
72
var context = new
PageContext
();
92
var context = new
PageContext
();
110
var context = new
PageContext
();
131
var context = new
PageContext
();
152
var context = new
PageContext
();
173
var context = new
PageContext
();
Infrastructure\DefaultPageFactoryProviderTest.cs (10)
49
var pageContext = new
PageContext
69
var pageContext = new
PageContext
115
var pageContext = new
PageContext
135
var pageContext = new
PageContext
162
var pageContext = new
PageContext
189
var pageContext = new
PageContext
215
var pageContext = new
PageContext
254
var pageContext = new
PageContext
297
var pageContext = new
PageContext
335
var pageContext = new
PageContext
Infrastructure\DefaultPageHandlerMethodSelectorTest.cs (15)
26
var pageContext = new
PageContext
73
var pageContext = new
PageContext
124
var pageContext = new
PageContext
169
var pageContext = new
PageContext
206
var pageContext = new
PageContext
248
var pageContext = new
PageContext
292
var pageContext = new
PageContext
342
var pageContext = new
PageContext
393
var pageContext = new
PageContext
443
var pageContext = new
PageContext
488
var pageContext = new
PageContext
539
var pageContext = new
PageContext
583
var pageContext = new
PageContext
638
var pageContext = new
PageContext
692
var pageContext = new
PageContext
Infrastructure\DefaultPageModelActivatorProviderTest.cs (8)
46
var pageContext = new
PageContext
76
var pageContext = new
PageContext
96
var context = new
PageContext
();
116
var context = new
PageContext
();
134
var context = new
PageContext
();
156
var context = new
PageContext
();
177
var context = new
PageContext
();
198
var context = new
PageContext
();
Infrastructure\DefaultPageModelFactoryProviderTest.cs (6)
16
var pageContext = new
PageContext
();
31
var pageContext = new
PageContext
();
49
var pageContext = new
PageContext
();
69
var pageContext = new
PageContext
();
90
var pageContext = new
PageContext
();
112
var pageContext = new
PageContext
();
Infrastructure\DisallowOptionsRequestsPageFilterTest.cs (1)
128
var pageContext = new
PageContext
(actionContext);
Infrastructure\PageActionInvokerTest.cs (1)
1504
var pageContext = new
PageContext
()
Infrastructure\PageBinderFactoryTest.cs (1)
798
return new
PageContext
()
Infrastructure\PageHandlerPageFilterTest.cs (4)
18
var pageContext = new
PageContext
(new ActionContext(
57
var pageContext = new
PageContext
(new ActionContext(
99
var pageContext = new
PageContext
(new ActionContext(
142
var pageContext = new
PageContext
(new ActionContext(
Infrastructure\ServiceBasedPageModelActivatorProviderTest.cs (4)
38
var pageContext = new
PageContext
70
var pageContext = new
PageContext
104
var context = new
PageContext
127
var context = new
PageContext
();
PageLoggerExtensionsTest.cs (6)
21
var context = new
PageContext
49
var context = new
PageContext
77
var context = new
PageContext
105
var context = new
PageContext
135
var context = new
PageContext
();
168
var context = new
PageContext
();
PageModelTest.cs (13)
1448
PageContext = new
PageContext
1474
PageContext = new
PageContext
1727
var pageContext = new
PageContext
(actionContext)
1761
PageContext = new
PageContext
1796
var pageContext = new
PageContext
1831
PageContext = new
PageContext
()
1846
var pageContext = new
PageContext
(new ActionContext(
1880
var pageContext = new
PageContext
(new ActionContext(
1915
var pageContext = new
PageContext
(new ActionContext(
1943
PageContext = new
PageContext
1967
PageContext = new
PageContext
1991
PageContext = new
PageContext
2013
PageContext = new
PageContext
PageTest.cs (4)
29
var pageContext = new
PageContext
(actionContext)
1438
PageContext = new
PageContext
1464
PageContext = new
PageContext
1839
PageContext = new
PageContext
197 references to PageContext
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
BindPropertyIntegrationTest.cs (1)
227
var
pageContext = new PageContext
Microsoft.AspNetCore.Mvc.RazorPages (99)
Filters\PageHandlerExecutedContext.cs (2)
23
/// <param name="pageContext">The <see cref="
PageContext
"/> associated with the current request.</param>
28
PageContext
pageContext,
Filters\PageHandlerExecutingContext.cs (2)
19
/// <param name="pageContext">The <see cref="
PageContext
"/> associated with the current request.</param>
25
PageContext
pageContext,
Filters\PageHandlerSelectedContext.cs (2)
19
/// <param name="pageContext">The <see cref="
PageContext
"/> associated with the current request.</param>
23
PageContext
pageContext,
Infrastructure\DefaultPageActivatorProvider.cs (12)
15
private readonly Action<
PageContext
, ViewContext, object> _disposer = Dispose;
16
private readonly Func<
PageContext
, ViewContext, object, ValueTask> _asyncDisposer = AsyncDispose;
17
private readonly Func<
PageContext
, ViewContext, object, ValueTask> _syncAsyncDisposer = SyncAsyncDispose;
20
public Func<
PageContext
, ViewContext, object> CreateActivator(CompiledPageActionDescriptor actionDescriptor)
36
public Action<
PageContext
, ViewContext, object>? CreateReleaser(CompiledPageActionDescriptor actionDescriptor)
48
public Func<
PageContext
, ViewContext, object, ValueTask>? CreateAsyncReleaser(CompiledPageActionDescriptor actionDescriptor)
65
private static Func<
PageContext
, ViewContext, object> CreatePageFactory(Type pageTypeInfo)
67
var parameter1 = Expression.Parameter(typeof(
PageContext
), "pageContext");
75
.Lambda<Func<
PageContext
, ViewContext, object>>(newExpression, parameter1, parameter2)
80
private static void Dispose(
PageContext
context, ViewContext viewContext, object page)
89
private static ValueTask SyncAsyncDispose(
PageContext
context, ViewContext viewContext, object page)
95
private static ValueTask AsyncDispose(
PageContext
context, ViewContext viewContext, object page)
Infrastructure\DefaultPageFactoryProvider.cs (3)
42
public Func<
PageContext
, ViewContext, object> CreatePageFactory(CompiledPageActionDescriptor actionDescriptor)
70
public Action<
PageContext
, ViewContext, object>? CreatePageDisposer(CompiledPageActionDescriptor descriptor)
77
public Func<
PageContext
, ViewContext, object, ValueTask>? CreateAsyncPageDisposer(CompiledPageActionDescriptor descriptor)
Infrastructure\DefaultPageHandlerMethodSelector.cs (4)
14
public HandlerMethodDescriptor? Select(
PageContext
context)
64
private static List<HandlerMethodDescriptor> SelectHandlers(
PageContext
context)
147
private static string? GetHandlerName(
PageContext
context)
163
private static string? GetFuzzyMatchHttpMethod(
PageContext
context)
Infrastructure\DefaultPageModelActivatorProvider.cs (9)
14
private readonly Action<
PageContext
, object> _disposer = Dispose;
15
private readonly Func<
PageContext
, object, ValueTask> _asyncDisposer = DisposeAsync;
16
private readonly Func<
PageContext
, object, ValueTask> _syncAsyncDisposer = SyncDisposeAsync;
19
public Func<
PageContext
, object> CreateActivator(CompiledPageActionDescriptor actionDescriptor)
36
public Action<
PageContext
, object>? CreateReleaser(CompiledPageActionDescriptor actionDescriptor)
48
public Func<
PageContext
, object, ValueTask>? CreateAsyncReleaser(CompiledPageActionDescriptor actionDescriptor)
65
private static void Dispose(
PageContext
context, object page)
73
private static ValueTask DisposeAsync(
PageContext
context, object page)
81
private static ValueTask SyncDisposeAsync(
PageContext
context, object page)
Infrastructure\DefaultPageModelFactoryProvider.cs (7)
11
private static readonly Func<PropertyInfo, PropertyActivator<
PageContext
>> _createActivateInfo =
20
public Func<
PageContext
, object>? CreateModelFactory(CompiledPageActionDescriptor descriptor)
30
var propertyActivator = PropertyActivator<
PageContext
>.GetPropertiesToActivate(
48
public Action<
PageContext
, object>? CreateModelDisposer(CompiledPageActionDescriptor descriptor)
60
public Func<
PageContext
, object, ValueTask>? CreateAsyncModelDisposer(CompiledPageActionDescriptor descriptor)
72
private static PropertyActivator<
PageContext
> CreateActivateInfo(PropertyInfo property) =>
73
new PropertyActivator<
PageContext
>(property, pageContext => pageContext);
Infrastructure\IPageHandlerMethodSelector.cs (2)
14
/// <param name="context">The <see cref="
PageContext
"/>.</param>
16
HandlerMethodDescriptor? Select(
PageContext
context);
Infrastructure\PageActionInvoker.cs (3)
19
private readonly
PageContext
_pageContext;
40
PageContext
pageContext,
69
internal
PageContext
PageContext => _pageContext;
Infrastructure\PageActionInvokerCache.cs (2)
85
Func<
PageContext
, object>? modelFactory = null;
86
Func<
PageContext
, object, ValueTask>? modelReleaser = null;
Infrastructure\PageActionInvokerCacheEntry.cs (10)
17
Func<
PageContext
, ViewContext, object> pageFactory,
18
Func<
PageContext
, ViewContext, object, ValueTask>? releasePage,
19
Func<
PageContext
, object>? modelFactory,
20
Func<
PageContext
, object, ValueTask>? releaseModel,
21
Func<
PageContext
, object, Task> propertyBinder,
42
public Func<
PageContext
, ViewContext, object> PageFactory { get; }
47
public Func<
PageContext
, ViewContext, object, ValueTask>? ReleasePage { get; }
49
public Func<
PageContext
, object>? ModelFactory { get; }
54
public Func<
PageContext
, object, ValueTask>? ReleaseModel { get; }
60
public Func<
PageContext
, object, Task> PropertyBinder { get; }
Infrastructure\PageActionInvokerProvider.cs (1)
81
var
pageContext = new PageContext(actionContext)
Infrastructure\PageBinderFactory.cs (4)
10
internal static readonly Func<
PageContext
, object, Task> NullPropertyBinder = (context, arguments) => Task.CompletedTask;
13
public static Func<
PageContext
, object, Task> CreatePropertyBinder(
46
async Task Bind(
PageContext
pageContext, object instance)
127
async Task Bind(
PageContext
pageContext, IDictionary<string, object?> arguments)
Infrastructure\PageHandlerBinderDelegate.cs (1)
6
internal delegate Task PageHandlerBinderDelegate(
PageContext
pageContext, IDictionary<string, object?> arguments);
Infrastructure\PageRequestDelegateFactory.cs (1)
94
var
pageContext = new PageContext(context, routeData, page);
Infrastructure\PageResultExecutor.cs (2)
51
public virtual Task ExecuteAsync(
PageContext
pageContext, PageResult result)
97
private static void OnExecuting(
PageContext
pageContext)
Infrastructure\ServiceBasedPageModelActivatorProvider.cs (2)
14
public Func<
PageContext
, object> CreateActivator(CompiledPageActionDescriptor descriptor)
34
public Action<
PageContext
, object>? CreateReleaser(CompiledPageActionDescriptor descriptor)
IPageActivatorProvider.cs (3)
18
Func<
PageContext
, ViewContext, object> CreateActivator(CompiledPageActionDescriptor descriptor);
25
Action<
PageContext
, ViewContext, object>? CreateReleaser(CompiledPageActionDescriptor descriptor);
32
Func<
PageContext
, ViewContext, object, ValueTask>? CreateAsyncReleaser(CompiledPageActionDescriptor descriptor)
IPageFactoryProvider.cs (4)
14
/// Creates a factory for producing Razor pages for the specified <see cref="
PageContext
"/>.
18
Func<
PageContext
, ViewContext, object> CreatePageFactory(CompiledPageActionDescriptor descriptor);
25
Action<
PageContext
, ViewContext, object>? CreatePageDisposer(CompiledPageActionDescriptor descriptor);
32
Func<
PageContext
, ViewContext, object, ValueTask>? CreateAsyncPageDisposer(CompiledPageActionDescriptor descriptor)
IPageModelActivatorProvider.cs (3)
16
Func<
PageContext
, object> CreateActivator(CompiledPageActionDescriptor descriptor);
23
Action<
PageContext
, object>? CreateReleaser(CompiledPageActionDescriptor descriptor);
30
Func<
PageContext
, object, ValueTask>? CreateAsyncReleaser(CompiledPageActionDescriptor descriptor)
IPageModelFactoryProvider.cs (4)
12
/// Creates a factory for producing models for Razor Pages given the specified <see cref="
PageContext
"/>.
16
Func<
PageContext
, object>? CreateModelFactory(CompiledPageActionDescriptor descriptor);
23
Action<
PageContext
, object>? CreateModelDisposer(CompiledPageActionDescriptor descriptor);
30
Func<
PageContext
, object, ValueTask>? CreateAsyncModelDisposer(CompiledPageActionDescriptor descriptor)
PageBase.cs (2)
32
/// The <see cref="RazorPages.
PageContext
"/>.
34
public
PageContext
PageContext { get; set; } = default!;
PageContext.cs (3)
25
/// Creates an empty <see cref="
PageContext
"/>.
35
/// Initializes a new instance of <see cref="
PageContext
"/>.
44
/// Initializes a new instance of <see cref="
PageContext
"/>.
PageContextAttribute.cs (1)
7
/// Specifies that a Razor Page model property should be set with the current <see cref="
PageContext
"/> when creating
PageLoggerExtensions.cs (6)
22
public static void ExecutingPageModelFactory(this ILogger logger,
PageContext
context)
37
public static void ExecutedPageModelFactory(this ILogger logger,
PageContext
context)
52
public static void ExecutingPageFactory(this ILogger logger,
PageContext
context)
67
public static void ExecutedPageFactory(this ILogger logger,
PageContext
context)
85
public static void ExecutingHandlerMethod(this ILogger logger,
PageContext
context, HandlerMethodDescriptor handler, object?[]? arguments)
111
public static void ExecutingImplicitHandlerMethod(this ILogger logger,
PageContext
context)
PageModel.cs (3)
33
private
PageContext
? _pageContext;
36
/// Gets the <see cref="RazorPages.
PageContext
"/>.
39
public
PageContext
PageContext
PageResult.cs (1)
52
if (!(context is
PageContext
pageContext))
Microsoft.AspNetCore.Mvc.RazorPages.Test (97)
Filters\PageHandlerResultFilterTest.cs (4)
18
var
pageContext = new PageContext(new ActionContext(
56
var
pageContext = new PageContext(new ActionContext(
97
var
pageContext = new PageContext(new ActionContext(
139
var
pageContext = new PageContext(new ActionContext(
Filters\PageViewDataAttributeFilterTest.cs (2)
25
var
pageContext = new PageContext(actionContext);
44
var
pageContext = new PageContext(actionContext);
Infrastructure\DefaultPageActivatorProviderTest.cs (8)
33
var
pageContext = new PageContext();
59
var
pageContext = new PageContext();
72
var
context = new PageContext();
92
var
context = new PageContext();
110
var
context = new PageContext();
131
var
context = new PageContext();
152
var
context = new PageContext();
173
var
context = new PageContext();
Infrastructure\DefaultPageFactoryProviderTest.cs (10)
49
var
pageContext = new PageContext
69
var
pageContext = new PageContext
115
var
pageContext = new PageContext
135
var
pageContext = new PageContext
162
var
pageContext = new PageContext
189
var
pageContext = new PageContext
215
var
pageContext = new PageContext
254
var
pageContext = new PageContext
297
var
pageContext = new PageContext
335
var
pageContext = new PageContext
Infrastructure\DefaultPageHandlerMethodSelectorTest.cs (15)
26
var
pageContext = new PageContext
73
var
pageContext = new PageContext
124
var
pageContext = new PageContext
169
var
pageContext = new PageContext
206
var
pageContext = new PageContext
248
var
pageContext = new PageContext
292
var
pageContext = new PageContext
342
var
pageContext = new PageContext
393
var
pageContext = new PageContext
443
var
pageContext = new PageContext
488
var
pageContext = new PageContext
539
var
pageContext = new PageContext
583
var
pageContext = new PageContext
638
var
pageContext = new PageContext
692
var
pageContext = new PageContext
Infrastructure\DefaultPageModelActivatorProviderTest.cs (8)
46
var
pageContext = new PageContext
76
var
pageContext = new PageContext
96
var
context = new PageContext();
116
var
context = new PageContext();
134
var
context = new PageContext();
156
var
context = new PageContext();
177
var
context = new PageContext();
198
var
context = new PageContext();
Infrastructure\DefaultPageModelFactoryProviderTest.cs (10)
16
var
pageContext = new PageContext();
31
var
pageContext = new PageContext();
49
var
pageContext = new PageContext();
69
var
pageContext = new PageContext();
90
var
pageContext = new PageContext();
92
Action<
PageContext
, object> disposer = (_, __) => { };
112
var
pageContext = new PageContext();
114
Func<
PageContext
, object, ValueTask> disposer = (_, __) => default;
151
public
PageContext
ContextWithAttribute { get; set; }
153
public
PageContext
ContextWithoutAttribute { get; set; }
Infrastructure\DisallowOptionsRequestsPageFilterTest.cs (1)
128
var
pageContext = new PageContext(actionContext);
Infrastructure\PageActionInvokerProviderTest.cs (7)
36
Func<
PageContext
, ViewContext, object> factory = (a, b) => null;
37
Func<
PageContext
, ViewContext, object, ValueTask> releaser = (a, b, c) => default;
88
Func<
PageContext
, ViewContext, object> factory = (a, b) => null;
89
Func<
PageContext
, ViewContext, object, ValueTask> releaser = (a, b, c) => default;
90
Func<
PageContext
, object> modelFactory = _ => null;
91
Func<
PageContext
, object, ValueTask> modelDisposer = (_, __) => default;
139
var
pageContext = actionInvoker.PageContext;
Infrastructure\PageActionInvokerTest.cs (10)
109
var
pageContext = Assert.IsType<PageActionInvoker>(invoker).PageContext;
143
var
pageContext = Assert.IsType<PageActionInvoker>(invoker).PageContext;
1484
Func<
PageContext
, object> modelFactory = null,
1504
var
pageContext = new PageContext()
1521
object pageFactory(
PageContext
context, ViewContext viewContext)
1561
.Setup(s => s.Select(It.IsAny<
PageContext
>()))
1562
.Returns<
PageContext
>(c => c.ActionDescriptor.HandlerMethods.FirstOrDefault());
1674
private readonly Func<
PageContext
, Task> _executeAction;
1681
public TestPageResultExecutor(Func<
PageContext
, Task> executeAction)
1693
public override Task ExecuteAsync(
PageContext
pageContext, PageResult result)
Infrastructure\PageBinderFactoryTest.cs (2)
727
var
pageContext = GetPageContext();
783
private
PageContext
GetPageContext(string httpMethod = null)
Infrastructure\PageHandlerPageFilterTest.cs (4)
18
var
pageContext = new PageContext(new ActionContext(
57
var
pageContext = new PageContext(new ActionContext(
99
var
pageContext = new PageContext(new ActionContext(
142
var
pageContext = new PageContext(new ActionContext(
Infrastructure\ServiceBasedPageModelActivatorProviderTest.cs (4)
38
var
pageContext = new PageContext
70
var
pageContext = new PageContext
104
var
context = new PageContext
127
var
context = new PageContext();
PageLoggerExtensionsTest.cs (6)
21
var
context = new PageContext
49
var
context = new PageContext
77
var
context = new PageContext
105
var
context = new PageContext
135
var
context = new PageContext();
168
var
context = new PageContext();
PageModelTest.cs (5)
1727
var
pageContext = new PageContext(actionContext)
1796
var
pageContext = new PageContext
1846
var
pageContext = new PageContext(new ActionContext(
1880
var
pageContext = new PageContext(new ActionContext(
1915
var
pageContext = new PageContext(new ActionContext(
PageTest.cs (1)
29
var
pageContext = new PageContext(actionContext)