private static IServiceCollection AddEventService( this IServiceCollection services, EventComposition composition) { composition.AddServicesTo(services); services.TryAdd(ServiceDescriptor.Transient <IEventService, DefaultEventService>()); return(services); }
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)); }
public ServiceBusOptions() { Events = new EventComposition(); Requests = new RequestComposition(); Authorization = new AuthorizationComposition(); }