Class BlobRouter
Routes to Blobs on IContent instances.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Web.Routing
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class BlobRouter : IPartialRouter<IContent, Blob>
Remarks
For Blob properties with ImageDescriptorAttribute (as for example for Thumbnail autogeneration of scaled images is performed.
Constructors
BlobRouter(BlobResolver, ThumbnailManager, IContentRepository)
Initializes a new instance of the BlobRouter class.
Declaration
[Obsolete("Use other overload")]
public BlobRouter(BlobResolver blobResolver, ThumbnailManager thumbnailManager, IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
BlobResolver | blobResolver | The BLOB resolver. |
ThumbnailManager | thumbnailManager | The thumbnail manager. |
IContentRepository | contentRepository | The content repository. |
BlobRouter(BlobResolver, ThumbnailManager, IContentRepository, IContentProviderManager)
Initializes a new instance of the BlobRouter class.
Declaration
public BlobRouter(BlobResolver blobResolver, ThumbnailManager thumbnailManager, IContentRepository contentRepository, IContentProviderManager providerManager)
Parameters
Type | Name | Description |
---|---|---|
BlobResolver | blobResolver | The BLOB resolver. |
ThumbnailManager | thumbnailManager | The thumbnail manager. |
IContentRepository | contentRepository | The content repository. |
IContentProviderManager | providerManager | The content provider manager |
Methods
GetPartialVirtualPath(Blob, String, RouteValueDictionary, RequestContext)
Generate the correspond links to the thumbnails
Declaration
public PartialRouteData GetPartialVirtualPath(Blob content, string language, RouteValueDictionary routeValues, RequestContext requestContext)
Parameters
Type | Name | Description |
---|---|---|
Blob | content | The Blob object represent the thumbnail image |
System.String | language | The language code expected |
System.Web.Routing.RouteValueDictionary | routeValues | A dictionary of route |
System.Web.Routing.RequestContext | requestContext | The context contains request's information |
Returns
Type | Description |
---|---|
PartialRouteData |
RoutePartial(IContent, SegmentContext)
The partial router for Blobs on any IContent, the format should be [content URL]/BlobPropertyName.
Declaration
public object RoutePartial(IContent content, SegmentContext segmentContext)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | The source content that holds the Blob property. |
SegmentContext | segmentContext | The context for routing. |
Returns
Type | Description |
---|---|
System.Object | A Blob object, represents the |