RecordGenerator icon indicating copy to clipboard operation
RecordGenerator copied to clipboard

C# immutable records generator

Results 28 RecordGenerator issues
Sort by recently updated
recently updated
newest added

https://github.com/dotnet/csharplang/issues/113#issuecomment-513532191 https://gitlab.com/dotnet-fun/dotnet-system-union https://github.com/Doraku/DefaultEcs/issues/57

Can we please have the ability to generate a single wither for all properties using optional parameters? ```csharp // The record class [Record] public sealed partial class SomeObject { public...

enhancement
API design

That'd require calling base class ctor with appropriate parameters. We'd need some stub method probably to get a hint what parameters to pass, like: ```cs private BaseClass BaseCtorCall() => new...

enhancement
API design

Some immutable objects need to be able to exclude certain properties from the "Withing" feature. Can there be an attribute added to a property that excludes it from the generation...

question

Sometimes we want to use a custom EqualityComparer for particular fields. ```csharp // Example class [Record] public sealed partial class SomeObject { public string Name { get; } [EqualityComparer(typeof(EnumerableComparer))] public...

enhancement

https://github.com/amis92/RecordGenerator/issues/102

This is often done for `Deconstruct` methods in BCL, because for the most time this method is only useful for the compiler to perform tuple deconstruction.

API design

Random thought: One of the things I think could help readability is refactoring GeneratedCodeAttributeGenerator to use SyntaxRewriter approach instead of the custom dictionary with delegates. _Originally posted by @amis92 in...

internal

Positional records have public "primary" constructor and the order of their properties matters. They support all features but are not extensible while keeping backwards compatibility. Nominal records have no accessible...

enhancement
API design