Пример #1
0
 public EconomyTraderProxy(ITraderContainer container)
 {
     Contract.Requires<ArgumentNullException>(container != null);
     _container = container;
 }
Пример #2
0
 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);
 }