TechPenguineer / Hypermc

Install Minecraft extensions with a user-friendly interface ⛏💎
Creative Commons Zero v1.0 Universal
25 stars 8 forks source link

Possible misuse of init-only properties #17

Closed AndrewToaster closed 3 years ago

AndrewToaster commented 3 years ago

From my review I think that the init-only properties should be replaced with read-only or read-write properties

Specifically:

Mod.cs

public string Name { get; init; }

As there is no constructor i think this property could become

public string Name { get; set; }

ModDownloadEventArgs.cs

public Mod Mod { get; init; }

Due to the constructor and the 'EventArgs' suffix I think this could be a read-only property

public Mod Mod { get; }
TechPenguineer commented 3 years ago

Thank you for the feedback! I will get a developer on it right away!

FaisalAbusharar commented 3 years ago

If you want, please contribute and i will put your updated code into a new branch for further testing