private sealed class MyWpfWindow : Window
{
public MyWpfWindow() { Title = "WPF Window"; }
protected override void OnActivated(EventArgs e) {
// Querying the Result property prevents the GUI thread from returning;
// the thread blocks waiting for the result
String http = GetHttp().Result; //
Подробнее здесь: [url]https://stackoverflow.com/questions/79698111/why-add-configureawaitfalse-again-when-the-library-code-already-use-configurea[/url]
Ниже приведен пример из Clr через C# Book: < /p> [code]private sealed class MyWpfWindow : Window { public MyWpfWindow() { Title = "WPF Window"; }
protected override void OnActivated(EventArgs e) { // Querying the Result property prevents the GUI thread from returning; // the thread blocks waiting for the result String http = GetHttp().Result; //