Exemple #1
0
 public Merchant(int merchantId, MallController controller)
 {
     if (controller == null)
     {
         throw new ArgumentException("controller");
     }
     _merchantId = merchantId;
     _controller = controller;
 }
Exemple #2
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ZyGames.Framework.Game.Com.Mall.Merchant"/> class.
		/// </summary>
		/// <param name="merchantId">Merchant identifier.</param>
		/// <param name="controller">Controller.</param>
        public Merchant(int merchantId, MallController controller)
        {
            if (controller == null)
            {
                throw new ArgumentException("controller");
            }
            _merchantId = merchantId;
            _controller = controller;
        }
Exemple #3
0
		/// <summary>
		/// Registers the merchant.
		/// </summary>
		/// <param name="merchantId">Merchant identifier.</param>
		/// <param name="controller">Controller.</param>
        public static void RegisterMerchant(int merchantId, MallController controller)
        {
            if (controller == null)
            {
                throw new ArgumentNullException("controller");
            }
            Merchant merchant = new Merchant(merchantId, controller);
            merchant.InitializeGoods();
            if (!_merchantList.ContainsKey(merchantId))
            {
                _merchantList.Add(merchantId, merchant);
            }
        }
Exemple #4
0
        public static void RegisterMerchant(int merchantId, MallController controller)
        {
            if (controller == null)
            {
                throw new ArgumentNullException("controller");
            }
            Merchant merchant = new Merchant(merchantId, controller);

            merchant.InitializeGoods();
            if (!_merchantList.ContainsKey(merchantId))
            {
                _merchantList.Add(merchantId, merchant);
            }
        }