Mark key and value non-nullable (at realm end) and simplify Value logic

This commit is contained in:
Dean Herbert
2021-09-15 17:12:00 +09:00
parent a150fb2996
commit a1d325cb22
3 changed files with 7 additions and 12 deletions

View File

@ -21,17 +21,12 @@ namespace osu.Game.Configuration
[Indexed]
public int Variant { get; set; }
[Required]
public string Key { get; set; } = string.Empty;
[MapTo(nameof(Value))]
public string ValueString { get; set; } = string.Empty;
[Required]
public string Value { get; set; } = string.Empty;
public object Value
{
get => ValueString;
set => ValueString = value.ToString();
}
public override string ToString() => $"{Key}=>{Value}";
public override string ToString() => $"{Key} => {Value}";
}
}