예제 #1
0
        static MFTestResults TestCallback()
        {
            TestCallback testCall = new TestCallback("InteropSample_TestDriver", 12345, 10);

            // Register callback
            NativeEventHandler eventHandler = new NativeEventHandler(testCall.OnNativeEvent);

            testCall.OnInterrupt += eventHandler;

            // Now wait for 10 callbacks
            bool retVal = testCall.TestCallbacks();

            testCall.OnInterrupt -= eventHandler;

            testCall.Dispose();

            return(retVal ? MFTestResults.Pass : MFTestResults.Fail);
        }
예제 #2
0
        static MFTestResults TestCallback()
        {
            TestCallback testCall = new TestCallback( "InteropSample_TestDriver", 12345, 10 );
            
            // Register callback
            NativeEventHandler   eventHandler = new NativeEventHandler( testCall.OnNativeEvent );
            testCall.OnInterrupt += eventHandler;

            // Now wait for 10 callbacks
            bool retVal = testCall.TestCallbacks();

            testCall.OnInterrupt -= eventHandler;

            testCall.Dispose();

            return retVal ? MFTestResults.Pass : MFTestResults.Fail;
        }