Use expression body for property get/set where possible

This commit is contained in:
Dean Herbert
2019-02-28 13:58:19 +09:00
parent 94a389319d
commit 42be7857d1
130 changed files with 297 additions and 403 deletions

View File

@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
public bool Bounding
{
get { return bounding; }
get => bounding;
set
{
bounding = value;
@ -338,7 +338,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
public Color4 StatusColour
{
set { statusIcon.FadeColour(value, 500, Easing.OutQuint); }
set => statusIcon.FadeColour(value, 500, Easing.OutQuint);
}
public UserDropdownHeader()

View File

@ -14,8 +14,8 @@ namespace osu.Game.Overlays.Settings
public override string LabelText
{
get { return checkbox.LabelText; }
set { checkbox.LabelText = value; }
get => checkbox.LabelText;
set => checkbox.LabelText = value;
}
}
}

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Settings
public virtual string LabelText
{
get { return text?.Text ?? string.Empty; }
get => text?.Text ?? string.Empty;
set
{
if (text == null)
@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Settings
public virtual Bindable<T> Bindable
{
get { return bindable; }
get => bindable;
set
{
@ -76,11 +76,7 @@ namespace osu.Game.Overlays.Settings
public bool MatchingFilter
{
set
{
// probably needs a better transition.
this.FadeTo(value ? 1 : 0);
}
set => this.FadeTo(value ? 1 : 0);
}
protected SettingsItem()
@ -115,7 +111,7 @@ namespace osu.Game.Overlays.Settings
public Bindable<T> Bindable
{
get { return bindable; }
get => bindable;
set
{
bindable = value;

View File

@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Settings
public bool MatchingFilter
{
set { this.FadeTo(value ? 1 : 0); }
set => this.FadeTo(value ? 1 : 0);
}
protected SettingsSection()

View File

@ -24,10 +24,7 @@ namespace osu.Game.Overlays.Settings
public IEnumerable<string> FilterTerms => new[] { Header };
public bool MatchingFilter
{
set
{
this.FadeTo(value ? 1 : 0);
}
set => this.FadeTo(value ? 1 : 0);
}
protected SettingsSubsection()

View File

@ -88,7 +88,7 @@ namespace osu.Game.Overlays.Settings
public ExpandedState State
{
get { return state; }
get => state;
set
{
expandEvent?.Cancel();

View File

@ -28,10 +28,7 @@ namespace osu.Game.Overlays.Settings
private SettingsSection section;
public SettingsSection Section
{
get
{
return section;
}
get => section;
set
{
section = value;
@ -43,7 +40,7 @@ namespace osu.Game.Overlays.Settings
private bool selected;
public bool Selected
{
get { return selected; }
get => selected;
set
{
selected = value;