Class EventProviderService
Repository that holds all configured Event
Inheritance
Namespace: EPiServer.Events.Providers.Internal
Assembly: EPiServer.Events.dll
Version: 12.0.3Syntax
public class EventProviderService : Object, IEventProviderAccessor, IEventBroker, IDisposable
Constructors
EventProviderService(EventProvider, IEventMessageFactory, IEventMessageValidator)
Initialize a new instance of Event
Declaration
public EventProviderService(EventProvider provider, IEventMessageFactory messageFactory, IEventMessageValidator messageValidator)
Parameters
Type | Name | Description |
---|---|---|
Event |
provider | The default provider |
IEvent |
messageFactory | The factory used to create message instances to send. |
IEvent |
messageValidator | The validator that evaluates incoming messages. |
Properties
Enabled
Gets or sets a value indicating whether this instance is enabled or not. If no providers are configured this will always return false.
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
IsActive
Gets a value indicating if the Service will be able to send or recieve any events.
Declaration
public virtual bool IsActive { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System. |
disposing |
InitializeProvidersAsync()
Starts the optional asyncronous initialization provider.
Declaration
public virtual Task InitializeProvidersAsync()
Returns
Type | Description |
---|---|
System. |
An Task object that can be used to syncronize the execution again. |
OnEventMissed(EventMissedEventArgs)
Called when the Event
Declaration
protected virtual void OnEventMissed(EventMissedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Event |
e | The Event |
OnEventReceived(Object, EventReceivedEventArgs)
Called when any Event
Declaration
protected virtual void OnEventReceived(object sender, EventReceivedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System. |
sender | The provider that received the event message. |
Event |
e | The Event |
RaiseEventAsync(Guid, Object)
Raises an event remotely in an asyncrounous manner.
Declaration
public virtual Task RaiseEventAsync(Guid eventId, object parameter)
Parameters
Type | Name | Description |
---|---|---|
System. |
eventId | The event id of the event to raise. |
System. |
parameter | The event parameter to send with the event. |
Returns
Type | Description |
---|---|
System. |
A System. |
Uninitialize()
Detaches all event handlers to provider.
Declaration
public virtual void Uninitialize()
Events
EventMissed
Occurs when it is discovered that a remote event was missed.
Declaration
public event EventHandler<EventMissedEventArgs> EventMissed
Event Type
Type | Description |
---|---|
System. |
EventReceived
Occurs when a remote event has been received and verified.
Declaration
public event EventHandler<EventReceivedEventArgs> EventReceived
Event Type
Type | Description |
---|---|
System. |
Explicit Interface Implementations
IEventProviderAccessor.Provider
Gets the currently configured Event
Declaration
EventProvider IEventProviderAccessor.Provider { get; }
Returns
Type | Description |
---|---|
Event |