Table of Contents

Class PortDiagnostic

Namespace
RDCore.Forms.Porting
Assembly
RDCore.Forms.dll

What the code port reports at a site of the ported code: a site it cannot rewrite, or a rewrite its author should know about.

public sealed record PortDiagnostic : IEquatable<PortDiagnostic>
Inheritance
PortDiagnostic
Implements
Inherited Members

Remarks

Its Message is read in the current UI culture each time, English or French. Two diagnostics are equal when they are of the same kind with the same arguments.

Properties

Arguments

The values the message names, as VBA source writes them, in the order of its placeholders.

public IReadOnlyList<string> Arguments { get; }

Property Value

IReadOnlyList<string>

Code

The diagnostic's code, such as RDC40001.

public string Code { get; }

Property Value

string

Kind

What is reported.

public PortDiagnosticKind Kind { get; }

Property Value

PortDiagnosticKind

Message

The message, in the current UI culture.

public string Message { get; }

Property Value

string

Severity

How much the reported thing costs the port.

public PortDiagnosticSeverity Severity { get; }

Property Value

PortDiagnosticSeverity

Methods

AcceleratorAssignment()

An assignment to Accelerator: AcceleratorAssignment.

public static PortDiagnostic AcceleratorAssignment()

Returns

PortDiagnostic

The diagnostic.

CodeOf(PortDiagnosticKind)

The code of a kind of diagnostic.

public static string CodeOf(PortDiagnosticKind kind)

Parameters

kind PortDiagnosticKind

The kind of diagnostic.

Returns

string

Its code, such as RDC40001.

ComputedProgId()

A ProgID that is not a literal: ComputedProgId.

public static PortDiagnostic ComputedProgId()

Returns

PortDiagnostic

The diagnostic.

CoordinatesConverted(string)

A handler whose X and Y are converted back to the legacy unit: CoordinatesConverted.

public static PortDiagnostic CoordinatesConverted(string function)

Parameters

function string

The RDForms.Units function the lines call, such as ToPoints.

Returns

PortDiagnostic

The diagnostic.

Equals(PortDiagnostic?)

Whether another diagnostic is of the same kind, with the same arguments.

public bool Equals(PortDiagnostic? other)

Parameters

other PortDiagnostic

The other diagnostic.

Returns

bool

true when the two are equal.

ExitPortedToValidate()

An Exit handler ported to Validate: ExitPortedToValidate.

public static PortDiagnostic ExitPortedToValidate()

Returns

PortDiagnostic

The diagnostic.

ExpressionNotConvertible(string, string)

A value given by an expression the code port cannot convert: ExpressionNotConvertible.

public static PortDiagnostic ExpressionNotConvertible(string legacyMember, string rdformsMember)

Parameters

legacyMember string

The legacy member the value is for, such as TextAlign.

rdformsMember string

The RDForms member it ports to, such as Alignment.

Returns

PortDiagnostic

The diagnostic.

FindWindowThunderDFrame(string)

A FindWindow call looking for a UserForm's window: FindWindowThunderDFrame.

public static PortDiagnostic FindWindowThunderDFrame(string function)

Parameters

function string

The name the code calls the declared function by, such as FindWindow or FindWindowA.

Returns

PortDiagnostic

The diagnostic.

GetHashCode()

A hash of the kind and the arguments.

public override int GetHashCode()

Returns

int

The hash.

LateBoundMember(string)

A late-bound call to a member the port changes: LateBoundMember.

public static PortDiagnostic LateBoundMember(string legacyMember)

Parameters

legacyMember string

The legacy member the call names.

Returns

PortDiagnostic

The diagnostic.

MessageIn(CultureInfo)

The message in a given culture: French for a French culture, English for any other.

public string MessageIn(CultureInfo culture)

Parameters

culture CultureInfo

The culture to read the message in.

Returns

string

The message.

ScrollBarReference()

A ScrollBar reference typed RDForms.Control: ScrollBarReference.

public static PortDiagnostic ScrollBarReference()

Returns

PortDiagnostic

The diagnostic.

ScrollBarTypeNameChanged(string)

A type comparison on a ported ScrollBar: ScrollBarTypeNameChanged.

public static PortDiagnostic ScrollBarTypeNameChanged(string rdFormsName)

Parameters

rdFormsName string

The control's RDForms class, such as RDForms.HScrollBar.

Returns

PortDiagnostic

The diagnostic.

SeverityOf(PortDiagnosticKind)

The severity of a kind of diagnostic.

public static PortDiagnosticSeverity SeverityOf(PortDiagnosticKind kind)

Parameters

kind PortDiagnosticKind

The kind of diagnostic.

Returns

PortDiagnosticSeverity

Its severity.

ToString()

The code and the message, in the current UI culture.

public override string ToString()

Returns

string

The diagnostic as text.

UnitWrapped(string)

An expression wrapped to keep its legacy unit: UnitWrapped.

public static PortDiagnostic UnitWrapped(string function)

Parameters

function string

The RDForms.Units function it is wrapped in, such as FromTwips.

Returns

PortDiagnostic

The diagnostic.

UnknownProgId(string)

A literal ProgID the port map has no class for: UnknownProgId.

public static PortDiagnostic UnknownProgId(string progId)

Parameters

progId string

The ProgID.

Returns

PortDiagnostic

The diagnostic.

UnresolvedDataSource(string)

A data source string nothing resolves: UnresolvedDataSource.

public static PortDiagnostic UnresolvedDataSource(string source)

Parameters

source string

The ControlSource or RowSource string.

Returns

PortDiagnostic

The diagnostic.

ValueNotConvertible(object?)

A legacy value with no RDForms value: ValueNotConvertible.

public static PortDiagnostic ValueNotConvertible(object? legacy)

Parameters

legacy object

The legacy value.

Returns

PortDiagnostic

The diagnostic.