ITMSMCPOptionalAttribute Interface
Marks a parameter as optional and carries the value used when the caller omits it.
API unit family: TMS.MCP.Attributes
Extends: ITMSMCPCustomAttribute
Syntax
ITMSMCPOptionalAttribute = interface(ITMSMCPCustomAttribute)
Remarks
A parameter is published as required unless this attribute is applied. Delphi default parameter values are not exposed through RTTI, so the fallback value has to be repeated in the attribute: [TTMSMCPOptionalAttribute(100)] on a parameter declared as ACount: Integer = 100. When the caller omits the argument the value stored here is passed to the method instead.
Properties
| Name | Description |
|---|---|
| Value | Value passed to the method when the caller omits the argument. |
Methods
| Name | Description |
|---|---|
| GetValue | Returns the value passed to the method when the caller omits the argument. |