Mostly finished adapter to C#