CashDrawer Class
Definition
A cash drawer device in a retail scenario.
public ref class CashDrawer sealed
public ref class CashDrawer sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.Devices.PointOfService.ICashDrawerStatics, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CashDrawer final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Static(Windows.Devices.PointOfService.ICashDrawerStatics, 65536, "Windows.Foundation.UniversalApiContract")]
class CashDrawer final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Static(Windows.Devices.PointOfService.ICashDrawerStatics, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.Devices.PointOfService.ICashDrawerStatics2, 262144, "Windows.Foundation.UniversalApiContract")]
class CashDrawer final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.PointOfService.ICashDrawerStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CashDrawer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.PointOfService.ICashDrawerStatics), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class CashDrawer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.PointOfService.ICashDrawerStatics), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.PointOfService.ICashDrawerStatics2), 262144, "Windows.Foundation.UniversalApiContract")]
public sealed class CashDrawer : System.IDisposable
Public NotInheritable Class CashDrawer
Public NotInheritable Class CashDrawer
Implements IDisposable
- Inheritance
-
CashDrawer
- Attributes
- Implements
Windows 10 requirements
Device family |
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Remarks
To get a CashDrawer object, use the FromIdAsync or GetDefaultAsync static methods.
See the cash drawer sample for an example implementation.
Version history
Windows version | SDK version | Value added |
---|---|---|
1703 | 15063 | GetDeviceSelector(PosConnectionTypes) |
Properties
Capabilities |
The functionality of the cash drawer device as exposed by API. |
DeviceId |
The identifier string of the cash drawer device. |
DrawerEventSource |
Gets the CashDrawerEventSource to allow the app to detect the open/close state of the drawer. The actual current state is reported by IsDrawerOpen.. |
IsDrawerOpen |
Indicates whether the cash drawer is open. |
Status |
Get the current power and availability status of the cash drawer. |
Methods
CheckHealthAsync(UnifiedPosHealthCheckLevel) |
Gets the device's health state asynchronously. |
ClaimDrawerAsync() |
Attempts to get exclusive access on the cash drawer. |
Close() |
Close the cash drawer session. |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
FromIdAsync(String) |
Creates CashDrawer object from the DeviceInformation.Id. |
GetDefaultAsync() |
Gets the default paired or locally-connected cash drawer. |
GetDeviceSelector() |
Gets an Advanced Query Syntax (AQS) string that you can use to list the available cash drawers. |
GetDeviceSelector(PosConnectionTypes) |
Gets an Advanced Query Syntax (AQS) string that you can use to list the cash drawers available over the specified connection types |
GetStatisticsAsync(IEnumerable<String>) |
Retrieves the requested statistics from the cash drawer. |
Events
StatusUpdated |
Indicates there has been a change in the power availability status of the drawer. |