Class GenericHostingEnvironment
This is a temporary class - will be removed in the future. It only exists until dependency injection has been implemented for all classes that used System.Web.Hosting.HostingEnvironment, which now should use this class to enable mocking/testability outside the ASP.NET environment.
Inheritance
System.Object
GenericHostingEnvironment
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Hosting
Assembly: EPiServer.Framework.dll
Version: 8.11.0Syntax
public static class GenericHostingEnvironment
Properties
ApplicationID
Declaration
public static string ApplicationID { get; }
Property Value
Type | Description |
---|---|
System.String |
ApplicationPhysicalPath
Declaration
public static string ApplicationPhysicalPath { get; }
Property Value
Type | Description |
---|---|
System.String |
ApplicationVirtualPath
Declaration
public static string ApplicationVirtualPath { get; }
Property Value
Type | Description |
---|---|
System.String |
Instance
Declaration
public static IHostingEnvironment Instance { get; set; }
Property Value
Type | Description |
---|---|
IHostingEnvironment |
VirtualPathProvider
Declaration
public static VirtualPathProvider VirtualPathProvider { get; }
Property Value
Type | Description |
---|---|
System.Web.Hosting.VirtualPathProvider |
Methods
MapPath(String)
Declaration
public static string MapPath(string virtualPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | virtualPath |
Returns
Type | Description |
---|---|
System.String |
RegisterVirtualPathProvider(VirtualPathProvider)
Declaration
public static void RegisterVirtualPathProvider(VirtualPathProvider virtualPathProvider)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Hosting.VirtualPathProvider | virtualPathProvider |