public EconomyTraderProxy(ITraderContainer container) { Contract.Requires<ArgumentNullException>(container != null); _container = container; }
private void OnBankruptcy(ITraderContainer container) { Contract.Requires<ArgumentNullException>(container != null); var remove = true; if (TraderBankruptcy != null) { var args = new TraderBankruptcyEventArgs(container.Trader); TraderBankruptcy(this, args); remove = args.Remove; } if (remove) { _traders.Remove(container); } }
public IEconomyTraderProxy Create(ITraderContainer traderContainer) { return new EconomyTraderProxy(traderContainer); }