2 implementations of IRazorPage
Microsoft.AspNetCore.Mvc.Razor (1)
RazorPageBase.cs (1)
25public abstract class RazorPageBase : IRazorPage
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\RazorPageAdapter.cs (1)
15public class RazorPageAdapter : IRazorPage, IModelTypeProvider
175 references to IRazorPage
Microsoft.AspNetCore.Mvc.Razor (57)
Compilation\DefaultRazorPageFactoryProvider.cs (2)
45var pathProperty = viewType.GetProperty(nameof(IRazorPage.Path))!; 52.Lambda<Func<IRazorPage>>(objectInitializeExpression)
Diagnostics\MvcDiagnostics.cs (6)
30public BeforeViewPageEventData(IRazorPage page, ViewContext viewContext, ActionDescriptor actionDescriptor, HttpContext httpContext) 39/// The <see cref="IRazorPage"/>. 41public IRazorPage Page { get; } 91public AfterViewPageEventData(IRazorPage page, ViewContext viewContext, ActionDescriptor actionDescriptor, HttpContext httpContext) 100/// The <see cref="IRazorPage"/>. 102public IRazorPage Page { get; }
IRazorPageActivator.cs (2)
9/// Provides methods to activate properties on a <see cref="IRazorPage"/> instance. 18void Activate(IRazorPage page, ViewContext context);
IRazorPageFactoryProvider.cs (2)
7/// Defines methods that are used for creating <see cref="IRazorPage"/> instances at a given path. 12/// Creates a <see cref="IRazorPage"/> factory for the specified path.
MvcRazorDiagnosticListenerExtensions.cs (4)
14IRazorPage page, 26IRazorPage page, 44IRazorPage page, 56IRazorPage page,
RazorPageActivator.cs (2)
58public void Activate(IRazorPage page, ViewContext context) 67internal RazorPagePropertyActivator GetOrAddCacheEntry(IRazorPage page)
RazorPageFactoryResult.cs (5)
16/// specified <see cref="IRazorPage"/> factory. 18/// <param name="razorPageFactory">The <see cref="IRazorPage"/> factory.</param> 22Func<IRazorPage>? razorPageFactory) 29/// The <see cref="IRazorPage"/> factory. 32public Func<IRazorPage>? RazorPageFactory { get; }
RazorPageResult.cs (5)
7/// Result of locating a <see cref="IRazorPage"/>. 15/// <param name="page">The located <see cref="IRazorPage"/>.</param> 16public RazorPageResult(string name, IRazorPage page) 47/// Gets the <see cref="IRazorPage"/> if found. 50public IRazorPage? Page { get; }
RazorView.cs (19)
15/// Default implementation for <see cref="IView"/> that executes one or more <see cref="IRazorPage"/> 32/// <param name="viewStartPages">The sequence of <see cref="IRazorPage" /> instances executed as _ViewStarts. 34/// <param name="razorPage">The <see cref="IRazorPage"/> instance to execute.</param> 40IReadOnlyList<IRazorPage> viewStartPages, 41IRazorPage razorPage, 64/// Gets <see cref="IRazorPage"/> instance that the views executes on. 66public IRazorPage RazorPage { get; } 69/// Gets the sequence of _ViewStart <see cref="IRazorPage"/> instances that are executed by this view. 71public IReadOnlyList<IRazorPage> ViewStartPages { get; } 73internal Action<IRazorPage, ViewContext>? OnAfterPageActivated { get; set; } 90IRazorPage page, 138private async Task RenderPageCoreAsync(IRazorPage page, ViewContext context) 165var viewStart = ViewStartPages[i]; 200var previousPage = RazorPage; 201var renderedLayouts = new List<IRazorPage>(); 219var layoutPage = GetLayoutPage(context, previousPage.Path, previousPage.Layout); 244foreach (var layoutPage in renderedLayouts) 269private IRazorPage GetLayoutPage(ViewContext context, string executingFilePath, string layoutPath) 297var layoutPage = layoutPageResult.Page;
RazorViewEngine.cs (4)
121var razorPage = cacheResult.ViewEntry.PageFactory(); 144var razorPage = cacheResult.ViewEntry.PageFactory(); 462var page = result.ViewEntry.PageFactory(); 464var viewStarts = new IRazorPage[result.ViewStartEntries!.Count];
ViewLocationCacheItem.cs (6)
14/// <param name="razorPageFactory">The <see cref="IRazorPage"/> factory.</param> 15/// <param name="location">The application relative path of the <see cref="IRazorPage"/>.</param> 16public ViewLocationCacheItem(Func<IRazorPage> razorPageFactory, string location) 23/// Gets the application relative path of the <see cref="IRazorPage"/> 28/// Gets the <see cref="IRazorPage"/> factory. 30public Func<IRazorPage> PageFactory { get; }
Microsoft.AspNetCore.Mvc.Razor.Test (108)
Compilation\DefaultRazorPageFactoryProviderTest.cs (1)
96var actual = result.RazorPageFactory();
RazorViewEngineTest.cs (72)
133var page = Mock.Of<IRazorPage>(); 134var viewStart1 = Mock.Of<IRazorPage>(); 135var viewStart2 = Mock.Of<IRazorPage>(); 168var page = Mock.Of<IRazorPage>(); 169var viewStart = Mock.Of<IRazorPage>(); 299var page = Mock.Of<IRazorPage>(); 300var viewStart1 = Mock.Of<IRazorPage>(); 301var viewStart2 = Mock.Of<IRazorPage>(); 338var page = Mock.Of<IRazorPage>(); 366var page = Mock.Of<IRazorPage>(); 395var page = Mock.Of<IRazorPage>(); 421var page = Mock.Of<IRazorPage>(); 449var page = Mock.Of<IRazorPage>(); 477var page = Mock.Of<IRazorPage>(); 505var page = Mock.Of<IRazorPage>(); 532var areaPage = Mock.Of<IRazorPage>(); 533var nonAreaPage = Mock.Of<IRazorPage>(); 596var areaPage1 = Mock.Of<IRazorPage>(); 597var areaPage2 = Mock.Of<IRazorPage>(); 668.Returns(GetPageFactoryResult(() => Mock.Of<IRazorPage>())) 736.Returns(GetPageFactoryResult(() => Mock.Of<IRazorPage>())) 796.Returns(GetPageFactoryResult(() => Mock.Of<IRazorPage>())) 824var page = Mock.Of<IRazorPage>(); 865var page = Mock.Of<IRazorPage>(); 902var page1 = Mock.Of<IRazorPage>(); 903var page2 = Mock.Of<IRazorPage>(); 1006var page = Mock.Of<IRazorPage>(); 1149var page = Mock.Of<IRazorPage>(); 1208var page = Mock.Of<IRazorPage>(); 1287var page = new Mock<IRazorPage>(MockBehavior.Strict); 1422var page = Mock.Of<IRazorPage>(); 1450var page = Mock.Of<IRazorPage>(); 1478var page = Mock.Of<IRazorPage>(); 1908.Returns(GetPageFactoryResult(() => Mock.Of<IRazorPage>())) 1926.Returns(GetPageFactoryResult(() => Mock.Of<IRazorPage>())) 1948.Returns(GetPageFactoryResult(() => Mock.Of<IRazorPage>())) 1966.Returns(GetPageFactoryResult(() => Mock.Of<IRazorPage>())) 1983var page = Mock.Of<IRazorPage>(); 1984var hotReloadedPage = Mock.Of<IRazorPage>(); 2033.Returns(GetPageFactoryResult(() => Mock.Of<IRazorPage>())); 2039Func<IRazorPage> factory,
RazorViewTest.cs (35)
41new IRazorPage[0], 71new IRazorPage[0], 80.Callback((IRazorPage p, ViewContext c) => 114new IRazorPage[0], 123.Callback((IRazorPage p, ViewContext c) => 217new IRazorPage[0], 266new IRazorPage[0], 291new IRazorPage[0], 317new IRazorPage[0], 346new IRazorPage[0], 446new IRazorPage[0], 534new IRazorPage[0], 577new IRazorPage[0], 622new IRazorPage[0], 698new IRazorPage[0], 739new IRazorPage[0], 806new IRazorPage[0], 875new IRazorPage[0], 938new IRazorPage[0], 1007new IRazorPage[0], 1042new IRazorPage[0], 1110new IRazorPage[0], 1184new IRazorPage[0], 1225new IRazorPage[0], 1279new IRazorPage[0], 1349new IRazorPage[0], 1407new IRazorPage[0], 1462new IRazorPage[0], 1493new IRazorPage[0], 1540new IRazorPage[0], 1750var expected = new HashSet<IRazorPage>(); 1753var activated = new HashSet<IRazorPage>(); 1755pageActivator.Setup(p => p.Activate(It.IsAny<IRazorPage>(), It.IsAny<ViewContext>())) 1756.Callback((IRazorPage p, ViewContext v) => activated.Add(p)); 1778void AssertActivated(IRazorPage p, ViewContext v)
Microsoft.AspNetCore.Mvc.RazorPages (7)
Infrastructure\PageActionInvokerCache.cs (2)
113internal List<Func<IRazorPage>> GetViewStartFactories(CompiledPageActionDescriptor descriptor) 115var viewStartFactories = new List<Func<IRazorPage>>();
Infrastructure\PageActionInvokerCacheEntry.cs (2)
24IReadOnlyList<Func<IRazorPage>> viewStartFactories, 71public IReadOnlyList<Func<IRazorPage>> ViewStartFactories { get; }
Infrastructure\PageResultExecutor.cs (1)
63var viewStarts = new IRazorPage[pageContext.ViewStartFactories.Count];
PageContext.cs (2)
22private IList<Func<IRazorPage>>? _viewStartFactories; 112public virtual IList<Func<IRazorPage>> ViewStartFactories
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
Infrastructure\PageActionInvokerProviderTest.cs (2)
163Func<IRazorPage> factory1 = () => null; 164Func<IRazorPage> factory2 = () => null;
Infrastructure\PageActionInvokerTest.cs (1)
1510ViewStartFactories = new List<Func<IRazorPage>>(),