Share via


ClaimedCashDrawer Class

Definition

Provides access to exclusive and privileged methods, properties, and events on a point-of-service cash drawer device.

public ref class ClaimedCashDrawer sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ClaimedCashDrawer final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ClaimedCashDrawer final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ClaimedCashDrawer : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ClaimedCashDrawer : System.IDisposable
Public NotInheritable Class ClaimedCashDrawer
Implements IDisposable
Inheritance
Object Platform::Object IInspectable ClaimedCashDrawer
Attributes
Implements

Windows 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

The user gets an instance of ClaimedCashDrawer from the CashDrawer.ClaimDrawerAsync method. Claim is cooperatively managed, so multiple concurrent apps can negotiate which app owns claim.

Version history

Windows version SDK version Value added
1809 17763 Closed

Properties

CloseAlarm

Gets the close alarm for this cash drawer. This is only valid if IsDrawerOpenSensorAvailable is true.

DeviceId

The identifier string of the claimed cash drawer device.

IsDrawerOpen

Indicates whether the cash drawer is open.

IsEnabled

Indicates whether the cash drawer is operational and can be used.

Methods

Close()

Disposes the claimed cash drawer, releases claim on the device, and disables the device the same way as calling DisableAsync.

DisableAsync()

Notifies the underlying hardware to power off.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

EnableAsync()

Asynchronously notifies the underlying hardware to power on for use.

OpenDrawerAsync()

Opens the cash drawer.

ResetStatisticsAsync(IIterable<String>)

Resets the specified device statistics to their defaults.

RetainDeviceAsync()

Retain the current claim on the cash drawer. This is usually called in response to a ReleaseDeviceRequested event notification.

UpdateStatisticsAsync(IIterable<KeyValuePair<String,String>>)

Updates device statistics values using the provided key/value pair.

Events

Closed

Event that is raised when the ClaimedCashDrawer is closed.

ReleaseDeviceRequested

Occurs when the device gets a request to release its exclusive claim.

There is a small window of time (2 seconds) where the app may call RetainDeviceAsync to keep exclusive claim. Or alternatively, the app may release claim via Close to end the window immediately.

Applies to

See also