2using System.Xml.Serialization;
11[XmlType(TypeName =
"warehouseReferenceKind")]
18 [XmlEnum(
"standaloneWarehouse")]
25 [XmlEnum(
"plantWarehouse")]
39[XmlType(TypeName =
"warehouseReference")]
43 private int _referenceId;
77 [XmlAttribute(
"kind")]
86 throw new ArgumentOutOfRangeException(
89 "The warehouse reference kind is not valid.");
93 SetProperty(ref _kind, value);
112 throw new ArgumentOutOfRangeException(
115 "The warehouse reference identifier cannot be negative.");
119 SetProperty(ref _referenceId, value);
158 return $
"{Kind}:{ReferenceId}";
Base class for model objects that notify listeners when one of their properties changes.
Represents a warehouse attached to a plant.
Represents a standalone warehouse that is not attached to a plant.
WarehouseReference()
Initializes an empty warehouse reference.
override string ToString()
Returns a readable representation of the warehouse reference.
int ReferenceId
Gets or sets the referenced identifier.
WarehouseReference(WarehouseReferenceKind kind, int referenceId)
Initializes a warehouse reference.
WarehouseReferenceKind Kind
Gets or sets the kind of warehouse being referenced.
static WarehouseReference ForPlantWarehouse(int plantId)
Creates a reference to the warehouse attached to a plant.
static WarehouseReference ForStandaloneWarehouse(int warehouseId)
Creates a reference to a standalone warehouse.
WarehouseReferenceKind
Identifies the type of warehouse referenced by a relationship.