SirCmpwn/Tomato — pull request #45 by dbent (2014-05-26 18:42:35+00:00)
Title: Move Hardware Devices to Separate Assembly

Hi, these are some changes I made a long while ago to the Tomato solution so that I could use Tomato in my [mod](https://github.com/dbent/Ketchup) for Kerbal Space Program. I'm slowly starting to work on it again so I figured I'd get these changes merged upstream.

The reason for these changes is because KSP loads assemblies in a restricted environment, which broke using Tomato in two ways:

1. The `System.IO` namespace used to be blacklisted, so attempting to load the font data from the assembly resource would fail. This blacklist was eventually lifted but the second problem is probably still an issue.
2. Unsafe assemblies cannot be loaded.

The only reason the Tomato assembly was trying to perform unsafe operations was for UI drawing. So my solution was simply to move all the device implementations into another assembly `Tomato.Hardware`, which is marked unsafe, and making the core `Tomato` assembly, safe. This allows the emulator core to be used quite easily.