Пример #1
0
        public ProductRoot CreateProductRoot(string file, ParseState state, VariantType variantType)
        {
            var specificationsLabeledItems = CreateSpecificationsLabeledItems(state);

            if (string.IsNullOrEmpty(state.PartNumber))
            {
                Console.WriteLine(state.File);
            }

            var productRoot = CreateProductRoot(
                file,
                state,
                CreateProduct(state, GetHpeHierarchyNode(state), state.Branch, GetProductLineHierarchyNode(state)),
                CreateBranch(state, variantType),
                CreateProductVariants(state),
                CreateMarketing(state),
                CreateOptionsItems(state),
                specificationsLabeledItems,
                ImageSelector.FilterImages(state.Links.ImageLinks),
                state.Hierarchy,
                CreateDetail(state, specificationsLabeledItems, state.Product.Unspsc)
                );

            return(productRoot);
        }
Пример #2
0
        public ProductRoot CreateProductRoot(string file, ParseState state)
        {
            var specificationsLabeledItems = CreateSpecificationsLabeledItems(state);
            var productRoot = CreateProductRoot(
                file,
                state,
                CreateProduct(state, GetHpeHierarchyNode(state), state.Branch, GetProductLineHierarchyNode(state)),
                CreateBranch(state),
                CreateProductVariants(state),
                CreateMarketing(state),
                CreateOptionsItems(state),
                specificationsLabeledItems,
                ImageSelector.FilterImages(state.Links.ImageLinks),
                state.Hierarchy,
                CreateDetail(state, specificationsLabeledItems)
                );

            return(productRoot);
        }