Serialization of Pokemon, general fixes

This commit is contained in:
2024-09-03 09:31:32 +02:00
parent 2a0aaed4c3
commit 3214a6f29a
11 changed files with 387 additions and 51 deletions

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();