IViewLocationExpander 인터페이스

정의

인스턴스에서 보기에 대한 검색 경로를 결정하는 데 사용되는 RazorViewEngine 뷰 위치 확장자에 대한 계약을 지정합니다.

public interface class IViewLocationExpander
public interface IViewLocationExpander
type IViewLocationExpander = interface
Public Interface IViewLocationExpander
파생

설명

개별 IViewLocationExpanders는 두 단계로 호출됩니다. (1) PopulateValues(ViewLocationExpanderContext) 가 호출되고 각 확장기는 나중에 의 ExpandViewLocations(ViewLocationExpanderContext, IEnumerable<String>)일부로 사용할 값을 추가합니다. 채워진 값은 캐시 키를 결정하는 데 사용됩니다. 모든 값이 마지막으로 호출된 값 PopulateValues(ViewLocationExpanderContext) 과 동일하면 캐시된 결과가 보기 위치로 사용됩니다. (2) 캐시에 결과가 없거나 캐시된 위치에서 ExpandViewLocations(ViewLocationExpanderContext, IEnumerable<String>) 뷰를 찾을 수 없는 경우 가 호출되어 보기에 대한 모든 잠재적 경로를 확인합니다.

메서드

ExpandViewLocations(ViewLocationExpanderContext, IEnumerable<String>)

에 의해 RazorViewEngine 호출되어 보기의 잠재적 위치를 확인합니다.

PopulateValues(ViewLocationExpanderContext)

의 이 instance IViewLocationExpander사용할 값을 결정하기 위해 에 의해 RazorViewEngine 호출됩니다. 계산된 값은 뷰 위치가 마지막으로 찾은 이후 변경되었는지 확인하는 데 사용됩니다.

적용 대상