bagetter / BaGetter

A lightweight NuGet and symbol server
https://www.bagetter.com
MIT License
243 stars 53 forks source link

Fix Todo comment (derived classes in registration) #64

Closed FroggieFrog closed 7 months ago

FroggieFrog commented 7 months ago

This PR fixes a TODO comment. As mentioned all classes (in registration) do derive now from the base classes. The tests were adjusted accordingly.

The [JsonPropertyOrder(int.MaxValue)] is necessary, because otherwise the properties of the base class are serialized last and too many tests had to be adjusted.

FroggieFrog commented 7 months ago

Why JsonPropertyOrder was added in the first place is explained in the first post. Why I used int.MaxValue is just for easier additions/modifications in the future. At the moment there is no dependency on the correct order of the modified/added properties. So in the future it is easier to add new properties at the end of the class and you don't have to check for the correct new value.