Beispiel #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 /// <typeparam name="TEventHandler"></typeparam>
 /// <returns></returns>
 public static EventBusOptions AddTransientHandler <TEventHandler>(this EventBusOptions options)
     where TEventHandler : class, IEventHandler
 {
     options.AddHandler(EventHandlerDescriptor.Transient <TEventHandler>());
     return(options);
 }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 /// <typeparam name="TEventHandler"></typeparam>
 /// <returns></returns>
 public static EventBusOptions AddSingletonHandler <TEventHandler>(this EventBusOptions options)
     where TEventHandler : class, IEventHandler
 {
     options.AddHandler(EventHandlerDescriptor.Singleton <TEventHandler>());
     return(options);
 }
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 /// <param name="handlerType"></param>
 /// <param name="activationType"></param>
 /// <returns></returns>
 public static EventBusOptions AddHandler(this EventBusOptions options, Type handlerType, EventHandlerActivationType activationType)
 {
     options.AddHandler(EventHandlerDescriptor.Describe(handlerType, activationType));
     return(options);
 }
Beispiel #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 /// <param name="activationType"></param>
 /// <typeparam name="TEventHandler"></typeparam>
 /// <returns></returns>
 public static EventBusOptions AddHandler <TEventHandler>(this EventBusOptions options, EventHandlerActivationType activationType)
     where TEventHandler : class, IEventHandler
 {
     options.AddHandler(EventHandlerDescriptor.Describe <TEventHandler>(activationType));
     return(options);
 }
Beispiel #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 protected EventErrorHandlerBase(IOptions <EventBusOptions> options)
 {
     Options = options.Value;
 }