Show / Hide Table of Contents

Class EventBusBase

Inheritance
System.Object
EventBusBase
KafkaDistributedEventBus
LocalEventBus
RabbitMqDistributedEventBus
Implements
IEventBus
Namespace: Volo.Abp.EventBus
Assembly: Volo.Abp.EventBus.dll
Syntax
public abstract class EventBusBase : object, IEventBus

Constructors

EventBusBase(IServiceScopeFactory, ICurrentTenant)

Declaration
protected EventBusBase(IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant)
Parameters
Type Name Description
IServiceScopeFactory serviceScopeFactory
ICurrentTenant currentTenant

Properties

CurrentTenant

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

ServiceScopeFactory

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

Methods

GetEventDataTenantId(Object)

Declaration
protected virtual Guid? GetEventDataTenantId(object eventData)
Parameters
Type Name Description
System.Object eventData
Returns
Type Description
System.Nullable<Guid>

GetHandlerFactories(Type)

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

PublishAsync(Type, Object)

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

PublishAsync<TEvent>(TEvent)

Declaration
public virtual Task PublishAsync<TEvent>(TEvent eventData)

    where TEvent : class
Parameters
Type Name Description
TEvent eventData
Returns
Type Description
Task
Type Parameters
Name Description
TEvent

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

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

SubscribeHandlers(ITypeList<IEventHandler>)

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

TriggerHandlerAsync(IEventHandlerFactory, Type, Object, List<Exception>)

Declaration
protected virtual Task TriggerHandlerAsync(IEventHandlerFactory asyncHandlerFactory, Type eventType, object eventData, List<Exception> exceptions)
Parameters
Type Name Description
IEventHandlerFactory asyncHandlerFactory
Type eventType
System.Object eventData
List<Exception> exceptions
Returns
Type Description
Task

TriggerHandlersAsync(Type, Object)

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

TriggerHandlersAsync(Type, Object, List<Exception>)

Declaration
protected virtual Task TriggerHandlersAsync(Type eventType, object eventData, List<Exception> exceptions)
Parameters
Type Name Description
Type eventType
System.Object eventData
List<Exception> exceptions
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

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

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

Implements

IEventBus

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