Class PartialRouteHandler
Handler that manages registered instances of IPartialRouter<TContent, TRoutedData>.
Inheritance
Namespace: EPiServer.Core.Routing
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class PartialRouteHandler : Object
Constructors
PartialRouteHandler(TypeRelater, IEnumerable<IPartialRouter>)
Initializes a new instance of the PartialRouteHandler class.
Declaration
public PartialRouteHandler(TypeRelater typeRelater, IEnumerable<IPartialRouter> partialRouters)
Parameters
Type | Name | Description |
---|---|---|
TypeRelater | typeRelater | The type relater. |
System.Collections.Generic.IEnumerable<IPartialRouter> | partialRouters | Registered partial routers |
Properties
HasInComingRouters
Gets a value indicating whether this instance has in coming routers.
Declaration
public virtual bool HasInComingRouters { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
HasOutgoingRouters
Gets a value indicating whether this instance has outgoing routers.
Declaration
public virtual bool HasOutgoingRouters { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
GetIncomingRouters(Type)
Gets the encapulated IPartialRouter<TContent, TRoutedData> instances where TIncoming matches type for incoming routing.
Declaration
public virtual IList<PartialRouter> GetIncomingRouters(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<PartialRouter> | An list of registered routers that match type. |
Remarks
In case there is IPartialRouter<TContent, TRoutedData> routers where TIncoming is equal to type
those implementations are
the first in the returned list. Other instances of IPartialRouter<TContent, TRoutedData> where type
can be
assigned to TIncoming is also returned.
GetOutgoingRouters(Type)
Gets the encapulated IPartialRouter<TContent, TRoutedData> instances where TOutgoing matches type for outgoing routing.
Declaration
public virtual IList<PartialRouter> GetOutgoingRouters(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<PartialRouter> | An list of registered routers that match type. |
Remarks
In case there is IPartialRouter<TContent, TRoutedData> routers where TIncoming is equal to type
those implementations are
the first in the returned list. Other instances of IPartialRouter<TContent, TRoutedData> where type
can be
assigned to TIncoming is also returned.
RegisterPartialRouter(PartialRouter)
Registers an instance of PartialRouter.
Declaration
public virtual void RegisterPartialRouter(PartialRouter partialRouter)
Parameters
Type | Name | Description |
---|---|---|
PartialRouter | partialRouter | The partial router. |