Class VirtualPathNativeProvider
A truly Native provider.
Inherited Members
Namespace: EPiServer.Web.Hosting
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class VirtualPathNativeProvider : VirtualPathUnifiedProvider
Constructors
VirtualPathNativeProvider(String, NameValueCollection)
Initializes a new instance of the VirtualPathNativeProvider class.
Declaration
public VirtualPathNativeProvider(string name, NameValueCollection configParameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the provider |
System.Collections.Specialized.NameValueCollection | configParameters | The config parameters for the provider |
VirtualPathNativeProvider(String, NameValueCollection, IContentLoader, IContentProviderManager, IPageQuickSearch)
Initializes a new instance of the VirtualPathNativeProvider class.
Declaration
public VirtualPathNativeProvider(string name, NameValueCollection configParameters, IContentLoader contentQueryable, IContentProviderManager pageProviderManager, IPageQuickSearch pageQuickSearch)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the provider |
System.Collections.Specialized.NameValueCollection | configParameters | The config parameters for the provider |
IContentLoader | contentQueryable | The content queryable. |
IContentProviderManager | pageProviderManager | The page provider manager. |
IPageQuickSearch | pageQuickSearch | The page quick search. |
Fields
accessLevels
The access levels for the native provider.
Declaration
protected Dictionary<string, AccessLevel> accessLevels
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, AccessLevel> |
localPathBase
The local base directory for this instance
Declaration
protected DirectoryInfo localPathBase
Field Value
Type | Description |
---|---|
System.IO.DirectoryInfo |
Properties
LocalPath
Gets or sets the local path for this provider
Declaration
public string LocalPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The local path. |
Methods
AppendExplicitAccess(String, AccessLevel)
Appends the explicit access.
Declaration
protected void AppendExplicitAccess(string commaSeparatedListOfRoles, AccessLevel explicitAccess)
Parameters
Type | Name | Description |
---|---|---|
System.String | commaSeparatedListOfRoles | The comma separated list of roles. |
AccessLevel | explicitAccess | The explicit access. |
DirectoryExists(String)
Gets a value that indicates whether a directory exists in the virtual file system.
Declaration
public override bool DirectoryExists(string virtualPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | virtualPath | The virtual path. |
Returns
Type | Description |
---|---|
System.Boolean |
FileExists(String)
Gets a value that indicates whether a file exists in the virtual file system.
Declaration
public override bool FileExists(string virtualPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | virtualPath | The path to the virtual file. |
Returns
Type | Description |
---|---|
System.Boolean | true if the file exists in the virtual file system; otherwise, false. |
GetCacheDependency(String, IEnumerable, DateTime)
Creates a cache dependency based on the specified virtual paths.
Declaration
public override CacheDependency GetCacheDependency(string virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart)
Parameters
Type | Name | Description |
---|---|---|
System.String | virtualPath | The path to the primary virtual resource. |
System.Collections.IEnumerable | virtualPathDependencies | An array of paths to other resources required by the primary virtual resource. |
System.DateTime | utcStart | The UTC time at which the virtual resources were read. |
Returns
Type | Description |
---|---|
System.Web.Caching.CacheDependency | A System.Web.Caching.CacheDependency object for the specified virtual resources. |
Remarks
virtualPathDependencies has to be an System.Collections.IEnumerable of System.String. All the elements that are not strings will be ignored. No exception will be thrown.
GetDirectory(String)
Gets the directory.
Declaration
public override VirtualDirectory GetDirectory(string virtualPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | virtualPath | The virtual path. |
Returns
Type | Description |
---|---|
System.Web.Hosting.VirtualDirectory |
GetFile(String)
Gets a virtual file from the virtual file system.
Declaration
public override VirtualFile GetFile(string virtualPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | virtualPath | The path to the virtual file. |
Returns
Type | Description |
---|---|
System.Web.Hosting.VirtualFile | A descendent of the System.Web.Hosting.VirtualFile class that represents a file in the virtual file system. |
MapVirtualPathToLocalPath(String, out String)
Maps a virtual (relative) path to an local absolute path
Declaration
public bool MapVirtualPathToLocalPath(string virtualPath, out string outLocalPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | virtualPath | the virtual path |
System.String | outLocalPath | returned local absolute path |
Returns
Type | Description |
---|---|
System.Boolean | True if virtual path was mapped successfully to an absolute path within the namespace of this provider, false otherwise |
Remarks
Note that this function does not check if the file actually exists, it only cares about path mapping
QueryAccess(String, IPrincipal)
The VirtualPathNativeProvider configures explicit access permissions "globally" (thus effectively ignoring the virtualPath parameter)
Declaration
public override AccessLevel QueryAccess(string virtualPath, IPrincipal user)
Parameters
Type | Name | Description |
---|---|---|
System.String | virtualPath | The path to check access against |
System.Security.Principal.IPrincipal | user | The user |
Returns
Type | Description |
---|---|
AccessLevel |