IStringParameter Interface#
Syntax#
C#
VB
The IStringParameter 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 | |
---|---|---|
GetMaxLength | Gets the maximum length of the string parameter. | |
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 IStringParameterExtensions.) | |
TrySetValue | Sets the provided value if the parameter is writable. (Defined by IStringParameterExtensions.) |
IStringParameter.GetMaxLength Method#
Gets the maximum length of the string parameter.
Syntax#
C#
VB
Return Value#
Type: Int32
Returns the maximum number of characters the string parameter supports.
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.
IStringParameter.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.
IStringParameter.SetValue Method#
Sets the provided value.
Syntax#
C#
VB
Parameters#
- value
- Type: System.String
The string to set.
Remarks#
Preconditions:
- The length of the string must be less than GetMaxLength().
- The parameter must be writable.
Error Safety: Can throw exceptions if writing the value fails or if the parameter is not writable.