mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 14:27:25 +08:00
Update R# + fix inspections
This commit is contained in:
parent
8c107b4925
commit
b44f77cee1
@ -3,13 +3,13 @@
|
|||||||
"isRoot": true,
|
"isRoot": true,
|
||||||
"tools": {
|
"tools": {
|
||||||
"jetbrains.resharper.globaltools": {
|
"jetbrains.resharper.globaltools": {
|
||||||
"version": "2022.2.3",
|
"version": "2023.3.3",
|
||||||
"commands": [
|
"commands": [
|
||||||
"jb"
|
"jb"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"nvika": {
|
"nvika": {
|
||||||
"version": "2.2.0",
|
"version": "3.0.0",
|
||||||
"commands": [
|
"commands": [
|
||||||
"nvika"
|
"nvika"
|
||||||
]
|
]
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
is_global = true
|
|
||||||
|
|
||||||
# .NET Code Style
|
# .NET Code Style
|
||||||
# IDE styles reference: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/
|
# IDE styles reference: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/
|
||||||
|
|
||||||
@ -56,4 +54,4 @@ dotnet_diagnostic.RS0030.severity = error
|
|||||||
|
|
||||||
# Temporarily disable analysing CanBeNull = true in NRT contexts due to mobile issues.
|
# Temporarily disable analysing CanBeNull = true in NRT contexts due to mobile issues.
|
||||||
# See: https://github.com/ppy/osu/pull/19677
|
# See: https://github.com/ppy/osu/pull/19677
|
||||||
dotnet_diagnostic.OSUF001.severity = none
|
dotnet_diagnostic.OSUF001.severity = none
|
||||||
|
@ -206,7 +206,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
|||||||
{
|
{
|
||||||
AddStep($"click context menu item \"{contextMenuText}\"", () =>
|
AddStep($"click context menu item \"{contextMenuText}\"", () =>
|
||||||
{
|
{
|
||||||
MenuItem item = visualiser.ContextMenuItems.FirstOrDefault(menuItem => menuItem.Text.Value == "Curve type")?.Items.FirstOrDefault(menuItem => menuItem.Text.Value == contextMenuText);
|
MenuItem item = visualiser.ContextMenuItems!.FirstOrDefault(menuItem => menuItem.Text.Value == "Curve type")?.Items.FirstOrDefault(menuItem => menuItem.Text.Value == contextMenuText);
|
||||||
|
|
||||||
item?.Action.Value?.Invoke();
|
item?.Action.Value?.Invoke();
|
||||||
});
|
});
|
||||||
|
@ -183,7 +183,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
hitObjectContainer.Add(drawableObject);
|
hitObjectContainer.Add(drawableObject!);
|
||||||
followPointRenderer.AddFollowPoints(objects[i]);
|
followPointRenderer.AddFollowPoints(objects[i]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
@ -173,6 +174,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
|
|
||||||
public IEnumerable<ISkin> AllSources => new[] { this };
|
public IEnumerable<ISkin> AllSources => new[] { this };
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public event Action SourceChanged;
|
public event Action SourceChanged;
|
||||||
|
|
||||||
private bool enabled = true;
|
private bool enabled = true;
|
||||||
|
@ -179,10 +179,9 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
TaikoAction taikoAction = getTaikoActionFromPosition(position);
|
TaikoAction taikoAction = getTaikoActionFromPosition(position);
|
||||||
|
|
||||||
// Not too sure how this can happen, but let's avoid throwing.
|
// Not too sure how this can happen, but let's avoid throwing.
|
||||||
if (trackedActions.ContainsKey(source))
|
if (!trackedActions.TryAdd(source, taikoAction))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
trackedActions.Add(source, taikoAction);
|
|
||||||
keyBindingContainer.TriggerPressed(taikoAction);
|
keyBindingContainer.TriggerPressed(taikoAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using Moq;
|
using Moq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
@ -98,9 +99,10 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
Beatmap = beatmap;
|
Beatmap = beatmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable CS0067
|
||||||
|
[CanBeNull]
|
||||||
public event Action<HitObject, IEnumerable<HitObject>> ObjectConverted;
|
public event Action<HitObject, IEnumerable<HitObject>> ObjectConverted;
|
||||||
|
#pragma warning restore CS0067
|
||||||
protected virtual void OnObjectConverted(HitObject arg1, IEnumerable<HitObject> arg2) => ObjectConverted?.Invoke(arg1, arg2);
|
|
||||||
|
|
||||||
public IBeatmap Beatmap { get; }
|
public IBeatmap Beatmap { get; }
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ namespace osu.Game.Tests.Database
|
|||||||
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.True);
|
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.True);
|
||||||
|
|
||||||
// Availability is updated on construction of a RealmRulesetStore
|
// Availability is updated on construction of a RealmRulesetStore
|
||||||
var _ = new RealmRulesetStore(realm, storage);
|
_ = new RealmRulesetStore(realm, storage);
|
||||||
|
|
||||||
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.False);
|
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.False);
|
||||||
});
|
});
|
||||||
@ -104,13 +104,13 @@ namespace osu.Game.Tests.Database
|
|||||||
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.True);
|
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.True);
|
||||||
|
|
||||||
// Availability is updated on construction of a RealmRulesetStore
|
// Availability is updated on construction of a RealmRulesetStore
|
||||||
var _ = new RealmRulesetStore(realm, storage);
|
_ = new RealmRulesetStore(realm, storage);
|
||||||
|
|
||||||
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.False);
|
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.False);
|
||||||
|
|
||||||
// Simulate the ruleset getting updated
|
// Simulate the ruleset getting updated
|
||||||
LoadTestRuleset.Version = Ruleset.CURRENT_RULESET_API_VERSION;
|
LoadTestRuleset.Version = Ruleset.CURRENT_RULESET_API_VERSION;
|
||||||
var __ = new RealmRulesetStore(realm, storage);
|
_ = new RealmRulesetStore(realm, storage);
|
||||||
|
|
||||||
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.True);
|
Assert.That(realm.Run(r => r.Find<RulesetInfo>(rulesetShortName)!.Available), Is.True);
|
||||||
});
|
});
|
||||||
|
@ -203,9 +203,9 @@ namespace osu.Game.Tests.Gameplay
|
|||||||
|
|
||||||
public IRenderer Renderer => host.Renderer;
|
public IRenderer Renderer => host.Renderer;
|
||||||
public AudioManager AudioManager => Audio;
|
public AudioManager AudioManager => Audio;
|
||||||
public IResourceStore<byte[]> Files => null;
|
public IResourceStore<byte[]> Files => null!;
|
||||||
public new IResourceStore<byte[]> Resources => base.Resources;
|
public new IResourceStore<byte[]> Resources => base.Resources;
|
||||||
public RealmAccess RealmAccess => null;
|
public RealmAccess RealmAccess => null!;
|
||||||
public IResourceStore<TextureUpload> CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore) => null;
|
public IResourceStore<TextureUpload> CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore) => null;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -56,9 +56,9 @@ namespace osu.Game.Tests.Rulesets
|
|||||||
|
|
||||||
public override IEnumerable<Mod> GetModsFor(ModType type) => new Mod[] { null };
|
public override IEnumerable<Mod> GetModsFor(ModType type) => new Mod[] { null };
|
||||||
|
|
||||||
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => null;
|
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => null!;
|
||||||
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => null;
|
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => null!;
|
||||||
public override DifficultyCalculator CreateDifficultyCalculator(IWorkingBeatmap beatmap) => null;
|
public override DifficultyCalculator CreateDifficultyCalculator(IWorkingBeatmap beatmap) => null!;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestAPIIncompatibleRuleset : Ruleset
|
private class TestAPIIncompatibleRuleset : Ruleset
|
||||||
@ -69,9 +69,9 @@ namespace osu.Game.Tests.Rulesets
|
|||||||
// simulate API incompatibility by throwing similar exceptions.
|
// simulate API incompatibility by throwing similar exceptions.
|
||||||
public override IEnumerable<Mod> GetModsFor(ModType type) => throw new MissingMethodException();
|
public override IEnumerable<Mod> GetModsFor(ModType type) => throw new MissingMethodException();
|
||||||
|
|
||||||
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => null;
|
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => null!;
|
||||||
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => null;
|
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => null!;
|
||||||
public override DifficultyCalculator CreateDifficultyCalculator(IWorkingBeatmap beatmap) => null;
|
public override DifficultyCalculator CreateDifficultyCalculator(IWorkingBeatmap beatmap) => null!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ namespace osu.Game.Tests.Visual.Editing
|
|||||||
|
|
||||||
AddStep("dismiss prompt", () =>
|
AddStep("dismiss prompt", () =>
|
||||||
{
|
{
|
||||||
var button = DialogOverlay.CurrentDialog.Buttons.Last();
|
var button = DialogOverlay.CurrentDialog!.Buttons.Last();
|
||||||
InputManager.MoveMouseTo(button);
|
InputManager.MoveMouseTo(button);
|
||||||
InputManager.Click(MouseButton.Left);
|
InputManager.Click(MouseButton.Left);
|
||||||
});
|
});
|
||||||
@ -167,7 +167,7 @@ namespace osu.Game.Tests.Visual.Editing
|
|||||||
});
|
});
|
||||||
AddUntilStep("save prompt shown", () => DialogOverlay.CurrentDialog is SaveRequiredPopupDialog);
|
AddUntilStep("save prompt shown", () => DialogOverlay.CurrentDialog is SaveRequiredPopupDialog);
|
||||||
|
|
||||||
AddStep("save changes", () => DialogOverlay.CurrentDialog.PerformOkAction());
|
AddStep("save changes", () => DialogOverlay.CurrentDialog!.PerformOkAction());
|
||||||
|
|
||||||
EditorPlayer editorPlayer = null;
|
EditorPlayer editorPlayer = null;
|
||||||
AddUntilStep("player pushed", () => (editorPlayer = Stack.CurrentScreen as EditorPlayer) != null);
|
AddUntilStep("player pushed", () => (editorPlayer = Stack.CurrentScreen as EditorPlayer) != null);
|
||||||
|
@ -120,7 +120,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
playbackManager?.ReplayInputHandler.SetFrameFromTime(Time.Current - 100);
|
playbackManager?.ReplayInputHandler?.SetFrameFromTime(Time.Current - 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TearDownSteps]
|
[TearDownSteps]
|
||||||
|
@ -198,7 +198,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
foreach (var legacyFrame in frames.Frames)
|
foreach (var legacyFrame in frames.Frames)
|
||||||
{
|
{
|
||||||
var frame = new TestReplayFrame();
|
var frame = new TestReplayFrame();
|
||||||
frame.FromLegacy(legacyFrame, null);
|
frame.FromLegacy(legacyFrame, null!);
|
||||||
playbackReplay.Frames.Add(frame);
|
playbackReplay.Frames.Add(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual IBindable<int> UnreadCount => null;
|
public virtual IBindable<int> UnreadCount { get; } = new Bindable<int>();
|
||||||
|
|
||||||
public IEnumerable<Notification> AllNotifications => Enumerable.Empty<Notification>();
|
public IEnumerable<Notification> AllNotifications => Enumerable.Empty<Notification>();
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
.SkipWhile(r => r.Room.Category.Value == RoomCategory.Spotlight)
|
.SkipWhile(r => r.Room.Category.Value == RoomCategory.Spotlight)
|
||||||
.All(r => r.Room.Category.Value == RoomCategory.Normal));
|
.All(r => r.Room.Category.Value == RoomCategory.Normal));
|
||||||
|
|
||||||
AddStep("remove first room", () => RoomManager.RemoveRoom(RoomManager.Rooms.FirstOrDefault(r => r.RoomID.Value == 0)));
|
AddStep("remove first room", () => RoomManager.RemoveRoom(RoomManager.Rooms.First(r => r.RoomID.Value == 0)));
|
||||||
AddAssert("has 4 rooms", () => container.Rooms.Count == 4);
|
AddAssert("has 4 rooms", () => container.Rooms.Count == 4);
|
||||||
AddAssert("first room removed", () => container.Rooms.All(r => r.Room.RoomID.Value != 0));
|
AddAssert("first room removed", () => container.Rooms.All(r => r.Room.RoomID.Value != 0));
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
|
|
||||||
public IBindable<bool> InitialRoomsReceived { get; } = new Bindable<bool>(true);
|
public IBindable<bool> InitialRoomsReceived { get; } = new Bindable<bool>(true);
|
||||||
|
|
||||||
public IBindableList<Room> Rooms => null;
|
public IBindableList<Room> Rooms => null!;
|
||||||
|
|
||||||
public void AddOrUpdateRoom(Room room) => throw new NotImplementedException();
|
public void AddOrUpdateRoom(Room room) => throw new NotImplementedException();
|
||||||
|
|
||||||
|
@ -52,11 +52,11 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
[SetUpSteps]
|
[SetUpSteps]
|
||||||
public void SetupSteps()
|
public void SetupSteps()
|
||||||
{
|
{
|
||||||
AddStep("set room", () => SelectedRoom.Value = new Room());
|
AddStep("set room", () => SelectedRoom!.Value = new Room());
|
||||||
|
|
||||||
importBeatmap();
|
importBeatmap();
|
||||||
|
|
||||||
AddStep("load match", () => LoadScreen(match = new TestPlaylistsRoomSubScreen(SelectedRoom.Value)));
|
AddStep("load match", () => LoadScreen(match = new TestPlaylistsRoomSubScreen(SelectedRoom!.Value)));
|
||||||
AddUntilStep("wait for load", () => match.IsCurrentScreen());
|
AddUntilStep("wait for load", () => match.IsCurrentScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
AddAssert("first playlist item selected", () => match.SelectedItem.Value == SelectedRoom.Value.Playlist[0]);
|
AddAssert("first playlist item selected", () => match.SelectedItem.Value == SelectedRoom!.Value.Playlist[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -201,7 +201,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
|
|
||||||
private void setupAndCreateRoom(Action<Room> room)
|
private void setupAndCreateRoom(Action<Room> room)
|
||||||
{
|
{
|
||||||
AddStep("setup room", () => room(SelectedRoom.Value));
|
AddStep("setup room", () => room(SelectedRoom!.Value));
|
||||||
|
|
||||||
AddStep("click create button", () =>
|
AddStep("click create button", () =>
|
||||||
{
|
{
|
||||||
|
@ -432,7 +432,7 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
|
|
||||||
private class RulesetWithNoPerformanceCalculator : OsuRuleset
|
private class RulesetWithNoPerformanceCalculator : OsuRuleset
|
||||||
{
|
{
|
||||||
public override PerformanceCalculator CreatePerformanceCalculator() => null;
|
public override PerformanceCalculator CreatePerformanceCalculator() => null!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual IBindable<int> UnreadCount => null;
|
public virtual IBindable<int> UnreadCount { get; } = new Bindable<int>();
|
||||||
|
|
||||||
public IEnumerable<Notification> AllNotifications => Enumerable.Empty<Notification>();
|
public IEnumerable<Notification> AllNotifications => Enumerable.Empty<Notification>();
|
||||||
}
|
}
|
||||||
|
@ -567,10 +567,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
for (int i = pendingControlPoints.Count - 1; i >= 0; i--)
|
for (int i = pendingControlPoints.Count - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
var type = pendingControlPoints[i].GetType();
|
var type = pendingControlPoints[i].GetType();
|
||||||
if (pendingControlPointTypes.Contains(type))
|
if (!pendingControlPointTypes.Add(type))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pendingControlPointTypes.Add(type);
|
|
||||||
beatmap.ControlPointInfo.Add(pendingControlPointsTime, pendingControlPoints[i]);
|
beatmap.ControlPointInfo.Add(pendingControlPointsTime, pendingControlPoints[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ namespace osu.Game.Beatmaps
|
|||||||
ITrackStore IBeatmapResourceProvider.Tracks => trackStore;
|
ITrackStore IBeatmapResourceProvider.Tracks => trackStore;
|
||||||
IRenderer IStorageResourceProvider.Renderer => host?.Renderer ?? new DummyRenderer();
|
IRenderer IStorageResourceProvider.Renderer => host?.Renderer ?? new DummyRenderer();
|
||||||
AudioManager IStorageResourceProvider.AudioManager => audioManager;
|
AudioManager IStorageResourceProvider.AudioManager => audioManager;
|
||||||
RealmAccess IStorageResourceProvider.RealmAccess => null;
|
RealmAccess IStorageResourceProvider.RealmAccess => null!;
|
||||||
IResourceStore<byte[]> IStorageResourceProvider.Files => files;
|
IResourceStore<byte[]> IStorageResourceProvider.Files => files;
|
||||||
IResourceStore<byte[]> IStorageResourceProvider.Resources => resources;
|
IResourceStore<byte[]> IStorageResourceProvider.Resources => resources;
|
||||||
IResourceStore<TextureUpload> IStorageResourceProvider.CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore) => host?.CreateTextureLoaderStore(underlyingStore);
|
IResourceStore<TextureUpload> IStorageResourceProvider.CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore) => host?.CreateTextureLoaderStore(underlyingStore);
|
||||||
|
@ -52,10 +52,10 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
public override void Add(T drawable)
|
public override void Add(T drawable)
|
||||||
{
|
{
|
||||||
base.Add(drawable);
|
|
||||||
|
|
||||||
Debug.Assert(drawable != null);
|
Debug.Assert(drawable != null);
|
||||||
|
|
||||||
|
base.Add(drawable);
|
||||||
|
|
||||||
drawable.StateChanged += state => selectionChanged(drawable, state);
|
drawable.StateChanged += state => selectionChanged(drawable, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
@ -48,6 +49,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
protected virtual float ChevronSize => 10;
|
protected virtual float ChevronSize => 10;
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public event Action<Visibility> StateChanged;
|
public event Action<Visibility> StateChanged;
|
||||||
|
|
||||||
public readonly SpriteIcon Chevron;
|
public readonly SpriteIcon Chevron;
|
||||||
|
@ -41,6 +41,6 @@ namespace osu.Game.IO
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="underlyingStore">The underlying provider of texture data (in arbitrary image formats).</param>
|
/// <param name="underlyingStore">The underlying provider of texture data (in arbitrary image formats).</param>
|
||||||
/// <returns>A texture loader store.</returns>
|
/// <returns>A texture loader store.</returns>
|
||||||
IResourceStore<TextureUpload> CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore);
|
IResourceStore<TextureUpload>? CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,13 +264,12 @@ namespace osu.Game.Online.Spectator
|
|||||||
{
|
{
|
||||||
Debug.Assert(ThreadSafety.IsUpdateThread);
|
Debug.Assert(ThreadSafety.IsUpdateThread);
|
||||||
|
|
||||||
if (watchedUsersRefCounts.ContainsKey(userId))
|
if (!watchedUsersRefCounts.TryAdd(userId, 1))
|
||||||
{
|
{
|
||||||
watchedUsersRefCounts[userId]++;
|
watchedUsersRefCounts[userId]++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
watchedUsersRefCounts.Add(userId, 1);
|
|
||||||
WatchUserInternal(userId);
|
WatchUserInternal(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
|
|
||||||
public Color4 AccentColour { get; set; }
|
public Color4 AccentColour { get; set; }
|
||||||
|
|
||||||
protected override IEnumerable<Drawable> EffectTargets => null;
|
protected override IEnumerable<Drawable> EffectTargets => Enumerable.Empty<Drawable>();
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IAPIProvider api { get; set; }
|
private IAPIProvider api { get; set; }
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -24,6 +25,7 @@ namespace osu.Game.Overlays.MedalSplash
|
|||||||
private const float scale_when_unlocked = 0.76f;
|
private const float scale_when_unlocked = 0.76f;
|
||||||
private const float scale_when_full = 0.6f;
|
private const float scale_when_full = 0.6f;
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public event Action<DisplayState> StateChanged;
|
public event Action<DisplayState> StateChanged;
|
||||||
|
|
||||||
private readonly Medal medal;
|
private readonly Medal medal;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
@ -48,6 +49,7 @@ namespace osu.Game.Overlays.Volume
|
|||||||
private Sample notchSample;
|
private Sample notchSample;
|
||||||
private double sampleLastPlaybackTime;
|
private double sampleLastPlaybackTime;
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public event Action<SelectionState> StateChanged;
|
public event Action<SelectionState> StateChanged;
|
||||||
|
|
||||||
private SelectionState state;
|
private SelectionState state;
|
||||||
|
@ -11,6 +11,7 @@ using System.Linq;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Extensions.ObjectExtensions;
|
||||||
using osu.Framework.Extensions.TypeExtensions;
|
using osu.Framework.Extensions.TypeExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
@ -139,7 +140,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
|
|
||||||
protected override bool RequiresChildrenUpdate => true;
|
protected override bool RequiresChildrenUpdate => true;
|
||||||
|
|
||||||
public override bool IsPresent => base.IsPresent || (State.Value == ArmedState.Idle && Clock?.CurrentTime >= LifetimeStart);
|
public override bool IsPresent => base.IsPresent || (State.Value == ArmedState.Idle && Clock.IsNotNull() && Clock.CurrentTime >= LifetimeStart);
|
||||||
|
|
||||||
private readonly Bindable<ArmedState> state = new Bindable<ArmedState>();
|
private readonly Bindable<ArmedState> state = new Bindable<ArmedState>();
|
||||||
|
|
||||||
|
@ -47,12 +47,9 @@ namespace osu.Game.Rulesets.Objects.Pooling
|
|||||||
{
|
{
|
||||||
HitObject hitObject = entry.HitObject;
|
HitObject hitObject = entry.HitObject;
|
||||||
|
|
||||||
if (entryMap.ContainsKey(hitObject))
|
if (!entryMap.TryAdd(hitObject, entry))
|
||||||
throw new InvalidOperationException($@"The {nameof(HitObjectLifetimeEntry)} is already added to this {nameof(HitObjectEntryManager)}.");
|
throw new InvalidOperationException($@"The {nameof(HitObjectLifetimeEntry)} is already added to this {nameof(HitObjectEntryManager)}.");
|
||||||
|
|
||||||
// Add the entry.
|
|
||||||
entryMap[hitObject] = entry;
|
|
||||||
|
|
||||||
// If the entry has a parent, set it and add the entry to the parent's children.
|
// If the entry has a parent, set it and add the entry to the parent's children.
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -69,6 +70,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
public override void Show() => State = Visibility.Visible;
|
public override void Show() => State = Visibility.Visible;
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public event Action<Visibility> StateChanged;
|
public event Action<Visibility> StateChanged;
|
||||||
|
|
||||||
public partial class BoxWithBorders : CompositeDrawable
|
public partial class BoxWithBorders : CompositeDrawable
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -88,6 +89,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
public override void Show() => State = Visibility.Visible;
|
public override void Show() => State = Visibility.Visible;
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public event Action<Visibility> StateChanged;
|
public event Action<Visibility> StateChanged;
|
||||||
|
|
||||||
private partial class ButtonAreaBackground : Box, IStateful<ButtonAreaBackgroundState>
|
private partial class ButtonAreaBackground : Box, IStateful<ButtonAreaBackgroundState>
|
||||||
@ -146,6 +148,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public event Action<ButtonAreaBackgroundState> StateChanged;
|
public event Action<ButtonAreaBackgroundState> StateChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Development;
|
using osu.Framework.Development;
|
||||||
@ -19,6 +20,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
{
|
{
|
||||||
public partial class RoomManager : Component, IRoomManager
|
public partial class RoomManager : Component, IRoomManager
|
||||||
{
|
{
|
||||||
|
[CanBeNull]
|
||||||
public event Action RoomsUpdated;
|
public event Action RoomsUpdated;
|
||||||
|
|
||||||
private readonly BindableList<Room> rooms = new BindableList<Room>();
|
private readonly BindableList<Room> rooms = new BindableList<Room>();
|
||||||
|
@ -509,7 +509,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
|
|
||||||
private void cancelTrackLooping()
|
private void cancelTrackLooping()
|
||||||
{
|
{
|
||||||
var track = Beatmap?.Value?.Track;
|
var track = Beatmap.Value?.Track;
|
||||||
|
|
||||||
if (track != null)
|
if (track != null)
|
||||||
track.Looping = false;
|
track.Looping = false;
|
||||||
|
@ -109,7 +109,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||||
{
|
{
|
||||||
positionalAdjust = Vector2.Distance(e.MousePosition, button.ToSpaceOfOtherDrawable(button.DrawRectangle.Centre, Parent)) / 100;
|
positionalAdjust = Vector2.Distance(e.MousePosition, button.ToSpaceOfOtherDrawable(button.DrawRectangle.Centre, Parent!)) / 100;
|
||||||
return base.OnMouseMove(e);
|
return base.OnMouseMove(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
|
|
||||||
public TestMultiplayerClient MultiplayerClient => OnlinePlayDependencies.MultiplayerClient;
|
public TestMultiplayerClient MultiplayerClient => OnlinePlayDependencies.MultiplayerClient;
|
||||||
public new TestMultiplayerRoomManager RoomManager => OnlinePlayDependencies.RoomManager;
|
public new TestMultiplayerRoomManager RoomManager => OnlinePlayDependencies.RoomManager;
|
||||||
public TestSpectatorClient SpectatorClient => OnlinePlayDependencies?.SpectatorClient;
|
public TestSpectatorClient SpectatorClient => OnlinePlayDependencies.SpectatorClient;
|
||||||
|
|
||||||
protected new MultiplayerTestSceneDependencies OnlinePlayDependencies => (MultiplayerTestSceneDependencies)base.OnlinePlayDependencies;
|
protected new MultiplayerTestSceneDependencies OnlinePlayDependencies => (MultiplayerTestSceneDependencies)base.OnlinePlayDependencies;
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
AddStep("join room", () =>
|
AddStep("join room", () =>
|
||||||
{
|
{
|
||||||
SelectedRoom.Value = CreateRoom();
|
SelectedRoom!.Value = CreateRoom();
|
||||||
RoomManager.CreateRoom(SelectedRoom.Value);
|
RoomManager.CreateRoom(SelectedRoom.Value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -16,31 +16,31 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cached <see cref="Room"/>.
|
/// The cached <see cref="Room"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Bindable<Room> SelectedRoom { get; }
|
Bindable<Room>? SelectedRoom { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cached <see cref="IRoomManager"/>
|
/// The cached <see cref="IRoomManager"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IRoomManager RoomManager { get; }
|
IRoomManager? RoomManager { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cached <see cref="OngoingOperationTracker"/>.
|
/// The cached <see cref="OngoingOperationTracker"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
OngoingOperationTracker OngoingOperationTracker { get; }
|
OngoingOperationTracker? OngoingOperationTracker { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cached <see cref="OnlinePlayBeatmapAvailabilityTracker"/>.
|
/// The cached <see cref="OnlinePlayBeatmapAvailabilityTracker"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
OnlinePlayBeatmapAvailabilityTracker AvailabilityTracker { get; }
|
OnlinePlayBeatmapAvailabilityTracker? AvailabilityTracker { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cached <see cref="UserLookupCache"/>.
|
/// The cached <see cref="UserLookupCache"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
TestUserLookupCache UserLookupCache { get; }
|
TestUserLookupCache? UserLookupCache { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cached <see cref="BeatmapLookupCache"/>.
|
/// The cached <see cref="BeatmapLookupCache"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BeatmapLookupCache BeatmapLookupCache { get; }
|
BeatmapLookupCache? BeatmapLookupCache { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
@ -22,23 +20,23 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract partial class OnlinePlayTestScene : ScreenTestScene, IOnlinePlayTestSceneDependencies
|
public abstract partial class OnlinePlayTestScene : ScreenTestScene, IOnlinePlayTestSceneDependencies
|
||||||
{
|
{
|
||||||
public Bindable<Room> SelectedRoom => OnlinePlayDependencies?.SelectedRoom;
|
public Bindable<Room> SelectedRoom => OnlinePlayDependencies.SelectedRoom;
|
||||||
public IRoomManager RoomManager => OnlinePlayDependencies?.RoomManager;
|
public IRoomManager RoomManager => OnlinePlayDependencies.RoomManager;
|
||||||
public OngoingOperationTracker OngoingOperationTracker => OnlinePlayDependencies?.OngoingOperationTracker;
|
public OngoingOperationTracker OngoingOperationTracker => OnlinePlayDependencies.OngoingOperationTracker;
|
||||||
public OnlinePlayBeatmapAvailabilityTracker AvailabilityTracker => OnlinePlayDependencies?.AvailabilityTracker;
|
public OnlinePlayBeatmapAvailabilityTracker AvailabilityTracker => OnlinePlayDependencies.AvailabilityTracker;
|
||||||
public TestUserLookupCache UserLookupCache => OnlinePlayDependencies?.UserLookupCache;
|
public TestUserLookupCache UserLookupCache => OnlinePlayDependencies.UserLookupCache;
|
||||||
public BeatmapLookupCache BeatmapLookupCache => OnlinePlayDependencies?.BeatmapLookupCache;
|
public BeatmapLookupCache BeatmapLookupCache => OnlinePlayDependencies.BeatmapLookupCache;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All dependencies required for online play components and screens.
|
/// All dependencies required for online play components and screens.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected OnlinePlayTestSceneDependencies OnlinePlayDependencies => dependencies?.OnlinePlayDependencies;
|
protected OnlinePlayTestSceneDependencies OnlinePlayDependencies => dependencies.OnlinePlayDependencies;
|
||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
private readonly Container content;
|
private readonly Container content;
|
||||||
private readonly Container drawableDependenciesContainer;
|
private readonly Container drawableDependenciesContainer;
|
||||||
private DelegatedDependencyContainer dependencies;
|
private DelegatedDependencyContainer dependencies = null!;
|
||||||
|
|
||||||
protected OnlinePlayTestScene()
|
protected OnlinePlayTestScene()
|
||||||
{
|
{
|
||||||
@ -51,8 +49,10 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
|
|
||||||
protected sealed override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected sealed override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
dependencies = new DelegatedDependencyContainer(base.CreateChildDependencies(parent));
|
return dependencies = new DelegatedDependencyContainer(base.CreateChildDependencies(parent))
|
||||||
return dependencies;
|
{
|
||||||
|
OnlinePlayDependencies = initDependencies()
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetUpSteps()
|
public override void SetUpSteps()
|
||||||
@ -62,9 +62,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
AddStep("setup dependencies", () =>
|
AddStep("setup dependencies", () =>
|
||||||
{
|
{
|
||||||
// Reset the room dependencies to a fresh state.
|
// Reset the room dependencies to a fresh state.
|
||||||
drawableDependenciesContainer.Clear();
|
dependencies.OnlinePlayDependencies = initDependencies();
|
||||||
dependencies.OnlinePlayDependencies = CreateOnlinePlayDependencies();
|
|
||||||
drawableDependenciesContainer.AddRange(OnlinePlayDependencies.DrawableComponents);
|
|
||||||
|
|
||||||
var handler = OnlinePlayDependencies.RequestsHandler;
|
var handler = OnlinePlayDependencies.RequestsHandler;
|
||||||
|
|
||||||
@ -90,6 +88,14 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private OnlinePlayTestSceneDependencies initDependencies()
|
||||||
|
{
|
||||||
|
var newDependencies = CreateOnlinePlayDependencies();
|
||||||
|
drawableDependenciesContainer.Clear();
|
||||||
|
drawableDependenciesContainer.AddRange(newDependencies.DrawableComponents);
|
||||||
|
return newDependencies;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the room dependencies. Called every <see cref="SetUpSteps"/>.
|
/// Creates the room dependencies. Called every <see cref="SetUpSteps"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -106,7 +112,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The online play dependencies.
|
/// The online play dependencies.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public OnlinePlayTestSceneDependencies OnlinePlayDependencies { get; set; }
|
public OnlinePlayTestSceneDependencies OnlinePlayDependencies { get; set; } = null!;
|
||||||
|
|
||||||
private readonly IReadOnlyDependencyContainer parent;
|
private readonly IReadOnlyDependencyContainer parent;
|
||||||
private readonly DependencyContainer injectableDependencies;
|
private readonly DependencyContainer injectableDependencies;
|
||||||
@ -122,10 +128,10 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
public object Get(Type type)
|
public object Get(Type type)
|
||||||
=> OnlinePlayDependencies?.Get(type) ?? parent.Get(type);
|
=> OnlinePlayDependencies.Get(type) ?? parent.Get(type);
|
||||||
|
|
||||||
public object Get(Type type, CacheInfo info)
|
public object Get(Type type, CacheInfo info)
|
||||||
=> OnlinePlayDependencies?.Get(type, info) ?? parent.Get(type, info);
|
=> OnlinePlayDependencies.Get(type, info) ?? parent.Get(type, info);
|
||||||
|
|
||||||
public void Inject<T>(T instance)
|
public void Inject<T>(T instance)
|
||||||
where T : class, IDependencyInjectionCandidate
|
where T : class, IDependencyInjectionCandidate
|
||||||
|
@ -56,10 +56,10 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
CacheAs(BeatmapLookupCache);
|
CacheAs(BeatmapLookupCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Get(Type type)
|
public object? Get(Type type)
|
||||||
=> dependencies.Get(type);
|
=> dependencies.Get(type);
|
||||||
|
|
||||||
public object Get(Type type, CacheInfo info)
|
public object? Get(Type type, CacheInfo info)
|
||||||
=> dependencies.Get(type, info);
|
=> dependencies.Get(type, info);
|
||||||
|
|
||||||
public void Inject<T>(T instance)
|
public void Inject<T>(T instance)
|
||||||
|
@ -171,10 +171,10 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
public IRenderer Renderer => host.Renderer;
|
public IRenderer Renderer => host.Renderer;
|
||||||
public AudioManager AudioManager => Audio;
|
public AudioManager AudioManager => Audio;
|
||||||
public IResourceStore<byte[]> Files => null;
|
public IResourceStore<byte[]> Files => null!;
|
||||||
public new IResourceStore<byte[]> Resources => base.Resources;
|
public new IResourceStore<byte[]> Resources => base.Resources;
|
||||||
public IResourceStore<TextureUpload> CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore) => host.CreateTextureLoaderStore(underlyingStore);
|
public IResourceStore<TextureUpload> CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore) => host.CreateTextureLoaderStore(underlyingStore);
|
||||||
RealmAccess IStorageResourceProvider.RealmAccess => null;
|
RealmAccess IStorageResourceProvider.RealmAccess => null!;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=CompareOfFloatsByEqualityOperator/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=CompareOfFloatsByEqualityOperator/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertClosureToMethodGroup/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertClosureToMethodGroup/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertConditionalTernaryExpressionToSwitchExpression/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertConditionalTernaryExpressionToSwitchExpression/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertConstructorToMemberInitializers/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertIfDoToWhile/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertIfDoToWhile/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertIfStatementToConditionalTernaryExpression/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertIfStatementToConditionalTernaryExpression/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertIfStatementToNullCoalescingAssignment/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertIfStatementToNullCoalescingAssignment/@EntryIndexedValue">WARNING</s:String>
|
||||||
@ -81,6 +82,7 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToConstant_002ELocal/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToConstant_002ELocal/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToLambdaExpression/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToLambdaExpression/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToLocalFunction/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToLocalFunction/@EntryIndexedValue">HINT</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToPrimaryConstructor/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToStaticClass/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToStaticClass/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToUsingDeclaration/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToUsingDeclaration/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertTypeCheckPatternToNullCheck/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertTypeCheckPatternToNullCheck/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
@ -165,6 +167,7 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantImmediateDelegateInvocation/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantImmediateDelegateInvocation/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantLambdaSignatureParentheses/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantLambdaSignatureParentheses/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantReadonlyModifier/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantReadonlyModifier/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantTypeDeclarationBody/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantTypeSpecificationInDefaultExpression/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantTypeSpecificationInDefaultExpression/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantLinebreak/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantLinebreak/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantSpace/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantSpace/@EntryIndexedValue">WARNING</s:String>
|
||||||
@ -251,6 +254,7 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedType_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedType_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseAwaitUsing/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseAwaitUsing/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseCollectionCountProperty/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseCollectionCountProperty/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseCollectionExpression/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseConfigureAwaitFalseForAsyncDisposable/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseConfigureAwaitFalseForAsyncDisposable/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseFormatSpecifierInFormatString/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseFormatSpecifierInFormatString/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseFormatSpecifierInInterpolation/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseFormatSpecifierInInterpolation/@EntryIndexedValue">WARNING</s:String>
|
||||||
@ -263,6 +267,7 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseObjectOrCollectionInitializer/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseObjectOrCollectionInitializer/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UsePatternMatching/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UsePatternMatching/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseStringInterpolation/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseStringInterpolation/@EntryIndexedValue">WARNING</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UseUtf8StringLiteral/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VariableCanBeMadeConst/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VariableCanBeMadeConst/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VirtualMemberCallInConstructor/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VirtualMemberCallInConstructor/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VirtualMemberNeverOverridden_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VirtualMemberNeverOverridden_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
||||||
|
Loading…
Reference in New Issue
Block a user