Class EventBusBase
Inheritance
object
EventBusBase
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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
Properties
CurrentTenant
Declaration
protected ICurrentTenant CurrentTenant { get; }
Property Value
EventHandlerInvoker
Declaration
protected IEventHandlerInvoker EventHandlerInvoker { get; }
Property Value
ServiceScopeFactory
Declaration
protected IServiceScopeFactory ServiceScopeFactory { get; }
Property Value
| Type |
Description |
| Microsoft.Extensions.DependencyInjection.IServiceScopeFactory |
|
UnitOfWorkManager
Declaration
protected IUnitOfWorkManager UnitOfWorkManager { get; }
Property Value
Methods
AddToUnitOfWork(IUnitOfWork, UnitOfWorkEventRecord)
Declaration
protected abstract void AddToUnitOfWork(IUnitOfWork unitOfWork, UnitOfWorkEventRecord eventRecord)
Parameters
GetEventDataTenantId(object)
Declaration
protected virtual Guid? GetEventDataTenantId(object eventData)
Parameters
| Type |
Name |
Description |
| object |
eventData |
|
Returns
| Type |
Description |
| System.Guid? |
|
GetHandlerFactories(Type)
Declaration
protected abstract IEnumerable<EventBusBase.EventTypeWithEventHandlerFactories> GetHandlerFactories(Type eventType)
Parameters
| Type |
Name |
Description |
| System.Type |
eventType |
|
Returns
PublishAsync(Type, object, bool)
Declaration
public virtual Task PublishAsync(Type eventType, object eventData, bool onUnitOfWorkComplete = true)
Parameters
| Type |
Name |
Description |
| System.Type |
eventType |
|
| object |
eventData |
|
| bool |
onUnitOfWorkComplete |
|
Returns
| Type |
Description |
| System.Threading.Tasks.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 |
| System.Threading.Tasks.Task |
|
Type Parameters
PublishToEventBusAsync(Type, object)
Declaration
protected abstract Task PublishToEventBusAsync(Type eventType, object eventData)
Parameters
| Type |
Name |
Description |
| System.Type |
eventType |
|
| object |
eventData |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Subscribe(Type, IEventHandler)
Declaration
public virtual IDisposable Subscribe(Type eventType, IEventHandler handler)
Parameters
| Type |
Name |
Description |
| System.Type |
eventType |
|
| IEventHandler |
handler |
|
Returns
| Type |
Description |
| System.IDisposable |
|
Subscribe(Type, IEventHandlerFactory)
Declaration
public abstract IDisposable Subscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Returns
| Type |
Description |
| System.IDisposable |
|
Subscribe<TEvent>(Func<TEvent, Task>)
Declaration
public virtual IDisposable Subscribe<TEvent>(Func<TEvent, Task> action) where TEvent : class
Parameters
| Type |
Name |
Description |
| System.Func<T, TResult><TEvent, System.Threading.Tasks.Task> |
action |
|
Returns
| Type |
Description |
| System.IDisposable |
|
Type Parameters
Subscribe<TEvent>(IEventHandlerFactory)
Declaration
public virtual IDisposable Subscribe<TEvent>(IEventHandlerFactory factory) where TEvent : class
Parameters
Returns
| Type |
Description |
| System.IDisposable |
|
Type Parameters
Subscribe<TEvent, THandler>()
Declaration
public virtual IDisposable Subscribe<TEvent, THandler>() where TEvent : class where THandler : IEventHandler, new()
Returns
| Type |
Description |
| System.IDisposable |
|
Type Parameters
| Name |
Description |
| TEvent |
|
| THandler |
|
SubscribeHandlers(ITypeList<IEventHandler>)
Declaration
protected virtual void SubscribeHandlers(ITypeList<IEventHandler> handlers)
Parameters
ThrowOriginalExceptions(Type, List<Exception>)
Declaration
protected void ThrowOriginalExceptions(Type eventType, List<Exception> exceptions)
Parameters
| Type |
Name |
Description |
| System.Type |
eventType |
|
| System.Collections.Generic.List<T><System.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 |
|
| System.Type |
eventType |
|
| object |
eventData |
|
| System.Collections.Generic.List<T><System.Exception> |
exceptions |
|
| InboxConfig |
inboxConfig |
|
Returns
| Type |
Description |
| System.Threading.Tasks.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 |
| System.Type |
eventType |
|
| object |
eventData |
|
| System.Collections.Generic.List<T><System.Exception> |
exceptions |
|
| InboxConfig |
inboxConfig |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
TriggerHandlersAsync(Type, object)
Declaration
public virtual Task TriggerHandlersAsync(Type eventType, object eventData)
Parameters
| Type |
Name |
Description |
| System.Type |
eventType |
|
| object |
eventData |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Unsubscribe(Type, IEventHandler)
Declaration
public abstract void Unsubscribe(Type eventType, IEventHandler handler)
Parameters
| Type |
Name |
Description |
| System.Type |
eventType |
|
| IEventHandler |
handler |
|
Unsubscribe(Type, IEventHandlerFactory)
Declaration
public abstract void Unsubscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Unsubscribe<TEvent>(Func<TEvent, Task>)
Declaration
public abstract void Unsubscribe<TEvent>(Func<TEvent, Task> action) where TEvent : class
Parameters
| Type |
Name |
Description |
| System.Func<T, TResult><TEvent, System.Threading.Tasks.Task> |
action |
|
Type Parameters
Unsubscribe<TEvent>(IEventHandlerFactory)
Declaration
public virtual void Unsubscribe<TEvent>(IEventHandlerFactory factory) where TEvent : class
Parameters
Type Parameters
Unsubscribe<TEvent>(ILocalEventHandler<TEvent>)
Declaration
public virtual void Unsubscribe<TEvent>(ILocalEventHandler<TEvent> handler) where TEvent : class
Parameters
Type Parameters
UnsubscribeAll(Type)
Declaration
public abstract void UnsubscribeAll(Type eventType)
Parameters
| Type |
Name |
Description |
| System.Type |
eventType |
|
UnsubscribeAll<TEvent>()
Declaration
public virtual void UnsubscribeAll<TEvent>() where TEvent : class
Type Parameters
Implements
Extension Methods