Updated for new C# SDK