Пример #1
0
 private static IServiceCollection AddEventService(
     this IServiceCollection services, EventComposition composition)
 {
     composition.AddServicesTo(services);
     services.TryAdd(ServiceDescriptor.Transient <IEventService, DefaultEventService>());
     return(services);
 }
Пример #2
0
        public static IServiceCollection AddEventService(
            this IServiceCollection services, Action <EventComposition> configure)
        {
            Guard.AgainstNull(nameof(services), services);
            Guard.AgainstNull(nameof(configure), configure);

            var options = new EventComposition();

            configure(options);
            return(AddEventService(services, options));
        }
Пример #3
0
 public ServiceBusOptions()
 {
     Events        = new EventComposition();
     Requests      = new RequestComposition();
     Authorization = new AuthorizationComposition();
 }