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