This PR mainly focuses on code style refactorings. The following were done:
Fold functions with only one statement or expression into one-line
Fold statements and expressions with empty blocks into one-line
Trailing commas were removed (e.g. in enums)
Use pattern matching wherever possible
Braces were removed in blocks that only had one expression (which was put on a new line if not already)
The "this" reference has been removed in places where it wasn't needed
The "var" type inference for variables was used in more places were adequate (e.g. it didn't require casting)
Fields and functions were reordered when needed, so that private ones are always after public ones
In adequate places, fields were made public and/or into properties (to better indicate that there's an API)
Some function arguments were renamed if they were pointlessly too long
Ternary operators were used wherever possible
String interpolation was used instead of string concatenation wherever possible
Fields were renamed if they didn't respect the naming conventions
Fields were made into auto properties wherever possible
Protected fields were made private wherever possible
Useless enum values were removed
More specific code style refactorings were also done:
In MasterBootBlock:
The diskDevice field was made readonly
The Partitions field was made into a property
The data field was made private, and the masterboot field was renamed to DataBlock (and made a property)
In IOPort, the Address property was made get-only (previously it had both get and private set accesors) since it was useless (it was only set from the constructor which doesn't require the set accessor)
In BaseService, the SERVICE generic type in the MatchEvent function was renamed to TService to fit naming conventions
In ServiceManager, the Services and Events fields were made public (and properties), while the lockServices and lockEvents ones were made private
This PR mainly focuses on code style refactorings. The following were done:
More specific code style refactorings were also done: