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; }
public ButterflyDispatcherProvider(IEnumerable <IDispatchCallback> dispatchCallbacks, ILoggerFactory loggerFactory, IOptions <ButterflyOptions> options) { _dispatchCallbacks = dispatchCallbacks; _loggerFactory = loggerFactory; _options = options.Value; }
public ConsoleServiceTracerProvider(ITracer tracer, IOptions <ButterflyOptions> options) { _tracer = tracer; _options = options.Value; }