public void AttachesOnlyInstrumentedEventsToListener()
        {
            SingleEventSourceWithOtherEvents eventSource  = new SingleEventSourceWithOtherEvents();
            SingleEventListener             eventListener = new SingleEventListener();
            ReflectionInstrumentationBinder binder        = new ReflectionInstrumentationBinder();

            binder.Bind(eventSource, eventListener);
            eventSource.Raise();
            Assert.IsTrue(eventListener.eventWasRaised);
        }
コード例 #2
0
        public void AttachesOnlyInstrumentedEventsToListener()
        {
            SingleEventSourceWithOtherEvents eventSource = new SingleEventSourceWithOtherEvents();
            SingleEventListener eventListener = new SingleEventListener();

            ReflectionInstrumentationBinder binder = new ReflectionInstrumentationBinder();

            binder.Bind(eventSource, eventListener);

            eventSource.Raise();

            Assert.IsTrue(eventListener.eventWasRaised);
        }