IEnumParameter Interface#
Syntax#
C#
VB
The IEnumParameter type exposes the following members.
Properties#
Name | Description | |
---|---|---|
Advanced | The advanced parameter settings, if available. (Inherited from IParameter.) | |
FullName | The full name of the parameter including path information. (Inherited from IParameter.) | |
IsEmpty | Indicates if the parameter is empty. If true, the parameter is invalid or does not exist. If a requested parameter does not exist in a parameter collection, an empty parameter object will be returned to simplify handling. An empty parameter is never readable or writable. (Inherited from IParameter.) | |
IsReadable | Indicates if the parameter is readable. (Inherited from IParameter.) | |
IsWritable | Indicates if the parameter is writable. (Inherited from IParameter.) | |
Name | The name of the parameter without path information. (Inherited from IParameter.) |
Methods#
Name | Description | |
---|---|---|
CanSetValue | Indicates if the value passed can be set. | |
GetAdvancedValueProperties | Gets the interface that provides access to properties of an enum value. | |
GetAllValues | Gets a list of all values of the enumeration including the values that are currently not settable. | |
GetValue | Gets the current parameter value. | |
ParseAndSetValue | Parses the value as string and sets the value. (Inherited from IParameter.) | |
SetValue | Sets the provided value. | |
ToString | The parameter value as a string. (Inherited from IParameter.) |
Events#
Name | Description | |
---|---|---|
ParameterChanged | This event fires after any of the parameter properties (value, readability, writability, or advanced parameter settings) have changed. (Inherited from IParameter.) | |
ParameterValueChanged | This event fires after the parameter value has changed. (Inherited from IParameter.) |
Extension Methods#
Name | Description | |
---|---|---|
GetValueOrDefault | Gets the parameter value if the parameter is readable. Otherwise, returns the default value. (Defined by IEnumParameterExtensions.) | |
SetValue | Sets the first valid value from a list of values. (Defined by IEnumParameterExtensions.) | |
TrySetValue(IEnumerable(String)) | Overloaded. Sets the first valid value from a list of values if the parameter is writable. (Defined by IEnumParameterExtensions.) | |
TrySetValue(String) | Overloaded. Sets the value passed if the parameter is writable and the value is contained in the set of settable enumeration values. (Defined by IEnumParameterExtensions.) |
IEnumParameter.CanSetValue Method#
Indicates if the value passed can be set.
Syntax#
C#
VB
Parameters#
- value
- Type: System.String
The value to be checked.
Return Value#
Type: Boolean
Returns true if the value can be set, otherwise false.
Remarks#
Thread Safety: This method is synchronized with the source of the parameter collection, if any.
Error Safety: Does not throw exceptions.
IEnumParameter.GetAdvancedValueProperties Method#
Gets the interface that provides access to properties of an enum value.
Syntax#
C#
VB
Parameters#
- value
- Type: System.String
The value to look up.
Return Value#
Type: IAdvancedParameterAccess
Returns the interface that provides access to properties of an enum value.
Remarks#
Preconditions:
- The parameter must be readable.
- The value must be contained in the set of of all enumeration values.
Error Safety: Can throw exceptions if the parameter is not readable or if the value is not valid.
IEnumParameter.GetAllValues Method#
Gets a list of all values of the enumeration including the values that are currently not settable.
Syntax#
C#
VB
Return Value#
Type: IEnumerable(String)
Returns a list of all values of the enumeration including the values that are currently not settable.
Remarks#
To iterate over all settable values use foreach(String entry in IEnumParameter).
Thread Safety: This method is synchronized with the source of the parameter collection, if any.
Error Safety: Can throw exceptions.
IEnumParameter.GetValue Method#
Gets the current parameter value.
Syntax#
C#
VB
Return Value#
Type: String
Returns the current parameter value.
Remarks#
Preconditions: The parameter must be readable.
Thread Safety: This method is synchronized with the source of the parameter collection, if any.
Error Safety: Can throw exceptions if the parameter is not readable or if reading the value fails.
IEnumParameter.SetValue Method#
Sets the provided value.
Syntax#
C#
VB
Parameters#
- value
- Type: System.String
The value to set.
Remarks#
Preconditions:
- The parameter must be writable.
- The value must be contained in the set of settable enumeration values.
Error Safety: Can throw exceptions if the parameter is not writable, the value is not valid, or writing the value fails.