ICape ParameterValidate Method
Validates the current value of the parameter against the
specification of the parameter.
Definition
Namespace: CapeOpen
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
True if the parameter is valid, false if not valid.
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
C#
[DispIdAttribute(5)]
bool Validate(
ref string message
)VB
<DispIdAttribute(5)>
Function Validate (
ByRef message As String
) As BooleanParameters
- message String
- The message is used to return the reason that the parameter is invalid.
Return Value
BooleanTrue if the parameter is valid, false if not valid.
Remarks
This method checks the current value of the parameter to determine if it is an allowed value. In the case of
numeric parameters (ICapeRealParameterSpec and ICapeIntegerParameterSpec),
the value is valid if it is between the upper and lower bound. For String (ICapeOptionParameterSpec),
if the RestrictedToList property is true, the value must be included as one of the
members of the OptionList. Otherwise, any string value is valid. Any boolean value (true/false)
valid for the ICapeBooleanParameterSpec paramaters.
Exceptions
| ECapeUnknown | The error to be raised when other error(s), specified for this operation, are not suitable. |
| ECapeInvalidArgument | To be used when an invalid argument value is passed, for example, an unrecognised Compound identifier or UNDEFINED for the props argument. |