Show / Hide Table of Contents

Class LocalEventBus

Implements EventBus as Singleton pattern.

Inheritance
System.Object
EventBusBase
LocalEventBus
Implements
ILocalEventBus
IEventBus
ISingletonDependency
Inherited Members
EventBusBase.ServiceScopeFactory
EventBusBase.CurrentTenant
EventBusBase.Subscribe<TEvent>(Func<TEvent, Task>)
EventBusBase.Subscribe<TEvent, THandler>()
EventBusBase.Subscribe(Type, IEventHandler)
EventBusBase.Subscribe<TEvent>(IEventHandlerFactory)
EventBusBase.Unsubscribe<TEvent>(ILocalEventHandler<TEvent>)
EventBusBase.Unsubscribe<TEvent>(IEventHandlerFactory)
EventBusBase.UnsubscribeAll<TEvent>()
EventBusBase.PublishAsync<TEvent>(TEvent)
EventBusBase.TriggerHandlersAsync(Type, Object)
EventBusBase.TriggerHandlersAsync(Type, Object, List<Exception>)
EventBusBase.SubscribeHandlers(ITypeList<IEventHandler>)
EventBusBase.TriggerHandlerAsync(IEventHandlerFactory, Type, Object, List<Exception>)
EventBusBase.GetEventDataTenantId(Object)
Namespace: Volo.Abp.EventBus.Local
Assembly: Volo.Abp.EventBus.dll
Syntax
public class LocalEventBus : EventBusBase, ILocalEventBus, IEventBus, ISingletonDependency

Constructors

LocalEventBus(IOptions<AbpLocalEventBusOptions>, IServiceScopeFactory, ICurrentTenant)

Declaration
public LocalEventBus(IOptions<AbpLocalEventBusOptions> options, IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant)
Parameters
Type Name Description
IOptions<AbpLocalEventBusOptions> options
IServiceScopeFactory serviceScopeFactory
ICurrentTenant currentTenant

Properties

HandlerFactories

Declaration
protected ConcurrentDictionary<Type, List<IEventHandlerFactory>> HandlerFactories { get; }
Property Value
Type Description
ConcurrentDictionary<Type, List<IEventHandlerFactory>>

Logger

Reference to the Logger.

Declaration
public ILogger<LocalEventBus> Logger { get; set; }
Property Value
Type Description
ILogger<LocalEventBus>

Options

Declaration
protected AbpLocalEventBusOptions Options { get; }
Property Value
Type Description
AbpLocalEventBusOptions

Methods

GetHandlerFactories(Type)

Declaration
protected override IEnumerable<EventBusBase.EventTypeWithEventHandlerFactories> GetHandlerFactories(Type eventType)
Parameters
Type Name Description
Type eventType
Returns
Type Description
IEnumerable<EventBusBase.EventTypeWithEventHandlerFactories>
Overrides
EventBusBase.GetHandlerFactories(Type)

PublishAsync(Type, Object)

Declaration
public override Task PublishAsync(Type eventType, object eventData)
Parameters
Type Name Description
Type eventType
System.Object eventData
Returns
Type Description
Task
Overrides
EventBusBase.PublishAsync(Type, Object)

Subscribe(Type, IEventHandlerFactory)

Declaration
public override IDisposable Subscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Type Name Description
Type eventType
IEventHandlerFactory factory
Returns
Type Description
IDisposable
Overrides
EventBusBase.Subscribe(Type, IEventHandlerFactory)

Subscribe<TEvent>(ILocalEventHandler<TEvent>)

Declaration
public virtual IDisposable Subscribe<TEvent>(ILocalEventHandler<TEvent> handler)

    where TEvent : class
Parameters
Type Name Description
ILocalEventHandler<TEvent> handler
Returns
Type Description
IDisposable
Type Parameters
Name Description
TEvent

Unsubscribe(Type, IEventHandler)

Declaration
public override void Unsubscribe(Type eventType, IEventHandler handler)
Parameters
Type Name Description
Type eventType
IEventHandler handler
Overrides
EventBusBase.Unsubscribe(Type, IEventHandler)

Unsubscribe(Type, IEventHandlerFactory)

Declaration
public override void Unsubscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Type Name Description
Type eventType
IEventHandlerFactory factory
Overrides
EventBusBase.Unsubscribe(Type, IEventHandlerFactory)

Unsubscribe<TEvent>(Func<TEvent, Task>)

Declaration
public override void Unsubscribe<TEvent>(Func<TEvent, Task> action)

    where TEvent : class
Parameters
Type Name Description
Func<TEvent, Task> action
Type Parameters
Name Description
TEvent
Overrides
Volo.Abp.EventBus.EventBusBase.Unsubscribe<TEvent>(Func<TEvent, Task>)

UnsubscribeAll(Type)

Declaration
public override void UnsubscribeAll(Type eventType)
Parameters
Type Name Description
Type eventType
Overrides
EventBusBase.UnsubscribeAll(Type)

Implements

ILocalEventBus
IEventBus
ISingletonDependency

Extension Methods

AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft