Show / Hide Table of Contents

Class LocalDistributedEventBus

Inheritance
object
LocalDistributedEventBus
Implements
IDistributedEventBus
IEventBus
ISingletonDependency
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.Distributed
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
Type Name Description
ILocalEventBus localEventBus
Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory
Microsoft.Extensions.Options.IOptions<TOptions><AbpDistributedEventBusOptions> distributedEventBusOptions

Properties

AbpDistributedEventBusOptions

Declaration
protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; }
Property Value
Type Description
AbpDistributedEventBusOptions

ServiceScopeFactory

Declaration
protected IServiceScopeFactory ServiceScopeFactory { get; }
Property Value
Type Description
Microsoft.Extensions.DependencyInjection.IServiceScopeFactory

Methods

PublishAsync(Type, object, bool, bool)

Declaration
public Task PublishAsync(Type eventType, object eventData, bool onUnitOfWorkComplete = true, bool useOutbox = true)
Parameters
Type Name Description
System.Type eventType
object eventData
bool onUnitOfWorkComplete
bool useOutbox
Returns
Type Description
System.Threading.Tasks.Task

PublishAsync(Type, object, bool)

Declaration
public 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, 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 Description
System.Threading.Tasks.Task
Type Parameters
Name Description
TEvent

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
Name Description
TEvent

Subscribe(Type, IEventHandler)

Declaration
public 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 IDisposable Subscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Type Name Description
System.Type eventType
IEventHandlerFactory factory
Returns
Type Description
System.IDisposable

Subscribe(ITypeList<IEventHandler>)

Declaration
public virtual void Subscribe(ITypeList<IEventHandler> handlers)
Parameters
Type Name Description
ITypeList<IEventHandler> handlers

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

Declaration
public 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
Name Description
TEvent

Subscribe<TEvent>(IDistributedEventHandler<TEvent>)

Declaration
public virtual IDisposable Subscribe<TEvent>(IDistributedEventHandler<TEvent> handler) where TEvent : class
Parameters
Type Name Description
IDistributedEventHandler<TEvent> handler
Returns
Type Description
System.IDisposable
Type Parameters
Name Description
TEvent

Subscribe<TEvent>(IEventHandlerFactory)

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

Subscribe<TEvent>(ILocalEventHandler<TEvent>)

Declaration
public IDisposable Subscribe<TEvent>(ILocalEventHandler<TEvent> handler) where TEvent : class
Parameters
Type Name Description
ILocalEventHandler<TEvent> handler
Returns
Type Description
System.IDisposable
Type Parameters
Name Description
TEvent

Subscribe<TEvent, THandler>()

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

Unsubscribe(Type, IEventHandler)

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

Unsubscribe(Type, IEventHandlerFactory)

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

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

Declaration
public 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
Name Description
TEvent

Unsubscribe<TEvent>(IEventHandlerFactory)

Declaration
public 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 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 void UnsubscribeAll(Type eventType)
Parameters
Type Name Description
System.Type eventType

UnsubscribeAll<TEvent>()

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

Implements

IDistributedEventBus
IEventBus
ISingletonDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpDistributedEventBusExtensions.AsSupportsEventBoxes(IDistributedEventBus)
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>>)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In This Article
Back to top Powered by Volosoft