Class EventProvider
Base class for providers that is used for communication between sites.
Namespace: EPiServer.Events.Providers
Assembly: EPiServer.Events.dll
Version: 8.11.0Syntax
public abstract class EventProvider : ProviderBase
Constructors
EventProvider()
Declaration
protected EventProvider()
Properties
ValidateMessageIntegrity
Gets a value indicating if messages received from the provider should be checked for their integrity.
Declaration
public virtual bool ValidateMessageIntegrity { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
InitializeAsync()
Override this method if the provider has some time consuming initialization that can be done in parallel with other initalization modules.
Declaration
public virtual Task InitializeAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This method will be called from Initialize(InitializationEngine) and then in InitComplete it will wait for the ongoing task to complete.
OnMessageReceived(EventMessageEventArgs)
Raises the MessageReceived event.
Declaration
protected virtual void OnMessageReceived(EventMessageEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
EventMessageEventArgs | args | The EventMessageEventArgs instance containing the event data. |
Remarks
Any exceptions thrown by an event listener will be suppressed by this method, use another overload to control behaviour of exceptions from the provider
OnMessageReceived(EventMessageEventArgs, Boolean)
Raises the MessageReceived event.
Declaration
protected virtual void OnMessageReceived(EventMessageEventArgs args, bool suppressExceptions)
Parameters
Type | Name | Description |
---|---|---|
EventMessageEventArgs | args | The EventMessageEventArgs instance containing the event data. |
System.Boolean | suppressExceptions |
|
SendMessage(EventMessage)
Sends the provided message to other related sites.
Declaration
public abstract void SendMessage(EventMessage message)
Parameters
Type | Name | Description |
---|---|---|
EventMessage | message | The message to send. |
Uninitialize()
Resets the provider into an uninitialized state. Called during the uninitailization phase of the InitializationEngine.
Declaration
public virtual void Uninitialize()
Events
MessageReceived
Occurs when a remote message has been received.
Declaration
public virtual event EventHandler<EventMessageEventArgs> MessageReceived
Event Type
Type | Description |
---|---|
System.EventHandler<EventMessageEventArgs> |