public void ExplicitAttacherWillBeUsedToAttachInstrumentationInSourceAndListener()
        {
            ExplicitlyBoundSource source = new ExplicitlyBoundSource();

            object[] listenerConstructorArgs         = new object[0];
            ExplicitInstrumentationAttacher attacher =
                new ExplicitInstrumentationAttacher(source,
                                                    typeof(ListenerType), listenerConstructorArgs,
                                                    typeof(ExplicitBinder));

            attacher.BindInstrumentation();
            Assert.AreSame(source, ExplicitBinder.cachedSource);
            Assert.IsNotNull(ExplicitBinder.cachedListener);
        }
コード例 #2
0
		public void ExplicitAttacherWillBeUsedToAttachInstrumentationInSourceAndListener()
		{
			ExplicitlyBoundSource source = new ExplicitlyBoundSource();
			object[] listenerConstructorArgs = new object[0];
			
			ExplicitInstrumentationAttacher attacher = 
				new ExplicitInstrumentationAttacher(source, 
				                                  typeof(ListenerType), listenerConstructorArgs, 
				                                  typeof(ExplicitBinder));
			attacher.BindInstrumentation();
			
			Assert.AreSame(source, ExplicitBinder.cachedSource);
			Assert.IsNotNull(ExplicitBinder.cachedListener);
		}