Class VirtualPathProviderHandler
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. URL handler implementation for Virtual Paths
Implements
Inherited Members
Namespace: EPiServer.Web.Internal
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public class VirtualPathProviderHandler : CachedUrlHandler, IHandleUrlForRewrite
Constructors
VirtualPathProviderHandler()
Declaration
public VirtualPathProviderHandler()
Properties
UrlRewritten
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets a value indicating whether the URL was rewritten as a result of the TryHandleUrl method.
Declaration
public bool UrlRewritten { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
For Virtual paths, the URL is never rewritten so this implementation will always return false.
Methods
RewriteFromCachedData(UrlRewriteContext, ref Object)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Rewrites the URL from cached data.
Declaration
public override bool RewriteFromCachedData(UrlRewriteContext context, ref object internalObject)
Parameters
Type | Name | Description |
---|---|---|
UrlRewriteContext | context | The context. |
System.Object | internalObject | The internal object. |
Returns
Type | Description |
---|---|
System.Boolean | True if the URL was rewritten, false otherwise. |
Overrides
Remarks
For Virtual Paths, no rewriting will be done, so this implementation will always return False.
TryHandleUrl(UrlRewriteContext, ref Object, ref CachedUrlHandler)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Tries to handle the URL gven in the context.
Declaration
public bool TryHandleUrl(UrlRewriteContext context, ref object internalObject, ref CachedUrlHandler handler)
Parameters
Type | Name | Description |
---|---|---|
UrlRewriteContext | context | The context for the rewrite. Note that the URL of the context may be modified. |
System.Object | internalObject | The internal object representation. |
CachedUrlHandler | handler | The cached handler. |
Returns
Type | Description |
---|---|
System.Boolean | True if the URL was recognized and handled, False otherwise. |
Remarks
If this method returns False (URL not handled), then the context, internalObject and handler should be unaffected.
If the method returns True (URL handled), then UrlRewritten will indicate if the context.Url property has been modified. The method may optionally return a CachedUrlHandler in the handler parameter in this case as well.
Returning a non-null value in handler is how you indicate that you have want to cache expensive url lookups and reuse for subsequent calls.