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); }
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; }