Exemple #1
0
        /// <summary>
        /// Tests the socket class.
        /// </summary>
        private static void TestSocketClass()
        {
            ISocketAdapter socketAdapter = new SocketClassAdapterImpl();
            Volts          v3            = socketAdapter.Get3Volts();
            Volts          v12           = socketAdapter.Get12Volts();
            Volts          v120          = socketAdapter.Get120Volts();

            Console.WriteLine("V3 using class Adapter = " + v3.Getvolts());
            Console.WriteLine("V12 using class Adapter = " + v12.Getvolts());
            Console.WriteLine("V120 using class Adapter = " + v120.Getvolts());
        }
Exemple #2
0
 /// <summary>
 /// Converts the volt.
 /// </summary>
 /// <param name="v">The v.</param>
 /// <param name="i">The i.</param>
 /// <returns></returns>
 private Volts ConvertVolt(Volts v, int i)
 {
     return(new Volts(v.Getvolts() / i));
 }