Capability Containers
Capabilities exist in many varieties but all have a Default Value, Current Value, and may have other values available that can be supported if selected. To help categorize the supported values, Saraff.Twain.NET defines four types of containers for capabilities.- Object
feeder could be of this type.
- Object[]
values. For example, a list of the names, such as the supported capabilities list returned by the
CAP_SUPPORTEDCAPS capability, would use this type of container.
- Twain32.Range
capability can specify the minimum and maximum acceptable values and the incremental step size between values. For example, resolution might be supported from 100 to 600 in steps of 50 (100, 150, 200, ..., 550, 600).
- Twain32.Enumeration
var _cap=this._twain32.GetCap(TwCap.Contrast); if(_cap is Twain32.Enumeration) { // TWON_ENUMERATION } elseif(_cap is Twain32.Range) { // TWON_RANGE } elseif(_cap isobject[]) { // TWON_ARRAY } else { // TWON_ONEVALUE }