DeviceStatistics.SetStatisticHandlers Method (POS for .NET v1.12 SDK Documentation)
2/27/2008
Sets the statistic handlers for an existing statistic.
Namespace: Microsoft.PointOfService.BaseServiceObjects
Assembly: Microsoft.PointOfService.ControlBase (in microsoft.pointofservice.controlbase.dll)
Syntax
'Declaration
Public Sub SetStatisticHandlers ( _
statisticName As String, _
getStatistic As GetStatistic, _
setStatistic As SetStatistic _
)
public void SetStatisticHandlers (
string statisticName,
GetStatistic getStatistic,
SetStatistic setStatistic
)
public:
void SetStatisticHandlers (
String^ statisticName,
GetStatistic^ getStatistic,
SetStatistic^ setStatistic
)
public void SetStatisticHandlers (
String statisticName,
GetStatistic getStatistic,
SetStatistic setStatistic
)
public function SetStatisticHandlers (
statisticName : String,
getStatistic : GetStatistic,
setStatistic : SetStatistic
)
Parameters
- statisticName
Name of (or constant that refers to) the related statistic to be retrieved or set.
- getStatistic
The handler to be called to get the statistic.
- setStatistic
The handler to be called to set the statistic.
Remarks
A getStatistic handler must be specified if an application needs to retrieve hardware-based statistics. The setStatistic handler can be null if the statistic does not support resetting its value to zero.
SetStatisticHandlers may throw a PosControlException with the following values:
Value |
Description |
Illegal |
One of the following conditions has occurred: The specified getStatistic was null; or The specified statisticName wasn’t found in the statistics file. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.
See Also
Reference
DeviceStatistics Class
DeviceStatistics Members
Microsoft.PointOfService.BaseServiceObjects Namespace