public WebPoint LocationInDom() { WebPoint res = null; var MRes = new ManualResetEventSlim(true); MRes.Reset(); Exception exception = null; Task.Run(async() => { try { res = await coordinates.LocationInDom().ConfigureAwait(false); } catch (Exception ex) { exception = ex; } MRes.Set(); } ); MRes.Wait(); if (exception != null) { throw exception; } return(res); }