Share via


ViewHierarchyUtility.GetViewImportsLocations(String) Method

Definition

Gets the locations for _ViewImportss that are applicable to the specified path.

public:
 static System::Collections::Generic::IEnumerable<System::String ^> ^ GetViewImportsLocations(System::String ^ applicationRelativePath);
public static System.Collections.Generic.IEnumerable<string> GetViewImportsLocations (string applicationRelativePath);
static member GetViewImportsLocations : string -> seq<string>
Public Shared Function GetViewImportsLocations (applicationRelativePath As String) As IEnumerable(Of String)

Parameters

applicationRelativePath
String

The application relative path of the file to locate _ViewImportss for.

Returns

A sequence of paths that represent potential _ViewImports locations.

Remarks

This method returns paths starting from the directory of applicationRelativePath and moves upwards until it hits the application root. e.g. /Views/Home/View.cshtml -> [ /Views/Home/_ViewImports.cshtml, /Views/_ViewImports.cshtml, /_ViewImports.cshtml ]

Applies to