wrap getUap in  ManualResetEvent
fixes
MODIFY
src/Directory.Build.props
src/Directory.Build.props
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
- <Version>2.0.0</Version>
+ <Version>2.0.1</Version>
<PackageTags>Clipboard, Copy</PackageTags>
<Description>A netstandard package to copy text to the clipboard.</Description>
</PropertyGroup>

MODIFY
src/TextCopy/Clipboard_GetUap.cs
src/TextCopy/Clipboard_GetUap.cs
@@ -15,6 +15,7 @@ namespace TextCopy
{
return async cancellation =>
{
+ using var resetEvent = new ManualResetEvent(false);
var dispatcher = CoreApplication.MainView.CoreWindow.Dispatcher;
string? value = null;
await dispatcher.RunAsync(CoreDispatcherPriority.Normal,
@@ -26,8 +27,11 @@ namespace TextCopy
value = await dataPackageView.GetTextAsync()
.AsTask(cancellation);
}
+
+ resetEvent.Set();
})
.AsTask(cancellation);
+ resetEvent.WaitOne();
return value;
};
}

wrap getUap in  ManualResetEvent

fixes #87