Пример #1
0
        public WeStock(ProductProperty[] skuInfo, int quantity, string productId)
        {
            TkDebug.AssertArgumentNullOrEmpty(productId, "productId", null);
            TkDebug.AssertArgumentNull(skuInfo, "skuInfo", null);

            SkuInfo = new List<ProductProperty>(skuInfo);
            ProductId = productId;
            Quantity = quantity;
        }
Пример #2
0
        public WeProductBase(string[] categoryIds, ProductProperty[] propertys, string name, SkuInfo[] skuInfos,
            string mainImg, string[] imgs, WeProductDetail[] details)
            : this(name, mainImg)
        {
            TkDebug.AssertArgumentNull(categoryIds, "categoryIds", null);
            TkDebug.AssertArgumentNull(propertys, "propertys", null);
            TkDebug.AssertArgumentNull(skuInfos, "propertys", null);
            TkDebug.AssertArgumentNull(imgs, "img", null);
            TkDebug.AssertArgumentNull(details, "details", null);

            CategoryIds.AddRange(categoryIds);
            Properties.AddRange(propertys);
            SkuInfos.AddRange(skuInfos);
            Imgs.AddRange(imgs);
            Details.AddRange(details);
        }
Пример #3
0
        public WeProductBase(string categoryId, ProductProperty property, string name, SkuInfo skuInfo,
            string mainImg, string img, WeProductDetail detail)
            : this(name, mainImg)
        {
            TkDebug.AssertArgumentNullOrEmpty(categoryId, "categoryId", null);
            TkDebug.AssertArgumentNull(property, "property", null);
            TkDebug.AssertArgumentNull(skuInfo, "skuInfo", null);
            TkDebug.AssertArgumentNullOrEmpty(img, "img", null);
            TkDebug.AssertArgumentNull(detail, "detail", null);

            CategoryIds.Add(categoryId);
            Properties.Add(property);
            SkuInfos.Add(skuInfo);
            Imgs.Add(img);
            Details.Add(detail);
        }