Пример #1
0
 public static ProductData Clone(ProductData product)
 {
     return new ProductData
     {
         Sku = product.Sku,
         Handle = product.Handle,
         Weight = product.Weight,
         InventoryQuantity = product.InventoryQuantity,
         InventoryPolicy = product.InventoryPolicy,
         FulfillmentService = product.FulfillmentService,
         Price = product.Price
     };
 }
Пример #2
0
        private ProductData[] ConvertNodeToProduct(HtmlNode node)
        {
            var products = new List<ProductData>();

            CurrentProduct = new ProductData();
            CurrentProduct.Title = GetTitle(node);
            CurrentProduct.Price = GetPrice(node);
            CurrentProduct.Image = GetMainImage(node);
            CurrentProduct.Handle = GetHandle(node);
            var productDetails = GetDetails(node);
            return products.ToArray();
        }