Class LocalDistributedEventBus
Inheritance
LocalDistributedEventBus
Assembly: Volo.Abp.EventBus.dll
Syntax
[Dependency(TryRegister = true)]
[ExposeServices(new Type[] { typeof(IDistributedEventBus), typeof(LocalDistributedEventBus) })]
public class LocalDistributedEventBus : IDistributedEventBus, IEventBus, ISingletonDependency
Constructors
LocalDistributedEventBus(ILocalEventBus, IServiceScopeFactory, IOptions<AbpDistributedEventBusOptions>)
Declaration
public LocalDistributedEventBus(ILocalEventBus localEventBus, IServiceScopeFactory serviceScopeFactory, IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions)
Parameters
Properties
AbpDistributedEventBusOptions
Declaration
protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; }
Property Value
ServiceScopeFactory
Declaration
protected IServiceScopeFactory ServiceScopeFactory { get; }
Property Value
Methods
PublishAsync(Type, object, bool)
Declaration
public Task PublishAsync(Type eventType, object eventData, bool onUnitOfWorkComplete = true)
Parameters
Type |
Name |
Description |
Type |
eventType |
|
object |
eventData |
|
bool |
onUnitOfWorkComplete |
|
Returns
PublishAsync(Type, object, bool, bool)
Declaration
public Task PublishAsync(Type eventType, object eventData, bool onUnitOfWorkComplete = true, bool useOutbox = true)
Parameters
Type |
Name |
Description |
Type |
eventType |
|
object |
eventData |
|
bool |
onUnitOfWorkComplete |
|
bool |
useOutbox |
|
Returns
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 Parameters
PublishAsync<TEvent>(TEvent, bool, bool)
Declaration
public Task PublishAsync<TEvent>(TEvent eventData, bool onUnitOfWorkComplete = true, bool useOutbox = true) where TEvent : class
Parameters
Type |
Name |
Description |
TEvent |
eventData |
|
bool |
onUnitOfWorkComplete |
|
bool |
useOutbox |
|
Returns
Type Parameters
Subscribe(Type, IEventHandler)
Declaration
public IDisposable Subscribe(Type eventType, IEventHandler handler)
Parameters
Returns
Subscribe(Type, IEventHandlerFactory)
Declaration
public IDisposable Subscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Returns
Subscribe(ITypeList<IEventHandler>)
Declaration
public virtual void Subscribe(ITypeList<IEventHandler> handlers)
Parameters
Subscribe<TEvent>(Func<TEvent, Task>)
Declaration
public IDisposable Subscribe<TEvent>(Func<TEvent, Task> action) where TEvent : class
Parameters
Type |
Name |
Description |
Func<TEvent, Task> |
action |
|
Returns
Type Parameters
Subscribe<TEvent>(IDistributedEventHandler<TEvent>)
Declaration
public virtual IDisposable Subscribe<TEvent>(IDistributedEventHandler<TEvent> handler) where TEvent : class
Parameters
Returns
Type Parameters
Subscribe<TEvent>(IEventHandlerFactory)
Declaration
public IDisposable Subscribe<TEvent>(IEventHandlerFactory factory) where TEvent : class
Parameters
Returns
Type Parameters
Subscribe<TEvent>(ILocalEventHandler<TEvent>)
Declaration
public IDisposable Subscribe<TEvent>(ILocalEventHandler<TEvent> handler) where TEvent : class
Parameters
Returns
Type Parameters
Subscribe<TEvent, THandler>()
Declaration
public IDisposable Subscribe<TEvent, THandler>() where TEvent : class where THandler : IEventHandler, new()
Returns
Type Parameters
Name |
Description |
TEvent |
|
THandler |
|
Unsubscribe(Type, IEventHandler)
Declaration
public void Unsubscribe(Type eventType, IEventHandler handler)
Parameters
Unsubscribe(Type, IEventHandlerFactory)
Declaration
public void Unsubscribe(Type eventType, IEventHandlerFactory factory)
Parameters
UnsubscribeAll(Type)
Declaration
public void UnsubscribeAll(Type eventType)
Parameters
Type |
Name |
Description |
Type |
eventType |
|
UnsubscribeAll<TEvent>()
Declaration
public void UnsubscribeAll<TEvent>() where TEvent : class
Type Parameters
Unsubscribe<TEvent>(Func<TEvent, Task>)
Declaration
public void Unsubscribe<TEvent>(Func<TEvent, Task> action) where TEvent : class
Parameters
Type |
Name |
Description |
Func<TEvent, Task> |
action |
|
Type Parameters
Unsubscribe<TEvent>(IEventHandlerFactory)
Declaration
public void Unsubscribe<TEvent>(IEventHandlerFactory factory) where TEvent : class
Parameters
Type Parameters
Unsubscribe<TEvent>(ILocalEventHandler<TEvent>)
Declaration
public void Unsubscribe<TEvent>(ILocalEventHandler<TEvent> handler) where TEvent : class
Parameters
Type Parameters
Implements
Extension Methods