public Task <string> GetTextAsync() { var outPtr = _native.GetText(); var text = Marshal.PtrToStringAnsi(outPtr); return(Task.FromResult(text)); }
public unsafe Task <string> GetTextAsync() { using (var text = _native.GetText()) { var result = System.Text.Encoding.UTF8.GetString((byte *)text.Pointer(), text.Length()); return(Task.FromResult(result)); } }
public Task <string> GetTextAsync() { using (var text = _native.GetText(NSPasteboardTypeString)) return(Task.FromResult(text.String)); }