Skip to content

IStringParameter Interface#

Interface class for string parameters.

Syntax#

C#

public interface IStringParameter : IParameter

VB

Public Interface IStringParameter
    Inherits IParameter

The IStringParameter 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 methodGetMaxLength Gets the maximum length of the string 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 IStringParameterExtensions.)
Public Extension MethodTrySetValue 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#

int GetMaxLength()

VB

Function GetMaxLength As Integer

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#

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.

IStringParameter.SetValue Method#

Sets the provided value.

Syntax#

C#

void SetValue(
    string value
)

VB

Sub SetValue ( 
    value As String
)

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.
  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 or if the parameter is not writable.