-
Notifications
You must be signed in to change notification settings - Fork 284
Labels
Area: MTPBelongs to the Microsoft.Testing.Platform core libraryBelongs to the Microsoft.Testing.Platform core libraryBreaking ‼️
Milestone
Description
I don't think it was a good idea to use records in MTP's public APIs.
Take for example:
public sealed record TestMethodIdentifierProperty(string AssemblyFullName, string Namespace, string TypeName, string MethodName, string[] ParameterTypeFullNames, string ReturnTypeFullName)
Downsides:
-
Constructor signature uses PascalCase for parameter names.
-
Compiler synthesized methods are centralized about the primary constructor.
PrintMembers
uses parameters of the primary constructor- Clone constructor copies parameters of the primary constructor
Deconstruct
method deconstructs parameters of the primary constructor (with names again being PascalCase)- Equality implementation as well.
Consider a case where we want to add a new constructor, while keeping the old one for backward compatibility, it becomes more challenging to do.
nohwnd
Metadata
Metadata
Assignees
Labels
Area: MTPBelongs to the Microsoft.Testing.Platform core libraryBelongs to the Microsoft.Testing.Platform core libraryBreaking ‼️