Class EventProviderService
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Repository that holds all configured EventProvider instances.
Inheritance
Inherited Members
Namespace: EPiServer.Events.Providers.Internal
Assembly: EPiServer.Events.dll
Version: 11.20.7Syntax
public class EventProviderService : IEventProviderAccessor, IEventBroker, IDisposable
Constructors
EventProviderService(EventProvider, IEnumerable<EventProvider>, IEventMessageFactory, IEventMessageValidator)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initialize a new instance of EventProviderService
Declaration
public EventProviderService(EventProvider defaultProvider, IEnumerable<EventProvider> providers, IEventMessageFactory messageFactory, IEventMessageValidator messageValidator)
Parameters
Type | Name | Description |
---|---|---|
EventProvider | defaultProvider | The default provider |
System.Collections.Generic.IEnumerable<EventProvider> | providers | The list of supported providers |
IEventMessageFactory | messageFactory | The factory used to create message instances to send. |
IEventMessageValidator | messageValidator | The validator that evaluates incoming messages. |
Properties
DefaultProvider
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the default provider.
Declaration
public EventProvider DefaultProvider { get; }
Property Value
Type | Description |
---|---|
EventProvider |
Enabled
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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.Boolean |
|
IsActive
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. 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.Boolean |
Providers
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets all registered providers.
Declaration
public IEnumerable<EventProvider> Providers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EventProvider> | The providers. |
Methods
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
GetProvider(String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Get the event provider registered with name
Declaration
public virtual EventProvider GetProvider(string providerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | providerName | The name. |
Returns
Type | Description |
---|---|
EventProvider | A event provider |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | name |
System.ArgumentException | Throw if no matching provider was found |
Initialize()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes this instance.
Declaration
public virtual void Initialize()
InitializeProvidersAsync()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Starts the optional asyncronous initialization of all registered providers.
Declaration
public virtual Task[] InitializeProvidersAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task[] | An array of Task objects that can be used to syncronize the execution again. |
OnEventMissed(EventMissedEventArgs)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Called when the EventProviderService has identified a message as missing and raises the EventMissed event.
Declaration
protected virtual void OnEventMissed(EventMissedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
EventMissedEventArgs | e | The EventMissedEventArgs instance containing the event data. |
OnEventReceived(Object, EventReceivedEventArgs)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Called when any EventProvider has recieved a message and raises the EventReceived event.
Declaration
protected virtual void OnEventReceived(object sender, EventReceivedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The provider that received the event message. |
EventReceivedEventArgs | e | The EventReceivedEventArgs instance containing the event data. |
RaiseEventAsync(Guid, Object)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
public virtual Task RaiseEventAsync(Guid eventId, object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | eventId | The event id of the event to raise. |
System.Object | parameter | The event parameter to send with the event. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the work required to raise the event. |
Uninitialize()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Detaches all event handlers to provider.
Declaration
public virtual void Uninitialize()
Events
EventMissed
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Occurs when it is discovered that a remote event was missed.
Declaration
public event EventHandler<EventMissedEventArgs> EventMissed
Event Type
Type | Description |
---|---|
System.EventHandler<EventMissedEventArgs> |
EventReceived
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Occurs when a remote event has been received and verified.
Declaration
public event EventHandler<EventReceivedEventArgs> EventReceived
Event Type
Type | Description |
---|---|
System.EventHandler<EventReceivedEventArgs> |
Explicit Interface Implementations
IEventProviderAccessor.Provider
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Declaration
EventProvider IEventProviderAccessor.Provider { get; }
Returns
Type | Description |
---|---|
EventProvider |