Convert to readonly struct and replace with constructor temporarily

This commit is contained in:
Salman Ahmed
2021-08-31 20:45:32 +03:00
parent 208f66cc76
commit 3969350c9a
3 changed files with 22 additions and 16 deletions

View File

@ -295,11 +295,18 @@ namespace osu.Game.Overlays.Profile
}
}
public class UserGraphTooltipContent
public readonly struct UserGraphTooltipContent
{
// todo: change to init-only on C# 9
public LocalisableString Name { get; set; }
public LocalisableString Count { get; set; }
public LocalisableString Time { get; set; }
// todo: could use init-only properties on C# 9 which read better than a constructor.
public LocalisableString Name { get; }
public LocalisableString Count { get; }
public LocalisableString Time { get; }
public UserGraphTooltipContent(LocalisableString name, LocalisableString count, LocalisableString time)
{
Name = name;
Count = count;
Time = time;
}
}
}