LanguageViewLocationExpander 类

定义

IViewLocationExpander 语言添加为扩展前缀以查看名称的 。 作为扩展前缀添加的语言来自 HttpContext

public ref class LanguageViewLocationExpander : Microsoft::AspNetCore::Mvc::Razor::IViewLocationExpander
public class LanguageViewLocationExpander : Microsoft.AspNetCore.Mvc.Razor.IViewLocationExpander
type LanguageViewLocationExpander = class
    interface IViewLocationExpander
Public Class LanguageViewLocationExpander
Implements IViewLocationExpander
继承
LanguageViewLocationExpander
实现

示例

对于没有区域的默认情况,视图使用以下模式生成, (假定控制器为“Home”,操作为“Index”,语言为“en”) Views/Home/en/Action Views/Home/Action Views/Shared/en/Action Views/Shared/Action

构造函数

LanguageViewLocationExpander()

实例化新 LanguageViewLocationExpander 实例。

LanguageViewLocationExpander(LanguageViewLocationExpanderFormat)

实例化新 LanguageViewLocationExpander 实例。

方法

ExpandViewLocations(ViewLocationExpanderContext, IEnumerable<String>)

RazorViewEngine 调用以确定视图的潜在位置。

PopulateValues(ViewLocationExpanderContext)

RazorViewEngine 调用以确定此 实例 IViewLocationExpander将使用的值。 计算值用于确定自上次定位以来视图位置是否已更改。

适用于