Method CreateInventory
CreateInventory(string, string, string)
This will create a new Inventory by specifying what InventoryDefinition Id to use.
Declaration
public static Inventory CreateInventory(string inventoryDefinitionId, string inventoryId, string displayName = null)
Parameters
Type | Name | Description |
---|---|---|
string | inventoryDefinitionId | The Id of the InventoryDefinition to assign this Inventory. |
string | inventoryId | The Id this inventory will have. |
string | displayName | The display name this Inventory will have. |
Returns
Type | Description |
---|---|
Inventory | The newly created Inventory based on specified InventoryDefinition. |
CreateInventory(int, string, string)
This will create a new Inventory by specifying what InventoryDefinition to use by Hash.
Declaration
public static Inventory CreateInventory(int inventoryDefinitionHash, string inventoryId, string displayName = null)
Parameters
Type | Name | Description |
---|---|---|
int | inventoryDefinitionHash | The Hash of the InventoryDefinition to assign this Inventory. |
string | inventoryId | The Id this Inventory will have. |
string | displayName | The display name this Inventory will have. |
Returns
Type | Description |
---|---|
Inventory | The newly created Inventory based on the specified InventoryDefinition. |
Exceptions
Type | Condition |
---|---|
Invalid |
Thrown if an invalid Hash is provided. |
Argument |
Thrown if the given Id is null, empty, or a duplicate. |
CreateInventory(InventoryDefinition, string, string)
This will create a new Inventory by specifying what InventoryDefinition to use.
Declaration
public static Inventory CreateInventory(InventoryDefinition inventoryDefinition, string inventoryId, string displayName = null)
Parameters
Type | Name | Description |
---|---|---|
Inventory |
inventoryDefinition | The InventoryDefinition to assign this Inventory. |
string | inventoryId | The Id this Inventory will have. |
string | displayName | The display name this Inventory will have. |
Returns
Type | Description |
---|---|
Inventory | The newly created Inventory based on the specified InventoryDefinition. |