Serialization of Pokemon, general fixes

This commit is contained in:
Deukhoofd committed 2024-09-03 09:31:32 +02:00
1 parent 2a0aaed4c3
commit 3214a6f29a
11 files changed
+387 -51

No files matched your search

+4 -1
View File
@@ -26,7 +26,10 @@ public readonly record struct StringKey
/// <summary>
/// Converts a <see cref="string"/> to a <see cref="StringKey"/>.
/// </summary>
public static implicit operator StringKey(string key) => new(key);
public static implicit operator StringKey(string key)
{
return string.IsNullOrWhiteSpace(key) ? default : new StringKey(key);
}
/// <inheritdoc cref="string.ToString()"/>
public override string ToString() => _key.ToLowerInvariant();