public AttributeTest() { _container = new WindsorContainer(); _container.Register(Component.For <SimpleClass>() .ImplementedBy <SimpleClass>().Interceptors <PerfItInterceptor>()); _container.Register(Component.For <PerfItInterceptor>() .UsingFactoryMethod((k, ctx) => { var interceptor = new PerfItInterceptor("Vashah") { PublishCounters = false, PublishEvent = true, RaisePublishErrors = true, SamplingRate = 1.0d }; //interceptor.InstrumentorRequired += // (sender, e) => e.Instrumentor = new SimpleInstrumentorFixture(e.Info); return(interceptor); }) ); _listener = new ObservableEventListener(); _listener.EnableEvents(InstrumentationEventSource.Instance, EventLevel.Verbose); _subscription = _listener.LogToMemory(); }
public AttributeTest() { _container = new WindsorContainer(); _container.Register( Component.For <SimpleClass>().ImplementedBy <SimpleClass>() .Interceptors <PerfItInterceptor>()); _container.Register(Component.For <PerfItInterceptor>().Instance( new PerfItInterceptor("Vashah") { PublishCounters = false, PublishEvent = true, RaisePublishErrors = true })); _listener = new ObservableEventListener(); _listener.EnableEvents(InstrumentationEventSource.Instance, EventLevel.Verbose); _subscription = _listener.LogToMemory(); }
public AttributeTest() { _container = new WindsorContainer(); _container.Register( Component.For<SimpleClass>().ImplementedBy<SimpleClass>() .Interceptors<PerfItInterceptor>()); _container.Register(Component.For<PerfItInterceptor>().Instance( new PerfItInterceptor("Vashah") { PublishCounters = false, PublishEvent = true, RaisePublishErrors = true })); _listener = new ObservableEventListener(); _listener.EnableEvents(InstrumentationEventSource.Instance, EventLevel.Verbose); _subscription = _listener.LogToMemory(); }