SaaS CMS has officially launched! Learn more now.

Class InventoryLoader

Loads inventories for a content.

Inheritance
System.Object
InventoryLoader
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Catalog
Assembly: EPiServer.Business.Commerce.dll
Version: 11.8.3
Syntax
public class InventoryLoader : EntryLoaderBase

Constructors

InventoryLoader(IWarehouseInventoryService, ReferenceConverter, ICatalogSystem)

Creates an instance of InventoryLoader.

Declaration
[Obsolete("Use constructor with IContentLoader instead. Will remain at least until October 2017.")]
public InventoryLoader(IWarehouseInventoryService warehouseInventoryService, ReferenceConverter referenceConverter, ICatalogSystem catalogSystem)
Parameters
Type Name Description
IWarehouseInventoryService warehouseInventoryService

The warehouse inventory service.

ReferenceConverter referenceConverter

The reference converter.

ICatalogSystem catalogSystem

The catalog system.

InventoryLoader(IInventoryService, ReferenceConverter, ICatalogSystem)

Creates an instance of InventoryLoader.

Declaration
[Obsolete("Use constructor with IContentLoader instead. Will remain at least until October 2017.")]
public InventoryLoader(IInventoryService inventoryService, ReferenceConverter referenceConverter, ICatalogSystem catalogSystem)
Parameters
Type Name Description
IInventoryService inventoryService

The inventory service.

ReferenceConverter referenceConverter

The reference converter.

ICatalogSystem catalogSystem

The catalog system.

InventoryLoader(IInventoryService, ReferenceConverter, ICatalogSystem, IContentLoader)

Creates an instance of InventoryLoader.

Declaration
public InventoryLoader(IInventoryService inventoryService, ReferenceConverter referenceConverter, ICatalogSystem catalogSystem, IContentLoader contentLoader)
Parameters
Type Name Description
IInventoryService inventoryService

The inventory service.

ReferenceConverter referenceConverter

The reference converter.

ICatalogSystem catalogSystem

The catalog system.

EPiServer.IContentLoader contentLoader

The content loader.

Methods

GetStockPlacement(ContentReference)

Gets the inventories for the specified contentLink.

Declaration
public ItemCollection<Inventory> GetStockPlacement(ContentReference contentLink)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

Reference to the content to get inventories for.

Returns
Type Description
ItemCollection<Inventory>

Collection of inventories for the content.

GetStockPlacement(ContentReference, Boolean)

Gets the inventories for the specified contentLink.

Declaration
public ItemCollection<Inventory> GetStockPlacement(ContentReference contentLink, bool includeEmptyWarehouses)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

Reference to the content to get inventories for.

System.Boolean includeEmptyWarehouses

Determines if inventories should be included even when warehouse is out of stock.

Returns
Type Description
ItemCollection<Inventory>

Collection of inventories for the content.

GetStockPlacement(ContentReference, Int32, Int32, out Int32)

Gets the inventories for the specific entry or node contentLink, with paging.

Declaration
public ItemCollection<Inventory> GetStockPlacement(ContentReference contentLink, int startIndex, int numberOfRecord, out int total)
Parameters
Type Name Description
EPiServer.Core.ContentReference contentLink

The content link.

System.Int32 startIndex

The start index.

System.Int32 numberOfRecord

The number of record.

System.Int32 total

The total.

Returns
Type Description
ItemCollection<Inventory>