Share via


IViewLocationExpander Interface

Definition

Specifies the contracts for a view ___location expander that is used by RazorViewEngine instances to determine search paths for a view.

public interface class IViewLocationExpander
public interface IViewLocationExpander
type IViewLocationExpander = interface
Public Interface IViewLocationExpander
Derived

Remarks

Individual IViewLocationExpanders are invoked in two steps: (1) PopulateValues(ViewLocationExpanderContext) is invoked and each expander adds values that it would later consume as part of ExpandViewLocations(ViewLocationExpanderContext, IEnumerable<String>). The populated values are used to determine a cache key - if all values are identical to the last time PopulateValues(ViewLocationExpanderContext) was invoked, the cached result is used as the view ___location. (2) If no result was found in the cache or if a view was not found at the cached ___location, ExpandViewLocations(ViewLocationExpanderContext, IEnumerable<String>) is invoked to determine all potential paths for a view.

Methods

ExpandViewLocations(ViewLocationExpanderContext, IEnumerable<String>)

Invoked by a RazorViewEngine to determine potential locations for a view.

PopulateValues(ViewLocationExpanderContext)

Invoked by a RazorViewEngine to determine the values that would be consumed by this instance of IViewLocationExpander. The calculated values are used to determine if the view ___location has changed since the last time it was located.

Applies to