RazorViewEngine.GetView(String, String, Boolean) 方法

定义

获取具有给定 viewPath的视图(除非executingFilePathviewPath已是绝对值)。

public:
 virtual Microsoft::AspNetCore::Mvc::ViewEngines::ViewEngineResult ^ GetView(System::String ^ executingFilePath, System::String ^ viewPath, bool isMainPage);
public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult GetView (string executingFilePath, string viewPath, bool isMainPage);
public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult GetView (string? executingFilePath, string viewPath, bool isMainPage);
abstract member GetView : string * string * bool -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult
override this.GetView : string * string * bool -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult
Public Function GetView (executingFilePath As String, viewPath As String, isMainPage As Boolean) As ViewEngineResult

参数

executingFilePath
String

当前正在执行的视图的绝对路径(如果有)。

viewPath
String

视图的路径。

isMainPage
Boolean

确定找到的页面是否是操作main页。

返回

ViewEngineResult查找视图的 。

实现

适用于