Class WorkPiece
Type represents a work piece (test item).
Implements
Inherited Members
Namespace: Loehnert.TypeAndResult
Assembly: Loehnert.TypeAndResult.dll
Syntax
public class WorkPiece : EntityBase, INotifyPropertyChanged, ITrackable, ICanApplyID<WorkPiece>, IEquatable<WorkPiece>
Constructors
WorkPiece(String)
Initializes a new instance of the WorkPiece class and sets the ItemIdentifier.
Declaration
public WorkPiece(string itemIdentifier)
Parameters
Type | Name | Description |
---|---|---|
String | itemIdentifier | Serial number. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
Properties
Batch
Gets or sets the batch for the item. Can be null.
Declaration
public Batch Batch { get; set; }
Property Value
Type | Description |
---|---|
Batch |
BatchID
Gets the foreign key for Batch.
Declaration
[JsonIgnore]
[IgnoreMember]
public int? BatchID { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
ItemIdentifier
Gets the serial number.
Declaration
public string ItemIdentifier { get; }
Property Value
Type | Description |
---|---|
String |
MeasureCycles
Gets the measure cycles.
Declaration
public virtual ObservableCollection<MeasureCycle> MeasureCycles { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<MeasureCycle> |
Order
Gets or sets the batch for the item. Can be null.
Declaration
public Order Order { get; set; }
Property Value
Type | Description |
---|---|
Order |
OrderID
Gets the foreign key for Order.
Declaration
[JsonIgnore]
[IgnoreMember]
public int? OrderID { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Parameters
Gets the collection for additional parameters.
Declaration
public virtual EntityCollection<WorkPieceParameter> Parameters { get; }
Property Value
Type | Description |
---|---|
EntityCollection<WorkPieceParameter> |
Methods
ApplyID(WorkPiece)
Copies the ID from source
and those Parameters
to this ID and its Parameters.
Declaration
public void ApplyID(WorkPiece source)
Parameters
Type | Name | Description |
---|---|---|
WorkPiece | source | Source object. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when this doesn't equals with |
Equals(WorkPiece)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(WorkPiece other)
Parameters
Type | Name | Description |
---|---|---|
WorkPiece | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
Boolean | true if the current object is equal to the other parameter; otherwise, false. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that represents the current object. |