Serialization of Pokemon, general fixes
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user