Skip to content

IEnumParameter Interface#

Interface class for enumeration parameters. An enumeration parameter is enumerable. The enumerator lists all currently settable values.

Syntax#

C#

public interface IEnumParameter : IParameter, 
    IEnumerable<string>

VB

Public Interface IEnumParameter
    Inherits IParameter, IEnumerable(Of String)

The IEnumParameter type exposes the following members.

Properties#

NameDescription
Public propertyAdvanced The advanced parameter settings, if available. (Inherited from IParameter.)
Public propertyFullName The full name of the parameter including path information. (Inherited from IParameter.)
Public propertyIsEmpty 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.)
Public propertyIsReadable Indicates if the parameter is readable. (Inherited from IParameter.)
Public propertyIsWritable Indicates if the parameter is writable. (Inherited from IParameter.)
Public propertyName The name of the parameter without path information. (Inherited from IParameter.)
 

Methods#

NameDescription
Public methodCanSetValue Indicates if the value passed can be set.
Public methodGetAdvancedValueProperties Gets the interface that provides access to properties of an enum value.
Public methodGetAllValues Gets a list of all values of the enumeration including the values that are currently not settable.
Public methodGetValue Gets the current parameter value.
Public methodParseAndSetValue Parses the value as string and sets the value. (Inherited from IParameter.)
Public methodSetValue Sets the provided value.
Public methodToString The parameter value as a string. (Inherited from IParameter.)
 

Events#

NameDescription
Public eventParameterChanged This event fires after any of the parameter properties (value, readability, writability, or advanced parameter settings) have changed. (Inherited from IParameter.)
Public eventParameterValueChanged This event fires after the parameter value has changed. (Inherited from IParameter.)
 

Extension Methods#

NameDescription
Public Extension MethodGetValueOrDefault Gets the parameter value if the parameter is readable. Otherwise, returns the default value. (Defined by IEnumParameterExtensions.)
Public Extension MethodSetValue Sets the first valid value from a list of values. (Defined by IEnumParameterExtensions.)
Public Extension MethodTrySetValue(IEnumerable(String))Overloaded.
Sets the first valid value from a list of values if the parameter is writable. (Defined by IEnumParameterExtensions.)
Public Extension MethodTrySetValue(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#

bool CanSetValue(
    string value
)

VB

Function CanSetValue ( 
    value As String
) As Boolean

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#

IAdvancedParameterAccess GetAdvancedValueProperties(
    string value
)

VB

Function GetAdvancedValueProperties ( 
    value As String
) As IAdvancedParameterAccess

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:
 

  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 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#

IEnumerable<string> GetAllValues()

VB

Function GetAllValues As IEnumerable(Of String)

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#

string GetValue()

VB

Function GetValue As String

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#

void SetValue(
    string value
)

VB

Sub SetValue ( 
    value As String
)

Parameters#

 

value
Type: System.String
The value to set.

Remarks#

Preconditions:
 

  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 writable, the value is not valid, or writing the value fails.