Skip to content

IFloatParameter Interface#

Interface class for float parameters.

Syntax#

C#

public interface IFloatParameter : IParameter

VB

Public Interface IFloatParameter
    Inherits IParameter

The IFloatParameter 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 methodGetIncrement Gets the increment value of the current parameter. Returns null if the parameter does not have an increment.
Public methodGetMaximum Gets the maximum value of the current parameter.
Public methodGetMinimum Gets the minimum value of the current parameter.
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 IFloatParameterExtensions.)
Public Extension MethodGetValuePercentOfRange Returns the current value in percent of minimum/maximum range. (Defined by IFloatParameterExtensions.)
Public Extension MethodSetToMaximum Sets the parameter value to the maximum possible value. (Defined by IFloatParameterExtensions.)
Public Extension MethodSetToMinimum Sets the parameter value to the minimum possible value. (Defined by IFloatParameterExtensions.)
Public Extension MethodSetValue Sets the provided value. The value is automatically corrected if needed. (Defined by IFloatParameterExtensions.)
Public Extension MethodSetValuePercentOfRange Sets the provided value to a value within the range, using this formula (simplified): ((max - min) * (percentOfRange / 100.0)) + min. (Defined by IFloatParameterExtensions.)
Public Extension MethodTrySetToMaximum Sets the parameter value to the maximum possible value if the parameter is readable and writable. (Defined by IFloatParameterExtensions.)
Public Extension MethodTrySetToMinimum Sets the parameter value to the minimum possible value if the parameter is readable and writable. (Defined by IFloatParameterExtensions.)
Public Extension MethodTrySetValue(Double)Overloaded.
Sets the value passed if the parameter is writable. The value must be in the valid range and the increment must be correct. (Defined by IFloatParameterExtensions.)
Public Extension MethodTrySetValue(Double, FloatValueCorrection)Overloaded.
Sets the provided value if the parameter is writable and readable. The value is automatically corrected if needed. (Defined by IFloatParameterExtensions.)
Public Extension MethodTrySetValuePercentOfRange If the parameter is writable and readable, sets the value passed to a value within the range, using this formula (simplified): ((max - min) * (percentOfRange / 100.0)) + min (Defined by IFloatParameterExtensions.)
 

IFloatParameter.GetIncrement Method#

Gets the increment value of the current parameter. Returns null if the parameter does not have an increment.

Syntax#

C#

double? GetIncrement()

VB

Function GetIncrement As Double?

Return Value#

Type: Nullable(Double)
Returns the increment value of the current parameter. Returns null if the parameter does not have an increment.

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.

IFloatParameter.GetMaximum Method#

Gets the maximum value of the current parameter.

Syntax#

C#

double GetMaximum()

VB

Function GetMaximum As Double

Return Value#

Type: Double
Returns the maximum value of the current parameter.

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.

IFloatParameter.GetMinimum Method#

Gets the minimum value of the current parameter.

Syntax#

C#

double GetMinimum()

VB

Function GetMinimum As Double

Return Value#

Type: Double
Returns the minimum value of the current parameter.

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.

IFloatParameter.GetValue Method#

Gets the current parameter value.

Syntax#

C#

double GetValue()

VB

Function GetValue As Double

Return Value#

Type: Double
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.

IFloatParameter.SetValue Method#

Sets the provided value.

Syntax#

C#

void SetValue(
    double value
)

VB

Sub SetValue ( 
    value As Double
)

Parameters#

 

value
Type: System.Double
The value to set.

Remarks#

If the float parameter has an increment, the increment is automatically corrected.

Preconditions:
 

  • The parameter must be writable.
  • The value passed must be >= GetMinimum().
  • The value passed must be <= GetMaximum().
  Thread Safety: This method is synchronized with the source of the parameter collection, if any.

Error Safety: Can throw exceptions if writing the value fails, if the value is out of bounds, if the alignment is not correct, or if the parameter is not writable.