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
Code
The diagnostic's code, such as RDC40001.
public string Code { get; }
Property Value
Kind
What is reported.
public PortDiagnosticKind Kind { get; }
Property Value
Message
The message, in the current UI culture.
public string Message { get; }
Property Value
Severity
How much the reported thing costs the port.
public PortDiagnosticSeverity Severity { get; }
Property Value
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
kindPortDiagnosticKindThe 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
functionstringThe
RDForms.Unitsfunction the lines call, such asToPoints.
Returns
- PortDiagnostic
The diagnostic.
Equals(PortDiagnostic?)
Whether another diagnostic is of the same kind, with the same arguments.
public bool Equals(PortDiagnostic? other)
Parameters
otherPortDiagnosticThe other diagnostic.
Returns
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
legacyMemberstringThe legacy member the value is for, such as
TextAlign.rdformsMemberstringThe 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
functionstringThe name the code calls the declared function by, such as
FindWindoworFindWindowA.
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
legacyMemberstringThe 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
cultureCultureInfoThe 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
rdFormsNamestringThe 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
kindPortDiagnosticKindThe 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
functionstringThe
RDForms.Unitsfunction it is wrapped in, such asFromTwips.
Returns
- PortDiagnostic
The diagnostic.
UnknownProgId(string)
A literal ProgID the port map has no class for: UnknownProgId.
public static PortDiagnostic UnknownProgId(string progId)
Parameters
progIdstringThe ProgID.
Returns
- PortDiagnostic
The diagnostic.
UnresolvedDataSource(string)
A data source string nothing resolves: UnresolvedDataSource.
public static PortDiagnostic UnresolvedDataSource(string source)
Parameters
sourcestringThe
ControlSourceorRowSourcestring.
Returns
- PortDiagnostic
The diagnostic.
ValueNotConvertible(object?)
A legacy value with no RDForms value: ValueNotConvertible.
public static PortDiagnostic ValueNotConvertible(object? legacy)
Parameters
legacyobjectThe legacy value.
Returns
- PortDiagnostic
The diagnostic.