2 instantiations of ViewEngineResult
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ViewEngines\ViewEngineResult.cs (2)
56
return new
ViewEngineResult
(viewName)
73
return new
ViewEngineResult
(viewName)
331 references to ViewEngineResult
Microsoft.AspNetCore.Mvc.Razor (7)
RazorViewEngine.cs (7)
154
public
ViewEngineResult
FindView(ActionContext context, string viewName, bool isMainPage)
163
return
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>());
171
public
ViewEngineResult
GetView(string? executingFilePath, string viewPath, bool isMainPage)
178
return
ViewEngineResult
.NotFound(viewPath, Enumerable.Empty<string>());
455
private
ViewEngineResult
CreateViewEngineResult(ViewLocationCacheResult result, string viewName)
459
return
ViewEngineResult
.NotFound(viewName, result.SearchedLocations!);
477
return
ViewEngineResult
.Found(viewName, view);
Microsoft.AspNetCore.Mvc.Razor.Test (42)
RazorViewEngineTest.cs (42)
75
var
result = viewEngine.FindView(context, viewName, isMainPage: true);
91
var
result = viewEngine.FindView(context, viewName, isMainPage: true);
107
var
result = viewEngine.FindView(context, "View.cshtml", isMainPage);
122
var
result = viewEngine.GetView("~/Home/View1.cshtml", "View2", isMainPage);
153
var
result = viewEngine.FindView(context, "test-view", isMainPage: false);
185
var
result1 = viewEngine.FindView(context, "test-view", isMainPage: false);
196
var
result2 = viewEngine.FindView(context, "test-view", isMainPage: false);
230
var
result = viewEngine.FindView(context, partialViewName, isMainPage: false);
246
var
result = viewEngine.FindView(context, partialViewName, isMainPage: false);
262
var
result = viewEngine.FindView(context, "viewName", isMainPage);
284
var
result = viewEngine.FindView(context, "viewName", isMainPage);
319
var
result = viewEngine.FindView(context, "test-view", isMainPage: true);
351
var
result = viewEngine.FindView(context, "test-view", isMainPage: true);
379
var
result = viewEngine.FindView(context, viewName, isMainPage: true);
405
var
result = viewEngine.GetView("/Home/Page.cshtml", viewName, isMainPage: true);
431
var
result = viewEngine.GetView("/Home/Page.cshtml", viewName, isMainPage: true);
459
var
result = viewEngine.GetView(executingFilePath: null, viewPath: viewName, isMainPage: true);
487
var
result = viewEngine.GetView("/Home/Page.cshtml", viewName, isMainPage: true);
515
var
result = viewEngine.GetView(executingFilePath: null, viewPath: viewName, isMainPage: true);
551
var
result1 = viewEngine.FindView(areaContext, "Index", isMainPage);
565
var
result2 = viewEngine.FindView(nonAreaContext, "Index", isMainPage);
576
var
result3 = viewEngine.FindView(areaContext, "Index", isMainPage);
577
var
result4 = viewEngine.FindView(nonAreaContext, "Index", isMainPage);
615
var
result1 = viewEngine.FindView(areaContext1, "Index", isMainPage);
630
var
result2 = viewEngine.FindView(areaContext2, "Index", isMainPage);
641
var
result3 = viewEngine.FindView(areaContext1, "Index", isMainPage);
642
var
result4 = viewEngine.FindView(areaContext2, "Index", isMainPage);
711
var
result = viewEngine.FindView(context, "test-view", isMainPage: true);
779
var
result = viewEngine.FindView(context, "test-view", isMainPage: true);
812
var
result = viewEngine.FindView(context, "test-view", isMainPage: true);
839
var
result1 = viewEngine.FindView(context, "baz", isMainPage: true);
852
var
result2 = viewEngine.FindView(context, "baz", isMainPage: true);
876
var
result1 = viewEngine.FindView(context, "baz", isMainPage: false);
889
var
result2 = viewEngine.FindView(context, "baz", isMainPage: false);
927
var
result1 = viewEngine.FindView(context, "baz", isMainPage: true);
936
var
result2 = viewEngine.FindView(context, "baz", isMainPage: true);
979
var
result = viewEngine.FindView(context, "myview", isMainPage: true);
1038
var
result = viewEngine.FindView(context, "MyView", isMainPage: true);
1914
var
result = viewEngine.FindView(context, "../Shared/_Partial", isMainPage: false);
1954
var
result = viewEngine.FindView(context, "MyView", isMainPage: true);
1998
var
result = viewEngine.FindView(context, "Index", isMainPage: false);
2016
var
result = viewEngine.FindView(context, "Index", isMainPage: false);
Microsoft.AspNetCore.Mvc.TagHelpers (4)
PartialTagHelper.cs (4)
112
var
result = FindView(Name);
180
private
ViewEngineResult
FindView(string partialName)
182
var
viewEngineResult = _viewEngine.GetView(ViewContext.ExecutingFilePath, partialName, isMainPage: false);
192
return
ViewEngineResult
.NotFound(partialName, searchedLocations);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (29)
PartialTagHelperTest.cs (29)
168
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
206
.Returns(
ViewEngineResult
.NotFound(partialName, new[] { partialName }));
209
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
247
.Returns(
ViewEngineResult
.NotFound(partialName, new[] { partialName }));
250
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
291
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
340
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
386
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
433
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
473
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
513
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
548
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
584
.Returns(
ViewEngineResult
.NotFound(partialName, new[] { "NotFound1", "NotFound2" }));
587
.Returns(
ViewEngineResult
.NotFound(partialName, new[] { $"NotFound3", $"NotFound4" }));
625
.Returns(
ViewEngineResult
.NotFound(partialName, searchedLocations: Array.Empty<string>()));
627
.Returns(
ViewEngineResult
.NotFound(partialName, searchedLocations: Array.Empty<string>()));
675
.Returns(
ViewEngineResult
.Found(partialName, view.Object));
677
.Returns(
ViewEngineResult
.Found(fallbackName, fallbackView.Object));
721
.Returns(
ViewEngineResult
.NotFound(partialName, new[] { "PartialNotFound1", "PartialNotFound2" }));
724
.Returns(
ViewEngineResult
.NotFound(partialName, new[] { $"PartialNotFound3", $"PartialNotFound4" }));
727
.Returns(
ViewEngineResult
.NotFound(partialName, new[] { "FallbackNotFound1", "FallbackNotFound2" }));
730
.Returns(
ViewEngineResult
.NotFound(partialName, new[] { $"FallbackNotFound3", $"FallbackNotFound4" }));
769
.Returns(
ViewEngineResult
.NotFound(partialName, Array.Empty<string>()));
771
.Returns(
ViewEngineResult
.NotFound(partialName, Array.Empty<string>()));
773
.Returns(
ViewEngineResult
.Found(fallbackName, view.Object));
813
.Returns(
ViewEngineResult
.NotFound(partialName, Array.Empty<string>()));
815
.Returns(
ViewEngineResult
.NotFound(partialName, Array.Empty<string>()));
817
.Returns(
ViewEngineResult
.NotFound(fallbackName, Array.Empty<string>()));
819
.Returns(
ViewEngineResult
.Found(fallbackName, view.Object));
Microsoft.AspNetCore.Mvc.ViewFeatures (31)
HtmlHelper.cs (1)
512
var
viewEngineResult = _viewEngine.GetView(
PartialViewResultExecutor.cs (6)
60
/// <returns>A <see cref="
ViewEngineResult
"/>.</returns>
61
public virtual
ViewEngineResult
FindView(ActionContext actionContext, PartialViewResult viewResult)
71
var
result = viewEngine.GetView(executingFilePath: null, viewPath: viewName, isMainPage: false);
72
var
originalResult = result;
88
result =
ViewEngineResult
.NotFound(viewName, locations);
152
var
viewEngineResult = FindView(context, result);
TemplateRenderer.cs (1)
106
var
viewEngineResult = _viewEngine.GetView(_viewContext.ExecutingFilePath, viewName, isMainPage: false);
ViewComponents\ViewViewComponentResult.cs (1)
76
ViewEngineResult
? result = null;
ViewEngines\CompositeViewEngine.cs (6)
28
public
ViewEngineResult
FindView(ActionContext context, string viewName, bool isMainPage)
46
var
result = ViewEngines[i].FindView(context, viewName, isMainPage);
74
return
ViewEngineResult
.NotFound(viewName, searchedLocations ?? Enumerable.Empty<string>());
78
public
ViewEngineResult
GetView(string? executingFilePath, string viewPath, bool isMainPage)
95
var
result = ViewEngines[i].GetView(executingFilePath, viewPath, isMainPage);
122
return
ViewEngineResult
.NotFound(viewPath, searchedLocations ?? Enumerable.Empty<string>());
ViewEngines\IViewEngine.cs (4)
20
/// <returns>The <see cref="
ViewEngineResult
"/> of locating the view.</returns>
23
ViewEngineResult
FindView(ActionContext context, string viewName, bool isMainPage);
32
/// <returns>The <see cref="
ViewEngineResult
"/> of locating the view.</returns>
33
ViewEngineResult
GetView(string? executingFilePath, string viewPath, bool isMainPage);
ViewEngines\ViewEngineResult.cs (5)
49
public static
ViewEngineResult
NotFound(
68
public static
ViewEngineResult
Found(string viewName, IView view)
80
/// Ensure this <see cref="
ViewEngineResult
"/> was successful.
89
/// <returns>This <see cref="
ViewEngineResult
"/> if <see cref="Success"/> is <c>true</c>.</returns>
91
public
ViewEngineResult
EnsureSuccessful(IEnumerable<string>? originalLocations)
ViewResultExecutor.cs (7)
60
/// <returns>A <see cref="
ViewEngineResult
"/>.</returns>
61
public virtual
ViewEngineResult
FindView(ActionContext actionContext, ViewResult viewResult)
72
var
result = viewEngine.GetView(executingFilePath: null, viewPath: viewName, isMainPage: true);
73
var
originalResult = result;
89
result =
ViewEngineResult
.NotFound(viewName, locations);
116
private void OutputDiagnostics(ActionContext actionContext, ViewResult viewResult, string viewName,
ViewEngineResult
result)
146
var
viewEngineResult = FindView(context, result);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (218)
DefaultDisplayTemplatesTest.cs (14)
127
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
130
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
262
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
265
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
284
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
287
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
306
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
309
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
329
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
332
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
358
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
361
.Returns(
ViewEngineResult
.Found("test-view", view.Object));
377
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
380
.Returns(
ViewEngineResult
.Found(string.Empty, new Mock<IView>().Object))
DefaultEditorTemplatesTest.cs (38)
357
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
360
.Returns(
ViewEngineResult
.NotFound("", Enumerable.Empty<string>()));
575
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
578
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
608
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
611
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
640
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
643
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
683
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
686
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
725
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
728
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
768
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
771
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
809
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
812
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
847
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
850
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
913
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
916
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
984
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
987
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1054
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1057
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1123
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1126
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1189
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1192
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1226
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1229
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1250
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1253
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1275
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1278
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1306
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1309
.Returns(
ViewEngineResult
.Found("test-view", view.Object));
1325
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
1328
.Returns(
ViewEngineResult
.Found(string.Empty, new Mock<IView>().Object))
PartialViewResultExecutorTest.cs (20)
32
.Returns(
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>()))
36
.Returns(
ViewEngineResult
.Found(viewName, Mock.Of<IView>()))
48
var
viewEngineResult = executor.FindView(context, viewResult);
70
var
viewEngineResult = executor.FindView(context, viewResult);
94
var
viewEngineResult = executor.FindView(context, viewResult);
112
.Returns(
ViewEngineResult
.NotFound("myview", expectedLocations))
116
.Returns(
ViewEngineResult
.NotFound("myview", Enumerable.Empty<string>()));
127
var
result = executor.FindView(context, viewResult);
147
.Returns(
ViewEngineResult
.NotFound("myview", Enumerable.Empty<string>()))
151
.Returns(
ViewEngineResult
.NotFound("myview", expectedLocations));
162
var
result = executor.FindView(context, viewResult);
182
.Returns(
ViewEngineResult
.NotFound("myview", new[] { "location1", "location2" }))
186
.Returns(
ViewEngineResult
.NotFound("myview", new[] { "location3", "location4" }));
197
var
result = executor.FindView(context, viewResult);
225
var
viewEngineResult = executor.FindView(context, viewResult);
253
.Returns(
ViewEngineResult
.NotFound("myview", Enumerable.Empty<string>()))
257
.Returns(
ViewEngineResult
.NotFound("myview", new string[] { "location/myview" }));
268
var
viewEngineResult = executor.FindView(context, viewResult);
352
(executing, name, isMainPage) =>
ViewEngineResult
.NotFound(name, Enumerable.Empty<string>()));
356
(context, name, isMainPage) =>
ViewEngineResult
.Found(name, Mock.Of<IView>()));
PartialViewResultTest.cs (8)
75
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Location1", "Location2" }))
80
.Returns(
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>()))
113
.Returns(
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>()))
118
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Location1", "Location2" }))
153
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Location1", "Location2" }))
158
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Location3", "Location4" }))
202
.Returns(
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>()))
207
.Returns(
ViewEngineResult
.Found(viewName, view.Object))
Rendering\DefaultTemplatesUtilities.cs (2)
318
.Returns(
ViewEngineResult
.NotFound("MyView", Enumerable.Empty<string>()))
322
.Returns(
ViewEngineResult
.Found("MyView", view.Object))
Rendering\HtmlHelperDisplayExtensionsTest.cs (34)
26
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
29
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
57
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
60
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
78
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
81
.Returns(
ViewEngineResult
.Found("SomeView", Mock.Of<IView>()))
140
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
143
.Returns(
ViewEngineResult
.Found("Status", view.Object))
166
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
169
.Returns(
ViewEngineResult
.Found("Status", view.Object))
192
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
195
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
220
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
223
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
248
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
251
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
269
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
272
.Returns(
ViewEngineResult
.Found("SomeView", Mock.Of<IView>()))
295
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
298
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
326
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
329
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
367
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
370
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
392
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
395
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
420
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
423
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
441
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
444
.Returns(
ViewEngineResult
.Found("SomeView", Mock.Of<IView>()))
467
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
470
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
494
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
497
.Returns(
ViewEngineResult
.Found("SomeView", view.Object));
Rendering\HtmlHelperEditorExtensionsTest.cs (4)
24
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
27
.Returns(
ViewEngineResult
.Found("Status", view.Object))
50
.Returns(
ViewEngineResult
.NotFound(string.Empty, Enumerable.Empty<string>()));
53
.Returns(
ViewEngineResult
.Found("Status", view.Object))
Rendering\HtmlHelperPartialExtensionsTest.cs (12)
409
.Returns(
ViewEngineResult
.NotFound("test-view", new[] { "location1", "location2" }))
413
.Returns(
ViewEngineResult
.NotFound("test-view", Enumerable.Empty<string>()))
438
.Returns(
ViewEngineResult
.NotFound("test-view", Enumerable.Empty<string>()))
442
.Returns(
ViewEngineResult
.NotFound("test-view", new[] { "location1", "location2" }))
469
.Returns(
ViewEngineResult
.NotFound("test-view", new[] { "location1", "location2" }))
473
.Returns(
ViewEngineResult
.NotFound("test-view", new[] { "location3", "location4" }))
498
.Returns(
ViewEngineResult
.NotFound("test-view", new[] { "location1", "location2" }))
502
.Returns(
ViewEngineResult
.NotFound("test-view", Enumerable.Empty<string>()))
527
.Returns(
ViewEngineResult
.NotFound("test-view", Enumerable.Empty<string>()))
531
.Returns(
ViewEngineResult
.NotFound("test-view", new[] { "location1", "location2" }))
558
.Returns(
ViewEngineResult
.NotFound("test-view", new[] { "location1", "location2" }))
562
.Returns(
ViewEngineResult
.NotFound("test-view", new[] { "location3", "location4" }))
ViewComponents\ViewViewComponentResultTest.cs (20)
37
.Returns(
ViewEngineResult
.NotFound("some-view", Enumerable.Empty<string>()))
41
.Returns(
ViewEngineResult
.Found("Components/Invoke/some-view", view.Object))
76
.Returns(
ViewEngineResult
.Found("Components/Invoke/Default", view.Object))
110
.Returns(
ViewEngineResult
.Found("Components/Invoke/Default", view.Object))
155
.Returns(
ViewEngineResult
.NotFound("some-view", new[] { "location1", "location2" }))
159
.Returns(
ViewEngineResult
.NotFound("Components/Invoke/some-view", Enumerable.Empty<string>()))
193
.Returns(
ViewEngineResult
.NotFound("some-view", Enumerable.Empty<string>()))
197
.Returns(
ViewEngineResult
.NotFound("Components/Invoke/some-view", new[] { "location1", "location2" }))
233
.Returns(
ViewEngineResult
.NotFound("some-view", new[] { "location1", "location2" }))
237
.Returns(
ViewEngineResult
.NotFound("Components/Invoke/some-view", new[] { "location3", "location4" }))
271
.Returns(
ViewEngineResult
.NotFound("some-view", Enumerable.Empty<string>()))
275
.Returns(
ViewEngineResult
.Found("Components/Invoke/some-view", view.Object))
307
.Returns(
ViewEngineResult
.NotFound("some-view", Enumerable.Empty<string>()))
311
.Returns(
ViewEngineResult
.Found("Components/Invoke/some-view", view))
342
.Returns(
ViewEngineResult
.NotFound("some-view", Enumerable.Empty<string>()))
346
.Returns(
ViewEngineResult
.Found("Components/Invoke/some-view", view))
391
.Returns(
ViewEngineResult
.NotFound("some-view", new[] { "view-location1", "view-location2" }))
395
.Returns(
ViewEngineResult
.NotFound(
461
.Returns(
ViewEngineResult
.Found(expectedViewName, new Mock<IView>().Object))
485
.Returns(
ViewEngineResult
.Found(viewName, new Mock<IView>().Object))
ViewEngines\CompositeViewEngineTest.cs (38)
57
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "controller/test-view" }));
63
var
result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: true);
79
.Returns(
ViewEngineResult
.Found(viewName, view));
85
var
result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: true);
104
.Returns(
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>()));
107
.Returns(
ViewEngineResult
.Found(viewName, view2));
110
.Returns(
ViewEngineResult
.Found(viewName, view3));
119
var
result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: true);
137
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "1", "2" }));
140
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "3" }));
143
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "4", "5" }));
152
var
result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: true);
189
.Returns(
ViewEngineResult
.NotFound(expectedViewName, new[] { expectedViewName }));
195
var
result = compositeViewEngine.GetView("~/Index.html", viewName, isMainPage);
214
.Returns(
ViewEngineResult
.Found(expectedViewName, view));
220
var
result = compositeViewEngine.GetView("~/Index.html", viewName, isMainPage);
242
.Returns(
ViewEngineResult
.NotFound(expectedViewName, Enumerable.Empty<string>()));
245
.Returns(
ViewEngineResult
.Found(expectedViewName, view2));
248
.Returns(
ViewEngineResult
.Found(expectedViewName, view3));
257
var
result = compositeViewEngine.GetView("~/Index.html", viewName, isMainPage);
278
.Returns(
ViewEngineResult
.NotFound(expectedViewName, new[] { "1", "2" }));
281
.Returns(
ViewEngineResult
.NotFound(expectedViewName, new[] { "3" }));
284
.Returns(
ViewEngineResult
.NotFound(expectedViewName, new[] { "4", "5" }));
293
var
result = compositeViewEngine.GetView("~/Index.html", viewName, isMainPage);
324
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Shared/partial-view" }));
330
var
result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: false);
346
.Returns(
ViewEngineResult
.Found(viewName, view));
352
var
result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: false);
371
.Returns(
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>()));
374
.Returns(
ViewEngineResult
.Found(viewName, view2));
377
.Returns(
ViewEngineResult
.Found(viewName, view3));
386
var
result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: false);
404
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "1", "2" }));
407
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "3" }));
410
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "4", "5" }));
419
var
result = compositeViewEngine.FindView(GetActionContext(), viewName, isMainPage: false);
440
public
ViewEngineResult
FindView(ActionContext context, string viewName, bool isMainPage)
445
public
ViewEngineResult
GetView(string executingFilePath, string viewPath, bool isMainPage)
ViewResultExecutorTest.cs (20)
31
.Returns(
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>()))
35
.Returns(
ViewEngineResult
.Found(viewName, Mock.Of<IView>()))
47
var
viewEngineResult = executor.FindView(context, viewResult);
69
var
viewEngineResult = executor.FindView(context, viewResult);
93
var
viewEngineResult = executor.FindView(context, viewResult);
111
.Returns(
ViewEngineResult
.NotFound("myview", expectedLocations));
114
.Returns(
ViewEngineResult
.NotFound("myview", Enumerable.Empty<string>()));
125
var
result = executor.FindView(context, viewResult);
145
.Returns(
ViewEngineResult
.NotFound("myview", Enumerable.Empty<string>()));
148
.Returns(
ViewEngineResult
.NotFound("myview", expectedLocations));
159
var
result = executor.FindView(context, viewResult);
179
.Returns(
ViewEngineResult
.NotFound("myview", new[] { "location1", "location2" }));
182
.Returns(
ViewEngineResult
.NotFound("myview", new[] { "location3", "location4" }));
193
var
result = executor.FindView(context, viewResult);
221
var
viewEngineResult = executor.FindView(context, viewResult);
249
.Returns(
ViewEngineResult
.NotFound("myview", Enumerable.Empty<string>()));
252
.Returns(
ViewEngineResult
.NotFound("myview", new string[] { "location/myview" }));
263
var
viewEngineResult = executor.FindView(context, viewResult);
342
(path, name, partial) =>
ViewEngineResult
.NotFound(name, Enumerable.Empty<string>()));
346
(context, name, partial) =>
ViewEngineResult
.Found(name, Mock.Of<IView>()));
ViewResultTest.cs (8)
85
.Returns(
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>()))
90
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Location1", "Location2" }))
125
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Location1", "Location2" }))
130
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Location3", "Location4" }))
165
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Location1", "Location2" }))
170
.Returns(
ViewEngineResult
.NotFound(viewName, new[] { "Location3", "Location4" }))
214
.Returns(
ViewEngineResult
.NotFound(viewName, Enumerable.Empty<string>()))
219
.Returns(
ViewEngineResult
.Found(viewName, view.Object))