mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Mark key and value non-nullable (at realm end) and simplify Value
logic
This commit is contained in:
@ -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}";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user