-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Documentation for records are working well, it's technically generate what the compiler service do.
But, some of generated stuffs are a bit redundant and reduce readability on records.
- The record should be displayed as record (output as class, that is technically not false but...)
- The type declaration have annoying assembly string representation ( instead of IEquatable):
Content
Namespace: MyNamespace
public class Content : System.IEquatable`1[[MyNamespace.Content, MyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]- On record, compiler generate GetHashCode, Equals, Clone (that's technically true, but redundant with "record").
Could we imagine adding some flags in command line to display records as record instead of class and omit all generated methods and interfaces (IEquatable in that case) ?
It could be something like "simplified-record", or have an option to skip all CompilerGenerated methods / interfaces ?
Ideally it should also work with record structs (not tested).
Thanks !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels