/// <summary> /// Initializes a new instance of the <see cref="ProductVariantFactory"/> class. /// </summary> /// <param name="productAttributes"> /// The product attributes. /// </param> /// <param name="catalogInventories"> /// The catalog inventories. /// </param> /// <param name="detachedContentCollection"> /// The <see cref="DetachedContentCollection{IProductVariantDetachedContent}"/> /// </param> public ProductVariantFactory(ProductAttributeCollection productAttributes, CatalogInventoryCollection catalogInventories, DetachedContentCollection <IProductVariantDetachedContent> detachedContentCollection) { _productAttributeCollection = productAttributes; _catalogInventories = catalogInventories; _detachedContentCollection = detachedContentCollection; }
/// <summary> /// Initializes a new instance of the <see cref="ProductFactory"/> class. /// </summary> /// <param name="getProductAttributes"> /// The product attributes. /// </param> /// <param name="getCatalogInventories"> /// The catalog inventories. /// </param> /// <param name="getProductOptions"> /// The product options. /// </param> /// <param name="getProductVariantCollection"> /// The product variant collection. /// </param> /// <param name="getDetachedContentCollection"> /// Gets the detached content collection /// </param> public ProductFactory( ProductAttributeCollection getProductAttributes, CatalogInventoryCollection getCatalogInventories, Func <Guid, ProductOptionCollection> getProductOptions, Func <Guid, ProductVariantCollection> getProductVariantCollection, DetachedContentCollection <IProductVariantDetachedContent> getDetachedContentCollection) { _productVariantFactory = new ProductVariantFactory(getProductAttributes, getCatalogInventories, getDetachedContentCollection); this._getProductOptionCollection = getProductOptions; this._getProductVariantCollection = getProductVariantCollection; }
/// <summary> /// Initializes a new instance of the <see cref="ProductBase"/> class. /// </summary> /// <param name="name"> /// The name. /// </param> /// <param name="sku"> /// The SKU. /// </param> /// <param name="price"> /// The price. /// </param> /// <param name="catalogInventoryCollection"> /// The catalog inventory collection. /// </param> /// <param name="detachedContents"> /// The detached Contents. /// </param> internal ProductBase(string name, string sku, decimal price, CatalogInventoryCollection catalogInventoryCollection, DetachedContentCollection <IProductVariantDetachedContent> detachedContents) { Ensure.ParameterNotNullOrEmpty(name, "name"); Ensure.ParameterNotNullOrEmpty(sku, "sku"); Ensure.ParameterNotNull(catalogInventoryCollection, "warehouseInventory"); Ensure.ParameterNotNull(detachedContents, "detachedContents"); _name = name; _sku = sku; _price = price; _catalogInventoryCollection = catalogInventoryCollection; _detachedContents = detachedContents; }
/// <summary> /// Initializes a new instance of the <see cref="ProductVariant"/> class. /// </summary> /// <param name="productKey"> /// The product key. /// </param> /// <param name="attributes"> /// The attributes. /// </param> /// <param name="catalogInventoryCollection"> /// The catalog inventory collection. /// </param> /// <param name="detachedContents"> /// The detached contents. /// </param> /// <param name="master"> /// The master. /// </param> /// <param name="name"> /// The name. /// </param> /// <param name="sku"> /// The SKU. /// </param> /// <param name="price"> /// The price. /// </param> internal ProductVariant(Guid productKey, ProductAttributeCollection attributes, CatalogInventoryCollection catalogInventoryCollection, DetachedContentCollection <IProductVariantDetachedContent> detachedContents, bool master, string name, string sku, decimal price) : base(name, sku, price, catalogInventoryCollection, detachedContents) { Mandate.ParameterNotNull(attributes, "attributes"); Mandate.ParameterNotNull(catalogInventoryCollection, "warehouseInventory"); _productKey = productKey; _attibutes = attributes; _master = master; }
/// <summary> /// Initializes a new instance of the <see cref="ProductVariant"/> class. /// </summary> /// <param name="productKey"> /// The product key. /// </param> /// <param name="attributes"> /// The attributes. /// </param> /// <param name="catalogInventoryCollection"> /// The catalog inventory collection. /// </param> /// <param name="detachedContents"> /// The detached contents. /// </param> /// <param name="master"> /// The master. /// </param> /// <param name="name"> /// The name. /// </param> /// <param name="sku"> /// The SKU. /// </param> /// <param name="price"> /// The price. /// </param> internal ProductVariant(Guid productKey, ProductAttributeCollection attributes, CatalogInventoryCollection catalogInventoryCollection, DetachedContentCollection<IProductVariantDetachedContent> detachedContents, bool master, string name, string sku, decimal price) : base(name, sku, price, catalogInventoryCollection, detachedContents) { Ensure.ParameterNotNull(attributes, "attributes"); Ensure.ParameterNotNull(catalogInventoryCollection, "warehouseInventory"); _productKey = productKey; _attibutes = attributes; _master = master; }
/// <summary> /// Initializes a new instance of the <see cref="ProductBase"/> class. /// </summary> /// <param name="name"> /// The name. /// </param> /// <param name="sku"> /// The SKU. /// </param> /// <param name="price"> /// The price. /// </param> /// <param name="catalogInventoryCollection"> /// The catalog inventory collection. /// </param> /// <param name="detachedContents"> /// The detached Contents. /// </param> internal ProductBase(string name, string sku, decimal price, CatalogInventoryCollection catalogInventoryCollection, DetachedContentCollection<IProductVariantDetachedContent> detachedContents) { Ensure.ParameterNotNullOrEmpty(name, "name"); Ensure.ParameterNotNullOrEmpty(sku, "sku"); Ensure.ParameterNotNull(catalogInventoryCollection, "warehouseInventory"); Ensure.ParameterNotNull(detachedContents, "detachedContents"); _name = name; _sku = sku; _price = price; _catalogInventoryCollection = catalogInventoryCollection; _detachedContents = detachedContents; }