Class PropEnumeration
Enumeration properties represent a feature whose value is selected from a list of named entries.
Implements
Inherited Members
Namespace: ic4
Assembly: ic4dotnet.dll
Syntax
public class PropEnumeration : Property, IDisposable
Remarks
Common examples for an enumeration properties are PixelFormat
, TriggerMode
or ExposureAuto
.
The value of an enumeration property can be get or set by both a enumeration entry's name or value.
Enumeration entries are represented by PropEnumEntry objects; the possible entries are returned by Entries.
PropEnumeration instances are created in multiple ways:
- By directly querying a PropertyMap for a boolean property:
- By casting a Property object obtained from one of the functions returning generic property objects:
Properties
Entries
Enumerates the enumeration's list of entries.
Declaration
public IEnumerable<PropEnumEntry> Entries { get; }
Property Value
Type | Description |
---|---|
IEnumerable<PropEnumEntry> | An enumeration of PropEnumEntry objects representing the enumeration's entries. |
Exceptions
Type | Condition |
---|---|
IC4Exception | Check ErrorCode and ToString() for details. |
IntValue
The integer value of the currently selected entry of this enumeration property
Declaration
public long IntValue { get; set; }
Property Value
Type | Description |
---|---|
long | The integer value of the currently selected entry of this enumeration property |
SelectedEntry
The currently selected entry of this enumeration property
Declaration
public PropEnumEntry SelectedEntry { get; set; }
Property Value
Type | Description |
---|---|
PropEnumEntry | The currently selected entry of this enumeration property |
Exceptions
Type | Condition |
---|---|
IC4Exception | Check ErrorCode and ToString() for details. |
Value
The name of the currently selected entry of this enumeration property
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the currently selected entry of this enumeration property |
Exceptions
Type | Condition |
---|---|
IC4Exception | Check ErrorCode and ToString() for details. |
Methods
FindEntry(long)
Finds the enumeration entry with a specified value.
Declaration
public PropEnumEntry FindEntry(long value)
Parameters
Type | Name | Description |
---|---|---|
long | value | The value of the enumeration entry to find |
Returns
Type | Description |
---|---|
PropEnumEntry | The PropEnumEntry with the specified value |
Exceptions
Type | Condition |
---|---|
IC4Exception | Check ErrorCode and ToString() for details. |
FindEntry(string)
Finds the enumeration entry with a specified name.
Declaration
public PropEnumEntry FindEntry(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the enumeration entry to find |
Returns
Type | Description |
---|---|
PropEnumEntry | The PropEnumEntry with the specified name |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
IC4Exception | Check ErrorCode and ToString() for details. |