1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:07:23 +08:00

Enforce using get-only auto property where possible

This commit is contained in:
Dean Herbert 2020-01-20 13:50:27 +09:00
parent fa1b1479ed
commit cd5290b030
8 changed files with 11 additions and 10 deletions

View File

@ -10,8 +10,8 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
{
public class ProgressionPath : Path
{
public DrawableTournamentMatch Source { get; private set; }
public DrawableTournamentMatch Destination { get; private set; }
public DrawableTournamentMatch Source { get; }
public DrawableTournamentMatch Destination { get; }
public ProgressionPath(DrawableTournamentMatch source, DrawableTournamentMatch destination)
{

View File

@ -92,6 +92,6 @@ namespace osu.Game.Screens.Ranking
protected override void OnDeactivated() => colouredPart.FadeColour(inactiveColour, 200, Easing.OutQuint);
public string TooltipText { get; private set; }
public string TooltipText { get; }
}
}

View File

@ -363,7 +363,7 @@ namespace osu.Game.Screens.Select
public class InfoLabel : Container, IHasTooltip
{
public string TooltipText { get; private set; }
public string TooltipText { get; }
public InfoLabel(BeatmapStatistic statistic)
{

View File

@ -14,7 +14,7 @@ namespace osu.Game.Storyboards.Drawables
{
public class DrawableStoryboard : Container<DrawableStoryboardLayer>
{
public Storyboard Storyboard { get; private set; }
public Storyboard Storyboard { get; }
protected override Container<DrawableStoryboardLayer> Content { get; }

View File

@ -15,7 +15,7 @@ namespace osu.Game.Storyboards.Drawables
{
public class DrawableStoryboardAnimation : TextureAnimation, IFlippable, IVectorScalable
{
public StoryboardAnimation Animation { get; private set; }
public StoryboardAnimation Animation { get; }
private bool flipH;

View File

@ -10,7 +10,7 @@ namespace osu.Game.Storyboards.Drawables
{
public class DrawableStoryboardLayer : LifetimeManagementContainer
{
public StoryboardLayer Layer { get; private set; }
public StoryboardLayer Layer { get; }
public bool Enabled;
public override bool IsPresent => Enabled && base.IsPresent;

View File

@ -15,7 +15,7 @@ namespace osu.Game.Storyboards.Drawables
{
public class DrawableStoryboardSprite : Sprite, IFlippable, IVectorScalable
{
public StoryboardSprite Sprite { get; private set; }
public StoryboardSprite Sprite { get; }
private bool flipH;

View File

@ -19,8 +19,8 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=AssignedValueIsNeverUsed/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=AssignmentIsFullyDiscarded/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=AssignNullToNotNullAttribute/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=AutoPropertyCanBeMadeGetOnly_002EGlobal/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=AutoPropertyCanBeMadeGetOnly_002ELocal/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=AutoPropertyCanBeMadeGetOnly_002EGlobal/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=AutoPropertyCanBeMadeGetOnly_002ELocal/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=BadAttributeBracketsSpaces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=BadBracesSpaces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=BadChildStatementIndent/@EntryIndexedValue">WARNING</s:String>
@ -765,6 +765,7 @@ See the LICENCE file in the repository root for full licence text.&#xD;
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=NAMESPACE_005FALIAS/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CustomTools/CustomToolsData/@EntryValue"></s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>