예제 #1
0
        //
        // For Self-tests
        //

#if SELF_TEST
        // Compile with:
        //    csc /d:SELF_TEST /r:CORDBLib.dll /r:Microsoft.Win32.Interop.Dll \
        //    /out:me.exe *.cs
        private static void Main()
        {
            ManagedEvents mde = new ManagedEvents();

            mde.Breakpoint += new BreakpointEventHandler(_test_breakpoint);
            mde.Breakpoint += new BreakpointEventHandler(_test_breakpoint);
            Console.WriteLine("this should generate output.");
            mde.OnBreakpoint(new BreakpointEventArgs(null, null, null));
            mde.Breakpoint -= new BreakpointEventHandler(_test_breakpoint);
            mde.Breakpoint -= new BreakpointEventHandler(_test_breakpoint);
            Console.WriteLine("this shouldn't generate output.");
            mde.OnBreakpoint(null);
        }
예제 #2
0
 public ManagedCallback(ManagedEvents outer)
 {
     m_delegate = outer;
 }