public static void Main(string[] args) { Reciever reciever = new Reciever(); Invoker invoker = new Invoker(new CommandSwitchOff(reciever), new CommandSwitchOn(reciever)); invoker.SwitchOn(); invoker.SwitchOff(); }
static void Main(string[] args) { Reciever r = new Reciever(); ComplexDegreeResultHolder c = r.CalculateRadical(new Complex(4, 0), 3); Console.WriteLine(c.Mod); Console.WriteLine("----------------------"); for (int i = 0; i < c.Arguments.Count; i++) { Console.WriteLine(c.Arguments[i]); } Console.WriteLine("----------------------"); for (int i = 0; i < c.Results.Count; i++) { Console.WriteLine(c.Results[i]); } Console.ReadKey(); }
public CommandSwitchOn(Reciever reciever) { _reciever = reciever; }