Interface IActivityDispatcher
The IActivityDispatcher describes an interface responsible for processing activities that are dispatched to it through default and registered activity handlers of specific activity types.
Namespace: EPiServer.Social.ActivityStreams.Core
Assembly: EPiServer.Social.ActivityStreams.Core.dll
Version: 1.5.4Syntax
public interface IActivityDispatcher
Methods
Dispatch(Activity, Object)
Further dispatches the activity received to all default handlers and registered activity handlers capable of processing an activity type that matches the type of the extension parameter.
Declaration
void Dispatch(Activity activity, object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Activity | activity | Aa activity that is dispatched to the ActivityDispatcher |
| System.Object | extension | The payload of an activity that is dispatched to the ActivityDispatcher |
Register(IActivityHandler<Object>)
Registers a default activity handler. The specified activity handler is added to the default ActivityStreams handlers list. All default ActivityStreams handlers are invoked by the system when an activity is dispatched to the IActivityDispatcher.
Declaration
void Register(IActivityHandler<object> defaultHandler)
Parameters
| Type | Name | Description |
|---|---|---|
| IActivityHandler<System.Object> | defaultHandler | The activity handler to add to the default ActivityStreams handlers |
Register<TExtension>(IActivityHandler<TExtension>)
Registers an activity handler capable of processing an activity of type TExtension.
Declaration
void Register<TExtension>(IActivityHandler<TExtension> handler)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| IActivityHandler<TExtension> | handler | The activity handler to be registered |
Type Parameters
| Name | Description |
|---|---|
| TExtension | The type of activity for which the handler should be registered |