Class Paths
Helps resolve path's to resources in EPiServer Shell.
Inheritance
Inherited Members
Namespace: EPiServer.Shell
Assembly: EPiServer.Shell.dll
Version: 8.11.0Syntax
public static class Paths
Fields
ShellModuleName
The name of the shell framework module. This constant is used internally.
Declaration
public const string ShellModuleName = "Shell"
Field Value
Type | Description |
---|---|
System.String |
Properties
ProtectedRootPath
The root path of protected modules
Declaration
public static string ProtectedRootPath { get; }
Property Value
Type | Description |
---|---|
System.String |
PublicRootPath
The root path of public modules
Declaration
public static string PublicRootPath { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
ToClientResource(Assembly, String)
Resolves the path of EPiServer Framework module resource such as a javascript file or css
Declaration
public static string ToClientResource(Assembly moduleAssembly, string moduleRelativeClientResourcePath)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | moduleAssembly | The module assembly. |
System.String | moduleRelativeClientResourcePath | A path relative to the given module's root path, e.g. "Content/MyStyle.css" |
Returns
Type | Description |
---|---|
System.String | A resolved path. |
Remarks
If moduleRelativePath is an absolute or app-relative url it will be returned without beeing combined to the module's resource path.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Shell module cannot be found by moduleAssembly. |
System.ArgumentNullException | Exception is thrown when moduleAssembly is null. |
ToClientResource(String, String)
Resolves the path of EPiServer Framework module resource such as a javascript file or css
Declaration
public static string ToClientResource(string moduleName, string moduleRelativeClientResourcePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | moduleName | Name of the module. |
System.String | moduleRelativeClientResourcePath | A path relative to the given module's root path, e.g. "Content/MyStyle.css" |
Returns
Type | Description |
---|---|
System.String | A resolved path. |
Remarks
If moduleRelativePath is an absolute or app-relative url it will be returned without beeing combined to the module's resource path.
ToClientResource(Type, String)
Resolves the path of EPiServer Framework module resource such as a javascript file or css
Declaration
public static string ToClientResource(Type typeInModuleAssembly, string moduleRelativeClientResourcePath)
Parameters
Type | Name | Description |
---|---|---|
System.Type | typeInModuleAssembly | The type in module assembly. |
System.String | moduleRelativeClientResourcePath | A path relative to the given module's root path, e.g. "Content/MyStyle.css" |
Returns
Type | Description |
---|---|
System.String | A resolved path. |
Remarks
If moduleRelativePath is an absolute or app-relative url it will be returned without beeing combined to the module's resource path.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Shell module cannot be found by moduleAssembly. |
System.ArgumentNullException | Exception is thrown when typeInModuleAssembly is null. |
ToResource(Assembly, String)
Resolves the path of EPiServer Framework module resource such as a master page or config file
Declaration
public static string ToResource(Assembly moduleAssembly, string moduleRelativeResourcePath)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | moduleAssembly | The module assembly. |
System.String | moduleRelativeResourcePath | A path relative to the given module's root path, e.g. "ClientResources/packages.config" |
Returns
Type | Description |
---|---|
System.String | A resolved path. |
Remarks
If moduleRelativePath is an absolute or app-relative url it will be returned without beeing combined to the module's resource path.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Shell module cannot be found by moduleAssembly. |
System.ArgumentNullException | Exception is thrown when moduleAssembly is null. |
ToResource(String, String)
Resolves the path of EPiServer Framework module resource such as a master page or config file
Declaration
public static string ToResource(string moduleName, string moduleRelativeResourcePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | moduleName | Name of the module. |
System.String | moduleRelativeResourcePath | A path relative to the given module's root path, e.g. "ClientResources/packages.config" |
Returns
Type | Description |
---|---|
System.String | A resolved path. |
Remarks
If moduleRelativePath is an absolute or app-relative url it will be returned without beeing combined to the module's resource path.
ToResource(Type, String)
Resolves the path of EPiServer Framework module resource such as a master page or config file
Declaration
public static string ToResource(Type typeInModuleAssembly, string moduleRelativeResourcePath)
Parameters
Type | Name | Description |
---|---|---|
System.Type | typeInModuleAssembly | Type contained in module assembly. |
System.String | moduleRelativeResourcePath | A path relative to the given module's root path, e.g. "ClientResources/packages.config" |
Returns
Type | Description |
---|---|
System.String | A resolved path. |
Remarks
If moduleRelativePath is an absolute or app-relative url it will be returned without beeing combined to the module's resource path.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Shell module cannot be found by moduleAssembly. |
System.ArgumentNullException | Exception is thrown when specified typeInModuleAssembly is null. |
ToShellClientResource(String)
Resolves the path of EPiServer Framework client resource such as a javascript file or css
Declaration
public static string ToShellClientResource(string shellModuleRelativeClientResourcePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | shellModuleRelativeClientResourcePath | A path relative to the shell framework module's root path, e.g. "ClientResources/EPiJQuery.js" |
Returns
Type | Description |
---|---|
System.String |
ToShellResource(String)
Resolves the path of EPiServer Framework module resource such as a master page or config file
Declaration
public static string ToShellResource(string shellModuleRelativeResourcePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | shellModuleRelativeResourcePath | A path relative to the shell framework module's root path, e.g. "ClientResources/packages.config" |
Returns
Type | Description |
---|---|
System.String |