![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQAu9lwMvTuGrtRyWceRz8KWgO24JfZ2_Jxy8JIgahYubpZFyvx6MmFG6yEGeIZtGdeXJi6YxBGj2dAUA0olv4iLVBDMtyrWm0nWlx3Aqc3QrCKcGYzqio65lwS6iR_hQb0RVSclp-GuJd/s1600/WindowsUniversal.png)
Some of the changes to the engine could be done without breaking anything, though some required introducing more preprocessor soup (#if #else #endif) due to breaking framework changes. Ideally once dotnet core matures then we can move towards NETStandard libraries for all platforms.
- UWP forces all file IO to be asynchronous, so the simplest solution was to use a synchronous wrapper specifically for the WindowsUniversal libraries.
- Minor API changes were needed (e.g. replacing Delegate.CreateDelegate with MethodInfo.CreateDelegate, generic use of SystemException with System.Exception).
- Replace all Stream.Close() with Stream.Dispose() where a using block is not used for automatic cleanup.
- Remove all errant use of System.Console.Write() for debugging.
- Identifying the main UI thread using Task.CurrentId instead of Thread.CurrentThread.ManagedThreadId (access to threads is not exposed in UWP).
- Inserting GetTypeInfo() into various reflection method calls and properties due to a very UWP specific workaround.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiniuchOqlc-pRSHMES8BofhNez1rOR-dRT5MgiJY6o0XoGyVMpuG5u_cofsZphKwAKlCzGElh8DHBg_uDEWeHw9iKXamVECIWDty3dpqem6x_73Ue78TakJiBkv79Bw5uqAwW-r2ePLXDi/s320/XAGEOne.jpg)
Not everything is quite implemented yet (serialization, audio etc) but I'll return to finish this up once the main refactoring is complete.