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
656 B
29 lines
656 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Command
|
|
{
|
|
internal class StockCommand : ICommand
|
|
{
|
|
private StockBroker _broker;
|
|
private string symbol;
|
|
private TxType txType;
|
|
private int qty;
|
|
|
|
public StockCommand(StockBroker broker, string symbol, TxType txType, int qty)
|
|
{
|
|
_broker = broker;
|
|
this.symbol = symbol;
|
|
this.txType = txType;
|
|
this.qty = qty;
|
|
}
|
|
|
|
public void Execute()
|
|
{
|
|
_broker.Process(symbol, txType, qty);
|
|
}
|
|
}
|
|
}
|
|
|