Table of Contents

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

workerAtStation IWorkerAtStation

The IWorkerAtStation representing the worker at the station.

scannedSerialNumber string

The scanned serial number, or null if a serial number was not scanned (e.g., when serial numbers are auto-generated).

scannedModelNumber string

The scanned model number, or null if a model number was not scanned.

cancellationToken CancellationToken

A token that can request cancellation of asynchronous handlers.

Exceptions

ArgumentNullException

workerAtStation is null.

Properties

AsyncHandlers

Gets the AsyncHandlers instance to which asynchronous handlers can be added.

public AsyncHandlers AsyncHandlers { get; }

Property Value

AsyncHandlers

Cancel

Gets or sets whether to cancel the unit scan.

public bool Cancel { get; set; }

Property Value

bool

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

string

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; }

Property Value

string