using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Command { internal class Client { public static void HowToUse() { // Receiver 객체 StockBroker broker = new StockBroker(); // Invoker 객체 User user = new User(); // Command 객체 ICommand command = new StockCommand(broker, "MSFT", TxType.Buy, 150); user.AddCommand(command); user.AddCommand(broker, "AMZN", TxType.Sell, 2000); // Command 실행 요청 user.ExecuteAll(); } } }