1 implementation of CreateFactory
Microsoft.AspNetCore.Mvc.Razor (1)
Compilation\DefaultRazorPageFactoryProvider.cs (1)
28
public RazorPageFactoryResult
CreateFactory
(string relativePath)
74 references to CreateFactory
Microsoft.AspNetCore.Mvc.Razor (3)
RazorPageFactoryResult.cs (1)
10
/// Result of <see cref="IRazorPageFactoryProvider.
CreateFactory
(string)"/>.
RazorViewEngine.cs (2)
397
var factoryResult = _pageFactory.
CreateFactory
(relativePath);
433
var result = _pageFactory.
CreateFactory
(filePath);
Microsoft.AspNetCore.Mvc.Razor.Test (61)
RazorViewEngineTest.cs (60)
138
.Setup(p => p.
CreateFactory
("/Views/bar/test-view.cshtml"))
142
.Setup(p => p.
CreateFactory
("/Views/_ViewStart.cshtml"))
146
.Setup(p => p.
CreateFactory
("/_ViewStart.cshtml"))
174
.Setup(p => p.
CreateFactory
("/Views/bar/test-view.cshtml"))
178
.Setup(p => p.
CreateFactory
("/Views/_ViewStart.cshtml"))
202
pageFactory.Verify(p => p.
CreateFactory
("/Views/bar/test-view.cshtml"), Times.Once());
304
.Setup(p => p.
CreateFactory
("/Views/bar/test-view.cshtml"))
308
.Setup(p => p.
CreateFactory
("/Views/_ViewStart.cshtml"))
312
.Setup(p => p.
CreateFactory
("/_ViewStart.cshtml"))
340
.Setup(p => p.
CreateFactory
("fake-path1/bar/test-view.rzr"))
368
.Setup(p => p.
CreateFactory
(expectedViewName))
397
.Setup(p => p.
CreateFactory
(expectedViewName))
423
.Setup(p => p.
CreateFactory
(expectedViewName))
451
.Setup(p => p.
CreateFactory
(viewName))
479
.Setup(p => p.
CreateFactory
(expectedViewName))
507
.Setup(p => p.
CreateFactory
(expectedViewName))
535
.Setup(p => p.
CreateFactory
("/Areas/Admin/Views/Home/Index.cshtml"))
538
.Setup(p => p.
CreateFactory
("/Views/Home/Index.cshtml"))
555
pageFactory.Verify(p => p.
CreateFactory
("/Areas/Admin/Views/Home/Index.cshtml"), Times.Once());
556
pageFactory.Verify(p => p.
CreateFactory
("/Views/Home/Index.cshtml"), Times.Never());
569
pageFactory.Verify(p => p.
CreateFactory
("/Areas/Admin/Views/Home/Index.cshtml"), Times.Once());
570
pageFactory.Verify(p => p.
CreateFactory
("/Views/Home/Index.cshtml"), Times.Once());
580
pageFactory.Verify(p => p.
CreateFactory
("/Areas/Admin/Views/Home/Index.cshtml"), Times.Once());
581
pageFactory.Verify(p => p.
CreateFactory
("/Views/Home/Index.cshtml"), Times.Once());
599
.Setup(p => p.
CreateFactory
("/Areas/Marketing/Views/Home/Index.cshtml"))
602
.Setup(p => p.
CreateFactory
("/Areas/Sales/Views/Home/Index.cshtml"))
619
pageFactory.Verify(p => p.
CreateFactory
("/Areas/Marketing/Views/Home/Index.cshtml"), Times.Once());
620
pageFactory.Verify(p => p.
CreateFactory
("/Areas/Sales/Views/Home/Index.cshtml"), Times.Never());
634
pageFactory.Verify(p => p.
CreateFactory
("/Areas/Marketing/Views/Home/Index.cshtml"), Times.Once());
635
pageFactory.Verify(p => p.
CreateFactory
("/Areas/Sales/Views/Home/Index.cshtml"), Times.Once());
645
pageFactory.Verify(p => p.
CreateFactory
("/Areas/Marketing/Views/Home/Index.cshtml"), Times.Once());
646
pageFactory.Verify(p => p.
CreateFactory
("/Areas/Sales/Views/Home/Index.cshtml"), Times.Once());
667
.Setup(p => p.
CreateFactory
("test-string/bar.cshtml"))
735
.Setup(p => p.
CreateFactory
("test-string/bar.cshtml"))
795
.Setup(p => p.
CreateFactory
(@"Views\Home\Index.cshtml"))
827
.Setup(p => p.
CreateFactory
("/Views/bar/baz.cshtml"))
831
.Setup(p => p.
CreateFactory
("/Views/Shared/baz.cshtml"))
849
.Setup(p => p.
CreateFactory
(It.IsAny<string>()))
868
.Setup(p => p.
CreateFactory
("/Views/Shared/baz.cshtml"))
886
.Setup(p => p.
CreateFactory
(It.IsAny<string>()))
911
.Setup(p => p.
CreateFactory
("/Views/bar/baz.cshtml"))
915
.Setup(p => p.
CreateFactory
("/Views/Shared/baz.cshtml"))
920
.Setup(p => p.
CreateFactory
("/Views/bar/baz.cshtml"))
1009
.Setup(p => p.
CreateFactory
("viewlocation3"))
1047
.Setup(p => p.
CreateFactory
("viewlocation3"))
1152
.Setup(p => p.
CreateFactory
("expanded-path/bar-layout"))
1211
.Setup(p => p.
CreateFactory
("expanded-path/bar-layout"))
1290
.Setup(p => p.
CreateFactory
("/Views/Foo/details.cshtml"))
1424
.Setup(p => p.
CreateFactory
(pageName))
1452
.Setup(p => p.
CreateFactory
(expectedPageName))
1480
.Setup(p => p.
CreateFactory
(expectedPageName))
1907
pageFactory.Setup(p => p.
CreateFactory
("/Views/Shared/_Partial.cshtml"))
1925
pageFactory.Setup(p => p.
CreateFactory
("/Views/Shared/_Partial.cshtml"))
1947
pageFactory.Setup(p => p.
CreateFactory
("/Views/MyView.cshtml"))
1965
pageFactory.Setup(p => p.
CreateFactory
("/Views/MyPage.cshtml"))
1987
.Setup(p => p.
CreateFactory
("/Views/bar/Index.cshtml"))
2005
pageFactory.Verify(p => p.
CreateFactory
("/Views/bar/Index.cshtml"), Times.Once());
2011
.Setup(p => p.
CreateFactory
("/Views/bar/Index.cshtml"))
2023
pageFactory.Verify(p => p.
CreateFactory
("/Views/bar/Index.cshtml"), Times.Exactly(2));
2032
.Setup(f => f.
CreateFactory
(It.IsAny<string>()))
RazorViewTest.cs (1)
255
.Setup(p => p.
CreateFactory
(LayoutPath))
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\PageActionInvokerCache.cs (1)
119
var factoryResult = _razorPageFactoryProvider.
CreateFactory
(filePath);
Microsoft.AspNetCore.Mvc.RazorPages.Test (9)
Infrastructure\PageActionInvokerProviderTest.cs (9)
167
.Setup(f => f.
CreateFactory
("/Home/Path1/_ViewStart.cshtml"))
170
.Setup(f => f.
CreateFactory
("/_ViewStart.cshtml"))
387
.Setup(p => p.
CreateFactory
("/Pages/Level1/Level2/_ViewStart.cshtml"))
391
.Setup(p => p.
CreateFactory
("/Pages/Level1/_ViewStart.cshtml"))
395
.Setup(p => p.
CreateFactory
("/Pages/_ViewStart.cshtml"))
399
.Setup(p => p.
CreateFactory
("/_ViewStart.cshtml"))
436
.Setup(f => f.
CreateFactory
("/Views/Deeper/_ViewStart.cshtml"))
439
.Setup(f => f.
CreateFactory
("/Views/_ViewStart.cshtml"))
442
.Setup(f => f.
CreateFactory
("/_ViewStart.cshtml"))