Esempio n. 1
0
 static void DisconnectTest(NetworkDrive drive)
 {
     Console.WriteLine("Press any key to disconnect...");
     Console.ReadKey();
     Console.WriteLine("Disconnecting...");
     drive.Disconnect();
     Console.WriteLine("Disconnected: {0}", !drive.IsConnected);
 }
Esempio n. 2
0
 internal static void CanBeDisconnected(NetworkDrive drive)
 {
     try
     {
         drive.Disconnect();
         ConnectionAsserts.Assert_Disconnected(drive);
     }
     catch (OperationCanceledException)
     {
         ConnectionAsserts.Assert_Connected(drive);
     }
 }