pierre3 / PlantUmlClassDiagramGenerator

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

add option to ignore empty modifier #65

Closed CrazyToken closed 1 year ago

CrazyToken commented 1 year ago

Hi pierre3, thanks for providing this amazing library. I need some additions, one of it is this pull request, which provides the ability to ignore Properties without accessibility modifier. I actually planned to implement it within the existing -ignore attribute, but discarded it. For some examples see the included unit test. I plan in some additional pull requests:

Best wishes Maik

CrazyToken commented 1 year ago

Hi @pierre3, any feedback for this PR? Would you mind merging it? Greetings Maik

CrazyToken commented 1 year ago

Hi @pierre3, added another commit which gives the opportunity to exclude the @startuml and @enduml tags from the exported puml files. This is usefull if you want to merge a sub-collection of classes into one diagramm. Asciidoc otherwise truncates the diagramm convertion at the first @enduml of the first file. Please Review, merge and create a new version :-) Greetings Maik

pierre3 commented 1 year ago

Hi @CrazyToken

I apologize for the delay in confirmation. Thank you for the pull request! I didn't consider the behavior when access modifiers were omitted. I'm thinking of treating it the same as "private" in accordance with the C# specification, what do you think? (If you want to ignore members with omitted access modifiers, you can specify "private".)

csharp

class A
{
    public int A { get; }
    int B { get; }
    public void MethodA() {  }
    void MethodB() { }
}

PlantUml

class A{
    + A : int <<get>>
    - B : int <<get>>
    + MethodA() : void
    - MethodB() : void
}
CrazyToken commented 1 year ago

Hi @pierre3, great Idea, as this prevents the project from having one more config option and thus more complexity. Currently I do not have the time to make the changes by myself. Maybe someone else is also interested in this Topic. Best wishes Maik

pierre3 commented 1 year ago

I have merged the following commit: "exclude the @startuml and @enduml tags" 6f7677c5457d6a3944c0dfc2c10ae7bdc85349c4 , 0167511b1768deea60ef2f910f3ffd703fc4883e

pierre3 commented 1 year ago

@CrazyToken, I have released version 1.3.2, and I would like to express my gratitude for your contribution.