RazorViewEngine.GetView(String, String, Boolean) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取具有给定 viewPath
的视图(除非executingFilePath
viewPath
已是绝对值)。
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查找视图的 。