Ejemplo n.º 1
0
        public static PatternBuilder AddEventLogBuilder(this PatternBuilder builder, Action <EventLogBuilderOptions> builderSetup = null)
        {
            var options = new EventLogBuilderOptions();

            builderSetup?.Invoke(options);

            builder.ServiceCollection.AddSingleton(options);
            builder.ServiceCollection.AddSingleton <IEventLogBuilder, EventLogBuilder>();
            return(builder);
        }
Ejemplo n.º 2
0
 public static PatternBuilder AddCommandListenerHostedService(this PatternBuilder builder)
 {
     builder.ServiceCollection.AddHostedService <CommandListenerHostedService>();
     return(builder);
 }