Пример #1
0
        public static IServiceCollection AddButterfly(this IServiceCollection services, Action <ButterflyOptions> configure)
        {
            var option = new ButterflyOptions();

            configure(option);
            services.AddSingleton <IOptions <ButterflyOptions> >(new OptionsWrapper <ButterflyOptions>(option));
            return(services.AddButterfly().Configure(configure));
        }
 public ButterflySenderProvider(IOptions <ButterflyOptions> options)
 {
     _options = options.Value;
 }
Пример #3
0
 public ButterflyDispatcherProvider(IEnumerable <IDispatchCallback> dispatchCallbacks, ILoggerFactory loggerFactory, IOptions <ButterflyOptions> options)
 {
     _dispatchCallbacks = dispatchCallbacks;
     _loggerFactory     = loggerFactory;
     _options           = options.Value;
 }
Пример #4
0
 public ConsoleServiceTracerProvider(ITracer tracer, IOptions <ButterflyOptions> options)
 {
     _tracer  = tracer;
     _options = options.Value;
 }