diff --git a/src/I18Next.Net.Extensions/I18NextStringLocalizer.cs b/src/I18Next.Net.Extensions/I18NextStringLocalizer.cs index bee79da..09100f6 100644 --- a/src/I18Next.Net.Extensions/I18NextStringLocalizer.cs +++ b/src/I18Next.Net.Extensions/I18NextStringLocalizer.cs @@ -30,7 +30,8 @@ public IEnumerable GetAllStrings(bool includeParentCultures) { var language = _language ?? _instance.Language; - var result = _instance.Backend.LoadNamespaceAsync(language, _instance.DefaultNamespace).Result; + var result = _instance.Backend.LoadNamespaceAsync(language, _instance.DefaultNamespace) + .ConfigureAwait(false).GetAwaiter().GetResult(); return result.GetAllValues().Select(t => new LocalizedString(t.Key, t.Value)); } diff --git a/src/I18Next.Net/I18NextNet.cs b/src/I18Next.Net/I18NextNet.cs index e787f41..244e2b1 100644 --- a/src/I18Next.Net/I18NextNet.cs +++ b/src/I18Next.Net/I18NextNet.cs @@ -87,17 +87,17 @@ public string Language public string T(string key, object args = null) { - return Ta(_language, key, args).Result; + return Ta(_language, key, args).ConfigureAwait(false).GetAwaiter().GetResult(); } public string T(string language, string key, object args = null) { - return Ta(language, key, args).Result; + return Ta(language, key, args).ConfigureAwait(false).GetAwaiter().GetResult(); } public string T(string language, string defaultNamespace, string key, object args = null) { - return Ta(language, defaultNamespace, key, args).Result; + return Ta(language, defaultNamespace, key, args).ConfigureAwait(false).GetAwaiter().GetResult(); } public Task Ta(string key, object args = null)