Skip to content

Commit ec4d468

Browse files
authored
Seal/abstract/virtual everything (space-wizards#6739)
1 parent 4dfcacb commit ec4d468

File tree

1,771 files changed

+2216
-2164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,771 files changed

+2216
-2164
lines changed

Content.Benchmarks/ColorInterpolateBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Content.Benchmarks
1313
{
1414
[DisassemblyDiagnoser]
15-
public class ColorInterpolateBenchmark
15+
public sealed class ColorInterpolateBenchmark
1616
{
1717
#if NETCOREAPP
1818
private const MethodImplOptions AggressiveOpt = MethodImplOptions.AggressiveOptimization;

Content.Benchmarks/ComponentFetchBenchmark.cs

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Content.Benchmarks
77
{
88
[SimpleJob]
9-
public class ComponentFetchBenchmark
9+
public sealed class ComponentFetchBenchmark
1010
{
1111
[Params(5000)] public int NEnt { get; set; }
1212

@@ -218,39 +218,39 @@ private abstract class BComponent
218218
public EntityUid Uid;
219219
}
220220

221-
private class BComponent1 : BComponent
221+
private sealed class BComponent1 : BComponent
222222
{
223223
}
224224

225-
private class BComponent2 : BComponent
225+
private sealed class BComponent2 : BComponent
226226
{
227227
}
228228

229-
private class BComponent3 : BComponent
229+
private sealed class BComponent3 : BComponent
230230
{
231231
}
232232

233-
private class BComponent4 : BComponent
233+
private sealed class BComponent4 : BComponent
234234
{
235235
}
236236

237-
private class BComponentLookup : BComponent
237+
private sealed class BComponentLookup : BComponent
238238
{
239239
}
240240

241-
private class BComponent6 : BComponent
241+
private sealed class BComponent6 : BComponent
242242
{
243243
}
244244

245-
private class BComponent7 : BComponent
245+
private sealed class BComponent7 : BComponent
246246
{
247247
}
248248

249-
private class BComponent8 : BComponent
249+
private sealed class BComponent8 : BComponent
250250
{
251251
}
252252

253-
private class BComponent9 : BComponent
253+
private sealed class BComponent9 : BComponent
254254
{
255255
}
256256
}

Content.Benchmarks/DependencyInjectBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Content.Benchmarks
66
{
77
// To actually run this benchmark you'll have to make DependencyCollection public so it's accessible.
88
9-
public class DependencyInjectBenchmark
9+
public sealed class DependencyInjectBenchmark
1010
{
1111
[Params(InjectMode.Reflection, InjectMode.DynamicMethod)]
1212
public InjectMode Mode { get; set; }

Content.Benchmarks/DynamicTreeBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Content.Benchmarks
66
{
77
[SimpleJob, MemoryDiagnoser]
8-
public class DynamicTreeBenchmark
8+
public sealed class DynamicTreeBenchmark
99
{
1010
private static readonly Box2[] _aabbs1 =
1111
{

Content.Benchmarks/EntityFetchBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Content.Benchmarks
77
{
88
[SimpleJob]
9-
public class EntityFetchBenchmark
9+
public sealed class EntityFetchBenchmark
1010
{
1111
[Params(1000)] public int N { get; set; }
1212

Content.Benchmarks/EntityManagerGetAllComponents.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Content.Benchmarks
1212
{
13-
public class EntityManagerGetAllComponents
13+
public sealed class EntityManagerGetAllComponents
1414
{
1515
private IEntityManager _entityManager;
1616

@@ -87,7 +87,7 @@ public int Noop()
8787
return count;
8888
}
8989

90-
private class DummyComponent : Component
90+
private sealed class DummyComponent : Component
9191
{
9292
}
9393
}

Content.Benchmarks/NetSerializerIntBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Content.Benchmarks
77
{
88
[SimpleJob]
9-
public class NetSerializerIntBenchmark
9+
public sealed class NetSerializerIntBenchmark
1010
{
1111
private MemoryStream _writeStream;
1212
private MemoryStream _readStream;

Content.Benchmarks/NetSerializerStringBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Content.Benchmarks
1313
// Code for the *Slow and *Unsafe implementations taken from NetSerializer, licensed under the MIT license.
1414

1515
[MemoryDiagnoser]
16-
public class NetSerializerStringBenchmark
16+
public sealed class NetSerializerStringBenchmark
1717
{
1818
private const int StringByteBufferLength = 256;
1919
private const int StringCharBufferLength = 128;

Content.Benchmarks/StereoToMonoBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Content.Benchmarks
55
{
6-
public class StereoToMonoBenchmark
6+
public sealed class StereoToMonoBenchmark
77
{
88
[Params(128, 256, 512)]
99
public int N { get; set; }

Content.Client/AI/ClientAiDebugSystem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace Content.Client.AI
1414
{
1515
#if DEBUG
16-
public class ClientAiDebugSystem : EntitySystem
16+
public sealed class ClientAiDebugSystem : EntitySystem
1717
{
1818
[Dependency] private readonly IEyeManager _eyeManager = default!;
1919

Content.Client/AI/ClientPathfindingDebugSystem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
namespace Content.Client.AI
1717
{
1818
#if DEBUG
19-
public class ClientPathfindingDebugSystem : EntitySystem
19+
public sealed class ClientPathfindingDebugSystem : EntitySystem
2020
{
2121
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
2222
[Dependency] private readonly IEyeManager _eyeManager = default!;

Content.Client/AME/UI/AMEControllerBoundUserInterface.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Content.Client.AME.UI
88
{
99
[UsedImplicitly]
10-
public class AMEControllerBoundUserInterface : BoundUserInterface
10+
public sealed class AMEControllerBoundUserInterface : BoundUserInterface
1111
{
1212
private AMEWindow? _window;
1313

Content.Client/AME/UI/AMEWindow.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Content.Client.AME.UI
1313
{
1414
[GenerateTypedNameReferences]
15-
public partial class AMEWindow : DefaultWindow
15+
public sealed partial class AMEWindow : DefaultWindow
1616
{
1717
public AMEWindow(AMEControllerBoundUserInterface ui)
1818
{

Content.Client/AME/Visualizers/AMEControllerVisualizer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Content.Client.AME.Visualizers
88
{
99
[UsedImplicitly]
10-
public class AMEControllerVisualizer : AppearanceVisualizer
10+
public sealed class AMEControllerVisualizer : AppearanceVisualizer
1111
{
1212
public override void InitializeEntity(EntityUid entity)
1313
{

Content.Client/AME/Visualizers/AMEVisualizer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Content.Client.AME.Visualizers
88
{
99
[UsedImplicitly]
10-
public class AMEVisualizer : AppearanceVisualizer
10+
public sealed class AMEVisualizer : AppearanceVisualizer
1111
{
1212
public override void InitializeEntity(EntityUid entity)
1313
{

Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Content.Client.Access.UI
99
{
10-
public class IdCardConsoleBoundUserInterface : BoundUserInterface
10+
public sealed class IdCardConsoleBoundUserInterface : BoundUserInterface
1111
{
1212
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
1313
[Dependency] private readonly IEntityManager _entityManager = default!;

Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace Content.Client.Access.UI
1414
{
1515
[GenerateTypedNameReferences]
16-
public partial class IdCardConsoleWindow : DefaultWindow
16+
public sealed partial class IdCardConsoleWindow : DefaultWindow
1717
{
1818
private readonly IdCardConsoleBoundUserInterface _owner;
1919

Content.Client/Actions/ActionsSystem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Content.Client.Actions
1313
{
1414
[UsedImplicitly]
15-
public class ActionsSystem : EntitySystem
15+
public sealed class ActionsSystem : EntitySystem
1616
{
1717
[Dependency] private readonly IPlayerManager _playerManager = default!;
1818

Content.Client/Actions/Assignments/ActionAssignments.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Content.Client.Actions.Assignments
99
/// <summary>
1010
/// Tracks and manages the hotbar assignments for actions.
1111
/// </summary>
12-
public class ActionAssignments
12+
public sealed class ActionAssignments
1313
{
1414
// the slots and assignments fields hold client's assignments (what action goes in what slot),
1515
// which are completely client side and independent of what actions they've actually been granted and

Content.Client/Actions/UI/ActionAlertTooltip.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Content.Client.Actions.UI
1111
/// <summary>
1212
/// Tooltip for actions or alerts because they are very similar.
1313
/// </summary>
14-
public class ActionAlertTooltip : PanelContainer
14+
public sealed class ActionAlertTooltip : PanelContainer
1515
{
1616
private const float TooltipTextMaxWidth = 350;
1717

Content.Client/Actions/UI/ActionMenu.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Content.Client.Actions.UI
2727
/// Action selection menu, allows filtering and searching over all possible
2828
/// actions and populating those actions into the hotbar.
2929
/// </summary>
30-
public class ActionMenu : DefaultWindow
30+
public sealed class ActionMenu : DefaultWindow
3131
{
3232
private const string ItemTag = "item";
3333
private const string NotItemTag = "not item";

Content.Client/Actions/UI/ActionMenuItem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Content.Client.Actions.UI
1010
/// <summary>
1111
/// An individual action visible in the action menu.
1212
/// </summary>
13-
public class ActionMenuItem : ContainerButton
13+
public sealed class ActionMenuItem : ContainerButton
1414
{
1515
// shorter than default tooltip delay so user can
1616
// quickly explore what each action is

Content.Client/Actions/UI/ActionSlot.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Content.Client.Actions.UI
2525
/// A slot in the action hotbar. Not extending BaseButton because
2626
/// its needs diverged too much.
2727
/// </summary>
28-
public class ActionSlot : PanelContainer
28+
public sealed class ActionSlot : PanelContainer
2929
{
3030
// shorter than default tooltip delay so user can more easily
3131
// see what actions they've been given

Content.Client/Administration/AdminNameOverlay.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Content.Client.Administration
99
{
10-
internal class AdminNameOverlay : Overlay
10+
internal sealed class AdminNameOverlay : Overlay
1111
{
1212
private readonly AdminSystem _system;
1313
private readonly IEntityManager _entityManager;

Content.Client/Administration/AdminSystem.Menu.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace Content.Client.Administration
2121
{
22-
public partial class AdminSystem
22+
public sealed partial class AdminSystem
2323
{
2424
[Dependency] private readonly INetManager _netManager = default!;
2525
[Dependency] private readonly IInputManager _inputManager = default!;

Content.Client/Administration/AdminSystem.Overlay.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace Content.Client.Administration
77
{
8-
public partial class AdminSystem
8+
public sealed partial class AdminSystem
99
{
1010
[Dependency] private readonly IClientAdminManager _adminManager = default!;
1111
[Dependency] private readonly IEyeManager _eyeManager = default!;

Content.Client/Administration/AdminSystem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Content.Client.Administration
1111
{
12-
public partial class AdminSystem : EntitySystem
12+
public sealed partial class AdminSystem : EntitySystem
1313
{
1414
public event Action<List<PlayerInfo>>? PlayerListChanged;
1515

Content.Client/Administration/AdminVerbSystem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Content.Client.Verbs
99
/// <summary>
1010
/// Client-side admin verb system. These usually open some sort of UIs.
1111
/// </summary>
12-
class AdminVerbSystem : EntitySystem
12+
sealed class AdminVerbSystem : EntitySystem
1313
{
1414
[Dependency] private readonly IClientConGroupController _clientConGroupController = default!;
1515
[Dependency] private readonly IClientConsoleHost _clientConsoleHost = default!;

Content.Client/Administration/BwoinkSystem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Content.Client.Administration
2121
{
2222
[UsedImplicitly]
23-
public class BwoinkSystem : SharedBwoinkSystem
23+
public sealed class BwoinkSystem : SharedBwoinkSystem
2424
{
2525
[Dependency] private readonly IClientAdminManager _adminManager = default!;
2626
[Dependency] private readonly IPlayerManager _playerManager = default!;

Content.Client/Administration/Logs/AdminLogSystem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
namespace Content.Client.Administration.Logs;
44

5-
public class AdminLogSystem : SharedAdminLogSystem
5+
public sealed class AdminLogSystem : SharedAdminLogSystem
66
{
77
}

Content.Client/Administration/Managers/ClientAdminManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Content.Client.Administration.Managers
1313
{
14-
public class ClientAdminManager : IClientAdminManager, IClientConGroupImplementation, IPostInjectInit
14+
public sealed class ClientAdminManager : IClientAdminManager, IClientConGroupImplementation, IPostInjectInit
1515
{
1616
[Dependency] private readonly IClientNetManager _netMgr = default!;
1717
[Dependency] private readonly IClientConGroupController _conGroup = default!;

Content.Client/Administration/Managers/GamePrototypeLoadManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Content.Client.Administration.Managers;
1010

11-
public class GamePrototypeLoadManager : IGamePrototypeLoadManager
11+
public sealed class GamePrototypeLoadManager : IGamePrototypeLoadManager
1212
{
1313
[Dependency] private readonly IClientNetManager _netManager = default!;
1414
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;

Content.Client/Administration/UI/AdminAnnounceWindow.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace Content.Client.Administration.UI
1111
{
1212
[GenerateTypedNameReferences]
13-
public partial class AdminAnnounceWindow : DefaultWindow
13+
public sealed partial class AdminAnnounceWindow : DefaultWindow
1414
{
1515
[Dependency] private readonly ILocalizationManager _localization = default!;
1616

Content.Client/Administration/UI/AdminMenuWindow.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Content.Client.Administration.UI
1010
{
1111
[GenerateTypedNameReferences]
12-
public partial class AdminMenuWindow : DefaultWindow
12+
public sealed partial class AdminMenuWindow : DefaultWindow
1313
{
1414
[Dependency] private readonly IGameHud? _gameHud = default!;
1515

Content.Client/Administration/UI/AdminMenuWindowEui.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Content.Client.Administration.UI
66
{
7-
public class AdminAnnounceEui : BaseEui
7+
public sealed class AdminAnnounceEui : BaseEui
88
{
99
private readonly AdminAnnounceWindow _window;
1010

Content.Client/Administration/UI/BwoinkWindow.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Content.Client.Administration.UI
1919
/// This window connects to a BwoinkSystem channel. BwoinkSystem manages the rest.
2020
/// </summary>
2121
[GenerateTypedNameReferences]
22-
public partial class BwoinkWindow : DefaultWindow
22+
public sealed partial class BwoinkWindow : DefaultWindow
2323
{
2424
[Dependency] private readonly IClientAdminManager _adminManager = default!;
2525
[Dependency] private readonly IClientConsoleHost _console = default!;

Content.Client/Administration/UI/CustomControls/AdminLogImpactButton.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Content.Client.Administration.UI.CustomControls;
66

7-
public class AdminLogImpactButton : Button
7+
public sealed class AdminLogImpactButton : Button
88
{
99
public AdminLogImpactButton(LogImpact impact)
1010
{

Content.Client/Administration/UI/CustomControls/AdminLogLabel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Content.Client.Administration.UI.CustomControls;
66

7-
public class AdminLogLabel : RichTextLabel
7+
public sealed class AdminLogLabel : RichTextLabel
88
{
99
public AdminLogLabel(ref SharedAdminLog log, HSeparator separator)
1010
{

0 commit comments

Comments
 (0)