You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current UnitsNet source code is a bit of a mess due to supporting Windows Runtime Component (WinRTC) and adapting to all the constraints WinRTC imposes on the public API types and method signatures. This results in MANY #if WINDOWS_UWP directives that clutters the code.
Move WinRTC project to /UnitsNet.WindowsRuntimeComponent folder
Generate WinRTC source code separately in new folder
Remove #if directives from generated code of each set so it only has the code it needs
Add linked files (not copies) of /UnitsNet source code that is fully compatible with both, with same folder structure
Update build scripts with new paths
Bonus: Copy/add some test cases specific to WinRTC, we currently have zero test coverage on it
I would rank this as medium difficulty, it definitely involves some mucking around with the source code, the code generator scripts and the build scripts. I'm happy to assist if anyone wants to take this on though!
The text was updated successfully, but these errors were encountered:
In #520 we made an effort to simplify the generated code for WRC and NetFramework. It's still the same scripts, which makes sense since the output is so similar and it would require more effort to keep two sets of scripts in sync, but at least now there is generated separate sets of source code for WRC and NetFramework so we don't have all the #if WINDOWS_UWP sections in the code. That complexity is now contained in the generator scripts.
The current UnitsNet source code is a bit of a mess due to supporting Windows Runtime Component (WinRTC) and adapting to all the constraints WinRTC imposes on the public API types and method signatures. This results in MANY
#if WINDOWS_UWP
directives that clutters the code.Short story; WinRTC allows .NET code and nugets to be consumed by JavaScript and C++ Windows UWP apps, by sticking to some strict constraints on the public API. Read more on Windows Runtime Component and its constraints.
I propose:
/UnitsNet.WindowsRuntimeComponent
folder#if
directives from generated code of each set so it only has the code it needs/UnitsNet
source code that is fully compatible with both, with same folder structureI would rank this as medium difficulty, it definitely involves some mucking around with the source code, the code generator scripts and the build scripts. I'm happy to assist if anyone wants to take this on though!
The text was updated successfully, but these errors were encountered: