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