Class EventPort
- Namespace
- RDCore.Forms.Porting
- Assembly
- RDCore.Forms.dll
How a legacy event handler ports to RDForms: the event's RDForms name and the handler's RDForms parameters.
public sealed record EventPort : IEquatable<EventPort>
- Inheritance
-
EventPort
- Implements
- Inherited Members
Constructors
EventPort(string, string, string, IReadOnlyList<ParameterPort>, bool, PortDiagnostic?)
How a legacy event handler ports to RDForms: the event's RDForms name and the handler's RDForms parameters.
public EventPort(string LegacyClass, string LegacyName, string RDFormsName, IReadOnlyList<ParameterPort> Parameters, bool CoordinatesInLegacyUnit, PortDiagnostic? Note)
Parameters
LegacyClassstringThe legacy class that raises the event, without the library, such as
TextBox. An event every control raises with the same parameters is on ExtenderClass.LegacyNamestringThe event's legacy name, such as
Exit.RDFormsNamestringThe RDForms event the handler is renamed to, such as
Validate. It isLegacyNamefor an event that keeps its name.ParametersIReadOnlyList<ParameterPort>The handler's parameters, in order, each with its legacy and its RDForms declaration. A parameter the legacy handler does not declare (IsAdded) follows the ones it does.
CoordinatesInLegacyUnitboolWhether the event's
XandYare in the legacy unit: LegacyUnit for MSForms, the container's scale for VB6. RDForms raises them in twips, and a form's own in its scale. Where the legacy code expects another unit, as MSForms code expects points, the code port gives the handler two first lines that convert them, and its body runs as written.NotePortDiagnosticWhat the code port reports at each handler it ports, where RDForms raises the event differently, or null.
Properties
CoordinatesInLegacyUnit
Whether the event's X and Y are in the legacy unit: LegacyUnit for MSForms, the
container's scale for VB6. RDForms raises them in twips, and a form's own in its scale. Where the legacy code expects another
unit, as MSForms code expects points, the code port gives the handler two first lines that convert them, and its body runs as
written.
public bool CoordinatesInLegacyUnit { get; init; }
Property Value
IsRenamed
Whether the event's RDForms name differs from its legacy name, compared without regard to case.
public bool IsRenamed { get; }
Property Value
LegacyClass
The legacy class that raises the event, without the library, such as TextBox. An event every control raises with the
same parameters is on ExtenderClass.
public string LegacyClass { get; init; }
Property Value
LegacyName
The event's legacy name, such as Exit.
public string LegacyName { get; init; }
Property Value
Note
What the code port reports at each handler it ports, where RDForms raises the event differently, or null.
public PortDiagnostic? Note { get; init; }
Property Value
Parameters
The handler's parameters, in order, each with its legacy and its RDForms declaration. A parameter the legacy handler does not declare (IsAdded) follows the ones it does.
public IReadOnlyList<ParameterPort> Parameters { get; init; }
Property Value
RDFormsName
The RDForms event the handler is renamed to, such as Validate. It is LegacyName for an event that keeps its name.
public string RDFormsName { get; init; }