override ToString

This commit is contained in:
qhy040404
2023-12-20 13:24:37 +08:00
parent 449a5393a9
commit 47d0cbcf31
2 changed files with 6 additions and 1 deletions

View File

@@ -79,7 +79,7 @@ internal sealed partial class AppOptions : DbStoreOptions
public Region Region
{
get => GetOption(ref region, SettingEntry.Region, v => Region.FromRegion(v), Regions[0]).Value;
set => SetOption(ref region, SettingEntry.Region, value, value => value.Value.Value);
set => SetOption(ref region, SettingEntry.Region, value, value => value.ToStringOrEmpty());
}
public string GeetestCustomCompositeUrl

View File

@@ -46,6 +46,11 @@ internal readonly partial struct Region
};
}
public override string ToString()
{
return Value;
}
private static string EvaluateDisplayName(string value)
{
return value switch