Class ParameterPort
- Namespace
- RDCore.Forms.Porting
- Assembly
- RDCore.Forms.dll
One parameter of a ported event handler: its legacy declaration and its RDForms declaration.
public sealed record ParameterPort : IEquatable<ParameterPort>
- Inheritance
-
ParameterPort
- Implements
- Inherited Members
Constructors
ParameterPort(string, string?, string, bool, bool)
One parameter of a ported event handler: its legacy declaration and its RDForms declaration.
public ParameterPort(string Name, string? LegacyType, string RDFormsType, bool ByRef, bool UnwrapsValue)
Parameters
NamestringThe parameter's name. The port keeps it, so the handler's body reads as written.
LegacyTypestringThe parameter's type as the legacy library declares it, such as
MSForms.ReturnInteger; null for a parameter the legacy handler does not declare, which the port adds to it, as it addsCancelto a VB6DblClickhandler.RDFormsTypestringThe parameter's type in the RDForms handler, such as
IntegerorRDForms.DataObject.ByRefboolWhether the RDForms handler declares the parameter ByRef. RDForms passes every event argument ByRef, so a handler that assigns it gives the value back to the event's source.
UnwrapsValueboolWhether the legacy parameter wraps its value in an object, as MSForms'
ReturnIntegerdoes, so that the code port rewritesx.Valueon it tox.
Properties
ByRef
Whether the RDForms handler declares the parameter ByRef. RDForms passes every event argument ByRef, so a handler that assigns it gives the value back to the event's source.
public bool ByRef { get; init; }
Property Value
IsAdded
Whether the port adds the parameter to the legacy handler, which does not declare it.
public bool IsAdded { get; }
Property Value
LegacyType
The parameter's type as the legacy library declares it, such as MSForms.ReturnInteger; null for a
parameter the legacy handler does not declare, which the port adds to it, as it adds Cancel to a VB6 DblClick handler.
public string? LegacyType { get; init; }
Property Value
Name
The parameter's name. The port keeps it, so the handler's body reads as written.
public string Name { get; init; }
Property Value
RDFormsType
The parameter's type in the RDForms handler, such as Integer or RDForms.DataObject.
public string RDFormsType { get; init; }
Property Value
UnwrapsValue
Whether the legacy parameter wraps its value in an object, as MSForms' ReturnInteger does, so that the code port
rewrites x.Value on it to x.
public bool UnwrapsValue { get; init; }