replace AutomatedText.h/cpp with csharp equivalent