private static string GetOrganizationAsJson(WebWindow window, string organizationId) { var orgPtr = GoFunctions.GetOrganizationAsJson(new GoString(organizationId)); var org = Marshal.PtrToStringAnsi(orgPtr); GoFunctions.FreeString(orgPtr); Console.WriteLine($"[C#] GetOrganizationAsJson {organizationId} -> {org}"); return(org); }
private static void GoLangDoThrow() { Console.WriteLine($"[C#] GoLangDoThrow"); var r = GoFunctions.DoThrow(); var error = Marshal.PtrToStringAnsi(r); GoFunctions.FreeString(r); throw JsonConvert.DeserializeObject <RemoteException>(error); }