Table of Contents

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

Name string

The parameter's name. The port keeps it, so the handler's body reads as written.

LegacyType string

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.

RDFormsType string

The parameter's type in the RDForms handler, such as Integer or RDForms.DataObject.

ByRef bool

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.

UnwrapsValue bool

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.

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

bool

IsAdded

Whether the port adds the parameter to the legacy handler, which does not declare it.

public bool IsAdded { get; }

Property Value

bool

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

string

Name

The parameter's name. The port keeps it, so the handler's body reads as written.

public string Name { get; init; }

Property Value

string

RDFormsType

The parameter's type in the RDForms handler, such as Integer or RDForms.DataObject.

public string RDFormsType { get; init; }

Property Value

string

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; }

Property Value

bool