You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
673 B

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();
}
}
}