Class UnitScanningMessage
- Namespace
- Acuit.Pinpoint.Workstation.Messaging
- Assembly
- Acuit.Pinpoint.Workstation.Abstractions.dll
The message raised by the IMessenger service when a unit is being scanned.
public class UnitScanningMessage : WorkerStationEventMessage, IAsyncHandlingMessage, ICancelMessage
- Inheritance
-
UnitScanningMessage
- Implements
- Inherited Members
Remarks
A plug-in can use this message to prevent a unit to be inducted into the workstation by setting Cancel to true.
Constructors
UnitScanningMessage(IWorkerAtStation, string?, string?, CancellationToken)
Initializes a new instance of the UnitScanningMessage class.
public UnitScanningMessage(IWorkerAtStation workerAtStation, string? scannedSerialNumber, string? scannedModelNumber, CancellationToken cancellationToken)
Parameters
workerAtStationIWorkerAtStationThe IWorkerAtStation representing the worker at the station.
scannedSerialNumberstringThe scanned serial number, or null if a serial number was not scanned (e.g., when serial numbers are auto-generated).
scannedModelNumberstringThe scanned model number, or null if a model number was not scanned.
cancellationTokenCancellationTokenA token that can request cancellation of asynchronous handlers.
Exceptions
- ArgumentNullException
workerAtStationis null.
Properties
AsyncHandlers
Gets the AsyncHandlers instance to which asynchronous handlers can be added.
public AsyncHandlers AsyncHandlers { get; }
Property Value
Cancel
Gets or sets whether to cancel the unit scan.
public bool Cancel { get; set; }
Property Value
ScannedModelNumber
Gets the scanned model number, or null if a model number was not scanned. For preassembly stations, this will be the component model number.
public string? ScannedModelNumber { get; }
Property Value
ScannedSerialNumber
Gets the scanned serial number, or null if a serial number was not scanned (e.g., when serial numbers are auto-generated). For preassembly stations, this will be the component serial number.
public string? ScannedSerialNumber { get; }