public static T DeserializeSync <T>(this IXmlSerializer serializer, string source) { using (var reader = new StringReader(source)) { return(serializer .DeserializeAsync <T>(reader) .ConfigureAwait(false) .GetAwaiter() .GetResult()); } }