Show / Hide Table of Contents

Class EventBusBase

Inheritance
object
EventBusBase
DistributedEventBusBase
LocalEventBus
Implements
IEventBus
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.EventBus
Assembly: Volo.Abp.EventBus.dll
Syntax
public abstract class EventBusBase : IEventBus

Constructors

EventBusBase(IServiceScopeFactory, ICurrentTenant, IUnitOfWorkManager, IEventHandlerInvoker)

Declaration
protected EventBusBase(IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant, IUnitOfWorkManager unitOfWorkManager, IEventHandlerInvoker eventHandlerInvoker)
Parameters
Type Name Description
IServiceScopeFactory serviceScopeFactory
ICurrentTenant currentTenant
IUnitOfWorkManager unitOfWorkManager
IEventHandlerInvoker eventHandlerInvoker

Properties

CurrentTenant

Declaration
protected ICurrentTenant CurrentTenant { get; }
Property Value
Type Description
ICurrentTenant

EventHandlerInvoker

Declaration
protected IEventHandlerInvoker EventHandlerInvoker { get; }
Property Value
Type Description
IEventHandlerInvoker

ServiceScopeFactory

Declaration
protected IServiceScopeFactory ServiceScopeFactory { get; }
Property Value
Type Description
IServiceScopeFactory

UnitOfWorkManager

Declaration
protected IUnitOfWorkManager UnitOfWorkManager { get; }
Property Value
Type Description
IUnitOfWorkManager

Methods

AddToUnitOfWork(IUnitOfWork, UnitOfWorkEventRecord)

Declaration
protected abstract void AddToUnitOfWork(IUnitOfWork unitOfWork, UnitOfWorkEventRecord eventRecord)
Parameters
Type Name Description
IUnitOfWork unitOfWork
UnitOfWorkEventRecord eventRecord

GetEventDataTenantId(object)

Declaration
protected virtual Guid? GetEventDataTenantId(object eventData)
Parameters
Type Name Description
object eventData
Returns
Type Description
Guid?

GetHandlerFactories(Type)

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

InvokeEventHandlerAsync(IEventHandler, object, Type)

Declaration
protected virtual Task InvokeEventHandlerAsync(IEventHandler eventHandler, object eventData, Type eventType)
Parameters
Type Name Description
IEventHandler eventHandler
object eventData
Type eventType
Returns
Type Description
Task

PublishAsync(Type, object, bool)

Declaration
public virtual Task PublishAsync(Type eventType, object eventData, bool onUnitOfWorkComplete = true)
Parameters
Type Name Description
Type eventType
object eventData
bool onUnitOfWorkComplete
Returns
Type Description
Task

PublishAsync<TEvent>(TEvent, bool)

Declaration
public Task PublishAsync<TEvent>(TEvent eventData, bool onUnitOfWorkComplete = true) where TEvent : class
Parameters
Type Name Description
TEvent eventData
bool onUnitOfWorkComplete
Returns
Type Description
Task
Type Parameters
Name Description
TEvent

PublishToEventBusAsync(Type, object)

Declaration
protected abstract Task PublishToEventBusAsync(Type eventType, object eventData)
Parameters
Type Name Description
Type eventType
object eventData
Returns
Type Description
Task

Subscribe(Type, IEventHandler)

Declaration
public virtual IDisposable Subscribe(Type eventType, IEventHandler handler)
Parameters
Type Name Description
Type eventType
IEventHandler handler
Returns
Type Description
IDisposable

Subscribe(Type, IEventHandlerFactory)

Declaration
public abstract IDisposable Subscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Type Name Description
Type eventType
IEventHandlerFactory factory
Returns
Type Description
IDisposable

SubscribeHandlers(ITypeList<IEventHandler>)

Declaration
protected virtual void SubscribeHandlers(ITypeList<IEventHandler> handlers)
Parameters
Type Name Description
ITypeList<IEventHandler> handlers

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

Declaration
public virtual IDisposable Subscribe<TEvent>(Func<TEvent, Task> action) where TEvent : class
Parameters
Type Name Description
Func<TEvent, Task> action
Returns
Type Description
IDisposable
Type Parameters
Name Description
TEvent

Subscribe<TEvent>(IEventHandlerFactory)

Declaration
public virtual IDisposable Subscribe<TEvent>(IEventHandlerFactory factory) where TEvent : class
Parameters
Type Name Description
IEventHandlerFactory factory
Returns
Type Description
IDisposable
Type Parameters
Name Description
TEvent

Subscribe<TEvent, THandler>()

Declaration
public virtual IDisposable Subscribe<TEvent, THandler>() where TEvent : class where THandler : IEventHandler, new()
Returns
Type Description
IDisposable
Type Parameters
Name Description
TEvent
THandler

ThrowOriginalExceptions(Type, List<Exception>)

Declaration
protected void ThrowOriginalExceptions(Type eventType, List<Exception> exceptions)
Parameters
Type Name Description
Type eventType
List<Exception> exceptions

TriggerHandlerAsync(IEventHandlerFactory, Type, object, List<Exception>, InboxConfig?)

Declaration
protected virtual Task TriggerHandlerAsync(IEventHandlerFactory asyncHandlerFactory, Type eventType, object eventData, List<Exception> exceptions, InboxConfig? inboxConfig = null)
Parameters
Type Name Description
IEventHandlerFactory asyncHandlerFactory
Type eventType
object eventData
List<Exception> exceptions
InboxConfig inboxConfig
Returns
Type Description
Task

TriggerHandlersAsync(Type, object)

Declaration
public virtual Task TriggerHandlersAsync(Type eventType, object eventData)
Parameters
Type Name Description
Type eventType
object eventData
Returns
Type Description
Task

TriggerHandlersAsync(Type, object, List<Exception>, InboxConfig?)

Declaration
protected virtual Task TriggerHandlersAsync(Type eventType, object eventData, List<Exception> exceptions, InboxConfig? inboxConfig = null)
Parameters
Type Name Description
Type eventType
object eventData
List<Exception> exceptions
InboxConfig inboxConfig
Returns
Type Description
Task

Unsubscribe(Type, IEventHandler)

Declaration
public abstract void Unsubscribe(Type eventType, IEventHandler handler)
Parameters
Type Name Description
Type eventType
IEventHandler handler

Unsubscribe(Type, IEventHandlerFactory)

Declaration
public abstract void Unsubscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Type Name Description
Type eventType
IEventHandlerFactory factory

UnsubscribeAll(Type)

Declaration
public abstract void UnsubscribeAll(Type eventType)
Parameters
Type Name Description
Type eventType

UnsubscribeAll<TEvent>()

Declaration
public virtual void UnsubscribeAll<TEvent>() where TEvent : class
Type Parameters
Name Description
TEvent

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

Declaration
public abstract void Unsubscribe<TEvent>(Func<TEvent, Task> action) where TEvent : class
Parameters
Type Name Description
Func<TEvent, Task> action
Type Parameters
Name Description
TEvent

Unsubscribe<TEvent>(IEventHandlerFactory)

Declaration
public virtual void Unsubscribe<TEvent>(IEventHandlerFactory factory) where TEvent : class
Parameters
Type Name Description
IEventHandlerFactory factory
Type Parameters
Name Description
TEvent

Unsubscribe<TEvent>(ILocalEventHandler<TEvent>)

Declaration
public virtual void Unsubscribe<TEvent>(ILocalEventHandler<TEvent> handler) where TEvent : class
Parameters
Type Name Description
ILocalEventHandler<TEvent> handler
Type Parameters
Name Description
TEvent

Implements

IEventBus

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform