Beispiel #1
0
        static void RunClient()
        {
            MyClient client = new MyClient();

#if false
            // Test code: Verify that objects do not go out of scope too soon
            GC.Collect();
            GC.WaitForPendingFinalizers();
#endif

            if (client.Initialize())
            {
#if false
            // Test code: Verify that objects do not go out of scope too soon
            GC.Collect();
            GC.WaitForPendingFinalizers();
#endif

                Console.WriteLine("Press ENTER key to stop client");
                Console.ReadLine();
                Console.WriteLine("...Key press detected.  Stopping..");
            }

#if false
            // Test code: Verify that objects do not go out of scope too soon
            GC.Collect();
            GC.WaitForPendingFinalizers();
#endif

            client.Dispose();

#if false
            // Test code: Verify that objects do not go out of scope too soon
            GC.Collect();
            GC.WaitForPendingFinalizers();
#endif
        }
Beispiel #2
0
 public MyClientConnection(MyClient client)
 {
     Client = client;
 }