@@ -47,7 +47,7 @@ JsonLDContentType GetJsonLDContentType(string contentTypeStr)
47
47
/// <exception cref="JsonLDNet.Core.JsonLdError"></exception>
48
48
public virtual RemoteDocument LoadDocument ( string url )
49
49
{
50
- return LoadDocumentAsync ( url ) . GetAwaiter ( ) . GetResult ( ) ;
50
+ return LoadDocumentAsync ( url ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
51
51
}
52
52
53
53
/// <exception cref="JsonLDNet.Core.JsonLdError"></exception>
@@ -56,7 +56,7 @@ public virtual async Task<RemoteDocument> LoadDocumentAsync(string url)
56
56
RemoteDocument doc = new RemoteDocument ( url , null ) ;
57
57
try
58
58
{
59
- using ( HttpResponseMessage response = await JsonLD . Util . LDHttpClient . FetchAsync ( url ) )
59
+ using ( HttpResponseMessage response = await JsonLD . Util . LDHttpClient . FetchAsync ( url ) . ConfigureAwait ( false ) )
60
60
{
61
61
62
62
var code = ( int ) response . StatusCode ;
@@ -88,12 +88,12 @@ public virtual async Task<RemoteDocument> LoadDocumentAsync(string url)
88
88
string header = linkedContexts . First ( ) ;
89
89
string linkedUrl = header . Substring ( 1 , header . IndexOf ( ">" ) - 1 ) ;
90
90
string resolvedUrl = URL . Resolve ( finalUrl , linkedUrl ) ;
91
- var remoteContext = this . LoadDocument ( resolvedUrl ) ;
91
+ var remoteContext = await this . LoadDocumentAsync ( resolvedUrl ) . ConfigureAwait ( false ) ;
92
92
doc . contextUrl = remoteContext . documentUrl ;
93
93
doc . context = remoteContext . document ;
94
94
}
95
95
96
- Stream stream = await response . Content . ReadAsStreamAsync ( ) ;
96
+ Stream stream = await response . Content . ReadAsStreamAsync ( ) . ConfigureAwait ( false ) ;
97
97
98
98
doc . DocumentUrl = finalUrl ;
99
99
doc . Document = JSONUtils . FromInputStream ( stream ) ;
0 commit comments