C# basically working, including use of AbstractState

Signed-off-by: Ian bell <ian.h.bell@gmail.com>