Update dependencies (#10)

Fix code style
This commit is contained in:
2021-09-16 13:56:05 +02:00
committed by GitHub
parent d20e5bd308
commit 57925151fa
28 changed files with 378 additions and 256 deletions
@@ -7,7 +7,10 @@ namespace System.Extensions
public static T Deserialize<T>(this string serialized)
where T : class
{
if (serialized.IsNullOrWhiteSpace()) throw new ArgumentException("Provided serialized string cannot be null or whitespace", nameof(serialized));
if (serialized.IsNullOrWhiteSpace())
{
throw new ArgumentException("Provided serialized string cannot be null or whitespace", nameof(serialized));
}
return JsonConvert.DeserializeObject<T>(serialized);
}
@@ -15,7 +18,10 @@ namespace System.Extensions
public static string Serialize<T>(this T obj)
where T : class
{
if (obj is null) throw new ArgumentNullException(nameof(obj));
if (obj is null)
{
throw new ArgumentNullException(nameof(obj));
}
return JsonConvert.SerializeObject(obj);
}
@@ -37,7 +43,10 @@ namespace System.Extensions
public static T ThrowIfNull<T>([ValidatedNotNull] this T obj, string name) where T : class
{
if (obj is null) throw new ArgumentNullException(name);
if (obj is null)
{
throw new ArgumentNullException(name);
}
return obj;
}