Beispiel #1
0
        public void RaiseːEventHandler1ValueChangedEventArgsEventˑPerformanceTest()
        {
            var c = new EventUtilˑRaiseˑTestClass();

            for (int i = 0; i < 1000000; i++)
            {
                c.RaiseEventHandler1ValueChangedEventArgsEvent();
            }
        }
Beispiel #2
0
        public void RaiseːEventHandlerEventDirectˑPerformanceTest()
        {
            var c = new EventUtilˑRaiseˑTestClass();

            for (int i = 0; i < 1000000; i++)
            {
                c.RaiseEventHandlerEventDirect();
            }
        }
Beispiel #3
0
        public void RaiseˑTest()
        {
            var c = new EventUtilˑRaiseˑTestClass();

            c.RaiseEventHandlerEvent();
            c.RaiseEventHandler1EventArgsEvent();
            c.RaiseEventHandler1ValueChangedEventArgsEvent();
            c.RaiseCustomEventHandler();
        }
Beispiel #4
0
        public void RaiseːCustomEventHandlerˑPerformanceTest()
        {
            // test for a not optimized delegate
            var c = new EventUtilˑRaiseˑTestClass();

            for (int i = 0; i < 1000000; i++)
            {
                c.RaiseCustomEventHandler();
            }
        }
Beispiel #5
0
        public void RaiseˑPerformanceTest()
        {
            var c = new EventUtilˑRaiseˑTestClass();

            for (int i = 0; i < 1000000; i++)
            {
                c.RaiseEventHandlerEventDirect();
                c.RaiseEventHandlerEvent();
                c.RaiseEventHandler1EventArgsEvent();
                c.RaiseEventHandler1ValueChangedEventArgsEvent();
//				c.RaiseCustomEventHandler();
            }
        }
Beispiel #6
0
        public void RaiseˑTargetInvocationExceptionˑTest()
        {
            var c = new EventUtilˑRaiseˑTestClass();

            Assert.Throws <TargetInvocationException>(() => c.RaiseːTargetInvocationExceptionEvent());
        }