pierre3 / PlantUmlClassDiagramGenerator

This is a generator to create a class-diagram of PlantUML from the C# source code.
MIT License
680 stars 132 forks source link

[Feature Request] Support for record types #42

Closed haakobja closed 10 months ago

haakobja commented 3 years ago

Hi, I recently tried to incorporate this dotnet tool in my project where I use and target dotnet 5. It seems like the tool doesn't handle records correctly. Whenever I use a record in my source, the output results in an invalid plantuml file.

Consider the following. I've got the following record

    public record ExampleRecord {
      public int AnInt { get; }
      public string AStringValue { get; }
    }

When I pass this through the generator, I get the following PlantUml spec:

+ AnInt : int <<get>>
+ AStringValue : string <<get>>

I would expect record to be handled the same way as classes, at least in the beginning. And by the way the following record notation doesn't output anything at all, which is expected as it's a new notation type that is record specific.

public record ExampleRecord (int AnInt, string AStringValue);
DrPepperBianco commented 3 years ago

I added support for records and created a pull request.

PendingChanges commented 11 months ago

Can be closed as records are now supported