mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
chore: Remove the [InterfaceVersion] attribute (#1844)
This commit is contained in:
parent
7ddc5d82ca
commit
0c8c4bfdbf
41 changed files with 20 additions and 164 deletions
|
|
@ -37,6 +37,10 @@
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=236f7aa5_002D7b06_002D43ca_002Dbf2a_002D9b31bfcff09a/@EntryIndexedValue"><Policy><Descriptor Staticness="Any" AccessRightKinds="Private" Description="Constant fields (private)"><ElementKinds><Kind Name="CONSTANT_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue"><Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=669e5282_002Dfb4b_002D4e90_002D91e7_002D07d269d04b60/@EntryIndexedValue"><Policy><Descriptor Staticness="Any" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Constant fields (not private)"><ElementKinds><Kind Name="CONSTANT_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f9fce829_002De6f4_002D4cb2_002D80f1_002D5497c44f51df/@EntryIndexedValue"><Policy><Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></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_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_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
|
@ -46,6 +50,7 @@
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EFormat_002ESettingsUpgrade_002EAlignmentTabFillStyleMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EFormat_002ESettingsUpgrade_002EAlignmentTabFillStyleMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=bannedplugin/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=bannedplugin/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=clientopcode/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=clientopcode/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ namespace Dalamud.Console;
|
||||||
/// Plugin-scoped version of the console service.
|
/// Plugin-scoped version of the console service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IConsole>]
|
[ResolveVia<IConsole>]
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ namespace Dalamud.Data;
|
||||||
/// This class provides data for Dalamud-internal features, but can also be used by plugins if needed.
|
/// This class provides data for Dalamud-internal features, but can also be used by plugins if needed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IDataManager>]
|
[ResolveVia<IDataManager>]
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ namespace Dalamud.Game.Addon.Events;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Service provider for addon event management.
|
/// Service provider for addon event management.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal unsafe class AddonEventManager : IInternalDisposableService
|
internal unsafe class AddonEventManager : IInternalDisposableService
|
||||||
{
|
{
|
||||||
|
|
@ -199,7 +198,6 @@ internal unsafe class AddonEventManager : IInternalDisposableService
|
||||||
/// Plugin-scoped version of a AddonEventManager service.
|
/// Plugin-scoped version of a AddonEventManager service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IAddonEventManager>]
|
[ResolveVia<IAddonEventManager>]
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ namespace Dalamud.Game.Addon.Lifecycle;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class provides events for in-game addon lifecycles.
|
/// This class provides events for in-game addon lifecycles.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal unsafe class AddonLifecycle : IInternalDisposableService
|
internal unsafe class AddonLifecycle : IInternalDisposableService
|
||||||
{
|
{
|
||||||
|
|
@ -386,7 +385,6 @@ internal unsafe class AddonLifecycle : IInternalDisposableService
|
||||||
/// Plugin-scoped version of a AddonLifecycle service.
|
/// Plugin-scoped version of a AddonLifecycle service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IAddonLifecycle>]
|
[ResolveVia<IAddonLifecycle>]
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ namespace Dalamud.Game.ClientState.Aetherytes;
|
||||||
/// This collection represents the list of available Aetherytes in the Teleport window.
|
/// This collection represents the list of available Aetherytes in the Teleport window.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IAetheryteList>]
|
[ResolveVia<IAetheryteList>]
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ namespace Dalamud.Game.ClientState.Buddy;
|
||||||
/// It does not include the local player.
|
/// It does not include the local player.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IBuddyList>]
|
[ResolveVia<IBuddyList>]
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ namespace Dalamud.Game.ClientState;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class represents the state of the game client at the time of access.
|
/// This class represents the state of the game client at the time of access.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed class ClientState : IInternalDisposableService, IClientState
|
internal sealed class ClientState : IInternalDisposableService, IClientState
|
||||||
{
|
{
|
||||||
|
|
@ -203,7 +202,6 @@ internal sealed class ClientState : IInternalDisposableService, IClientState
|
||||||
/// Plugin-scoped version of a GameConfig service.
|
/// Plugin-scoped version of a GameConfig service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IClientState>]
|
[ResolveVia<IClientState>]
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ namespace Dalamud.Game.ClientState.Conditions;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides access to conditions (generally player state). You can check whether a player is in combat, mounted, etc.
|
/// Provides access to conditions (generally player state). You can check whether a player is in combat, mounted, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed class Condition : IInternalDisposableService, ICondition
|
internal sealed class Condition : IInternalDisposableService, ICondition
|
||||||
{
|
{
|
||||||
|
|
@ -138,7 +137,6 @@ internal sealed class Condition : IInternalDisposableService, ICondition
|
||||||
/// Plugin-scoped version of a Condition service.
|
/// Plugin-scoped version of a Condition service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<ICondition>]
|
[ResolveVia<ICondition>]
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ namespace Dalamud.Game.ClientState.Fates;
|
||||||
/// This collection represents the currently available Fate events.
|
/// This collection represents the currently available Fate events.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IFateTable>]
|
[ResolveVia<IFateTable>]
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ namespace Dalamud.Game.ClientState.GamePad;
|
||||||
/// Will block game's gamepad input if <see cref="ImGuiConfigFlags.NavEnableGamepad"/> is set.
|
/// Will block game's gamepad input if <see cref="ImGuiConfigFlags.NavEnableGamepad"/> is set.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IGamepadState>]
|
[ResolveVia<IGamepadState>]
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ namespace Dalamud.Game.ClientState.JobGauge;
|
||||||
/// This class converts in-memory Job gauge data to structs.
|
/// This class converts in-memory Job gauge data to structs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IJobGauges>]
|
[ResolveVia<IJobGauges>]
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ namespace Dalamud.Game.ClientState.Keys;
|
||||||
/// index & 3 = short key press (ephemeral).
|
/// index & 3 = short key press (ephemeral).
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IKeyState>]
|
[ResolveVia<IKeyState>]
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ namespace Dalamud.Game.ClientState.Objects;
|
||||||
/// This collection represents the currently spawned FFXIV game objects.
|
/// This collection represents the currently spawned FFXIV game objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IObjectTable>]
|
[ResolveVia<IObjectTable>]
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ namespace Dalamud.Game.ClientState.Objects;
|
||||||
/// Get and set various kinds of targets for the player.
|
/// Get and set various kinds of targets for the player.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<ITargetManager>]
|
[ResolveVia<ITargetManager>]
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ namespace Dalamud.Game.ClientState.Party;
|
||||||
/// This collection represents the actors present in your party or alliance.
|
/// This collection represents the actors present in your party or alliance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IPartyList>]
|
[ResolveVia<IPartyList>]
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ namespace Dalamud.Game.Command;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class manages registered in-game slash commands.
|
/// This class manages registered in-game slash commands.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed class CommandManager : IInternalDisposableService, ICommandManager
|
internal sealed class CommandManager : IInternalDisposableService, ICommandManager
|
||||||
{
|
{
|
||||||
|
|
@ -176,7 +175,6 @@ internal sealed class CommandManager : IInternalDisposableService, ICommandManag
|
||||||
/// Plugin-scoped version of a AddonLifecycle service.
|
/// Plugin-scoped version of a AddonLifecycle service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<ICommandManager>]
|
[ResolveVia<ICommandManager>]
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ namespace Dalamud.Game.Config;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class represents the game's configuration.
|
/// This class represents the game's configuration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed class GameConfig : IInternalDisposableService, IGameConfig
|
internal sealed class GameConfig : IInternalDisposableService, IGameConfig
|
||||||
{
|
{
|
||||||
|
|
@ -243,7 +242,6 @@ internal sealed class GameConfig : IInternalDisposableService, IGameConfig
|
||||||
/// Plugin-scoped version of a GameConfig service.
|
/// Plugin-scoped version of a GameConfig service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IGameConfig>]
|
[ResolveVia<IGameConfig>]
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ namespace Dalamud.Game.DutyState;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class represents the state of the currently occupied duty.
|
/// This class represents the state of the currently occupied duty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal unsafe class DutyState : IInternalDisposableService, IDutyState
|
internal unsafe class DutyState : IInternalDisposableService, IDutyState
|
||||||
{
|
{
|
||||||
|
|
@ -163,7 +162,6 @@ internal unsafe class DutyState : IInternalDisposableService, IDutyState
|
||||||
/// Plugin scoped version of DutyState.
|
/// Plugin scoped version of DutyState.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IDutyState>]
|
[ResolveVia<IDutyState>]
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ namespace Dalamud.Game;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class represents the Framework of the native game client and grants access to various subsystems.
|
/// This class represents the Framework of the native game client and grants access to various subsystems.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed class Framework : IInternalDisposableService, IFramework
|
internal sealed class Framework : IInternalDisposableService, IFramework
|
||||||
{
|
{
|
||||||
|
|
@ -513,7 +512,6 @@ internal sealed class Framework : IInternalDisposableService, IFramework
|
||||||
/// Plugin-scoped version of a Framework service.
|
/// Plugin-scoped version of a Framework service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IFramework>]
|
[ResolveVia<IFramework>]
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ namespace Dalamud.Game;
|
||||||
/// Class offering cancellation tokens for common gameplay events.
|
/// Class offering cancellation tokens for common gameplay events.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IGameLifecycle>]
|
[ResolveVia<IGameLifecycle>]
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ namespace Dalamud.Game.Gui;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class handles interacting with the native chat UI.
|
/// This class handles interacting with the native chat UI.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui
|
internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui
|
||||||
{
|
{
|
||||||
|
|
@ -419,7 +418,6 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui
|
||||||
/// Plugin scoped version of ChatGui.
|
/// Plugin scoped version of ChatGui.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IChatGui>]
|
[ResolveVia<IChatGui>]
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ namespace Dalamud.Game.Gui.ContextMenu;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class handles interacting with the game's (right-click) context menu.
|
/// This class handles interacting with the game's (right-click) context menu.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextMenu
|
internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextMenu
|
||||||
{
|
{
|
||||||
|
|
@ -497,7 +496,6 @@ original:
|
||||||
/// Plugin-scoped version of a <see cref="ContextMenu"/> service.
|
/// Plugin-scoped version of a <see cref="ContextMenu"/> service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IContextMenu>]
|
[ResolveVia<IContextMenu>]
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ namespace Dalamud.Game.Gui.Dtr;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class used to interface with the server info bar.
|
/// Class used to interface with the server info bar.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed unsafe class DtrBar : IInternalDisposableService, IDtrBar
|
internal sealed unsafe class DtrBar : IInternalDisposableService, IDtrBar
|
||||||
{
|
{
|
||||||
|
|
@ -492,7 +491,7 @@ internal sealed unsafe class DtrBar : IInternalDisposableService, IDtrBar
|
||||||
/// Plugin-scoped version of a AddonEventManager service.
|
/// Plugin-scoped version of a AddonEventManager service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IDtrBar>]
|
[ResolveVia<IDtrBar>]
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ namespace Dalamud.Game.Gui.FlyText;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class facilitates interacting with and creating native in-game "fly text".
|
/// This class facilitates interacting with and creating native in-game "fly text".
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed class FlyTextGui : IInternalDisposableService, IFlyTextGui
|
internal sealed class FlyTextGui : IInternalDisposableService, IFlyTextGui
|
||||||
{
|
{
|
||||||
|
|
@ -273,7 +272,6 @@ internal sealed class FlyTextGui : IInternalDisposableService, IFlyTextGui
|
||||||
/// Plugin scoped version of FlyTextGui.
|
/// Plugin scoped version of FlyTextGui.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IFlyTextGui>]
|
[ResolveVia<IFlyTextGui>]
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ namespace Dalamud.Game.Gui;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A class handling many aspects of the in-game UI.
|
/// A class handling many aspects of the in-game UI.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
|
internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
|
||||||
{
|
{
|
||||||
|
|
@ -516,7 +515,6 @@ internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
|
||||||
/// Plugin-scoped version of a AddonLifecycle service.
|
/// Plugin-scoped version of a AddonLifecycle service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IGameGui>]
|
[ResolveVia<IGameGui>]
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ namespace Dalamud.Game.Gui.PartyFinder;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class handles interacting with the native PartyFinder window.
|
/// This class handles interacting with the native PartyFinder window.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed class PartyFinderGui : IInternalDisposableService, IPartyFinderGui
|
internal sealed class PartyFinderGui : IInternalDisposableService, IPartyFinderGui
|
||||||
{
|
{
|
||||||
|
|
@ -127,7 +126,6 @@ internal sealed class PartyFinderGui : IInternalDisposableService, IPartyFinderG
|
||||||
/// A scoped variant of the PartyFinderGui service.
|
/// A scoped variant of the PartyFinderGui service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IPartyFinderGui>]
|
[ResolveVia<IPartyFinderGui>]
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ namespace Dalamud.Game.Gui.Toast;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class facilitates interacting with and creating native toast windows.
|
/// This class facilitates interacting with and creating native toast windows.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed partial class ToastGui : IInternalDisposableService, IToastGui
|
internal sealed partial class ToastGui : IInternalDisposableService, IToastGui
|
||||||
{
|
{
|
||||||
|
|
@ -378,7 +377,6 @@ internal sealed partial class ToastGui
|
||||||
/// Plugin scoped version of ToastGui.
|
/// Plugin scoped version of ToastGui.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IToastGui>]
|
[ResolveVia<IToastGui>]
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ namespace Dalamud.Game.Inventory;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class provides events for the players in-game inventory.
|
/// This class provides events for the players in-game inventory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal class GameInventory : IInternalDisposableService
|
internal class GameInventory : IInternalDisposableService
|
||||||
{
|
{
|
||||||
|
|
@ -346,7 +345,6 @@ internal class GameInventory : IInternalDisposableService
|
||||||
/// Plugin-scoped version of a GameInventory service.
|
/// Plugin-scoped version of a GameInventory service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IGameInventory>]
|
[ResolveVia<IGameInventory>]
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ namespace Dalamud.Game.Network;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class handles interacting with game network events.
|
/// This class handles interacting with game network events.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal sealed class GameNetwork : IInternalDisposableService, IGameNetwork
|
internal sealed class GameNetwork : IInternalDisposableService, IGameNetwork
|
||||||
{
|
{
|
||||||
|
|
@ -140,7 +139,6 @@ internal sealed class GameNetwork : IInternalDisposableService, IGameNetwork
|
||||||
/// Plugin-scoped version of a AddonLifecycle service.
|
/// Plugin-scoped version of a AddonLifecycle service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IGameNetwork>]
|
[ResolveVia<IGameNetwork>]
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ namespace Dalamud.Game;
|
||||||
/// A SigScanner facilitates searching for memory signatures in a given ProcessModule.
|
/// A SigScanner facilitates searching for memory signatures in a given ProcessModule.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ProvidedService]
|
[ServiceManager.ProvidedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<ISigScanner>]
|
[ResolveVia<ISigScanner>]
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ namespace Dalamud.Hooking.Internal;
|
||||||
/// Plugin-scoped version of service used to create hooks.
|
/// Plugin-scoped version of service used to create hooks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IGameInteropProvider>]
|
[ResolveVia<IGameInteropProvider>]
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ using ImGuiNET;
|
||||||
namespace Dalamud.Interface.ImGuiNotification.Internal;
|
namespace Dalamud.Interface.ImGuiNotification.Internal;
|
||||||
|
|
||||||
/// <summary>Class handling notifications/toasts in ImGui.</summary>
|
/// <summary>Class handling notifications/toasts in ImGui.</summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal class NotificationManager : INotificationManager, IInternalDisposableService
|
internal class NotificationManager : INotificationManager, IInternalDisposableService
|
||||||
{
|
{
|
||||||
|
|
@ -123,7 +122,6 @@ internal class NotificationManager : INotificationManager, IInternalDisposableSe
|
||||||
|
|
||||||
/// <summary>Plugin-scoped version of a <see cref="NotificationManager"/> service.</summary>
|
/// <summary>Plugin-scoped version of a <see cref="NotificationManager"/> service.</summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<INotificationManager>]
|
[ResolveVia<INotificationManager>]
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ namespace Dalamud.Interface.Textures.Internal;
|
||||||
|
|
||||||
/// <summary>Plugin-scoped version of <see cref="TextureManager"/>.</summary>
|
/// <summary>Plugin-scoped version of <see cref="TextureManager"/>.</summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<ITextureProvider>]
|
[ResolveVia<ITextureProvider>]
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ namespace Dalamud.Interface;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class responsible for managing elements in the title screen menu.
|
/// Class responsible for managing elements in the title screen menu.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal class TitleScreenMenu : IServiceType, ITitleScreenMenu
|
internal class TitleScreenMenu : IServiceType, ITitleScreenMenu
|
||||||
{
|
{
|
||||||
|
|
@ -188,7 +187,6 @@ internal class TitleScreenMenu : IServiceType, ITitleScreenMenu
|
||||||
/// Plugin-scoped version of a TitleScreenMenu service.
|
/// Plugin-scoped version of a TitleScreenMenu service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<ITitleScreenMenu>]
|
[ResolveVia<ITitleScreenMenu>]
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
namespace Dalamud.IoC.Internal;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This attribute represents the current version of a module that is loaded in the Service Locator.
|
|
||||||
/// </summary>
|
|
||||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
|
|
||||||
internal class InterfaceVersionAttribute : Attribute
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="InterfaceVersionAttribute"/> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="version">The current version.</param>
|
|
||||||
public InterfaceVersionAttribute(string version)
|
|
||||||
{
|
|
||||||
this.Version = new(version);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the service version.
|
|
||||||
/// </summary>
|
|
||||||
public Version Version { get; }
|
|
||||||
}
|
|
||||||
|
|
@ -16,14 +16,8 @@ internal class ObjectInstance
|
||||||
public ObjectInstance(Task<WeakReference> instanceTask, Type type)
|
public ObjectInstance(Task<WeakReference> instanceTask, Type type)
|
||||||
{
|
{
|
||||||
this.InstanceTask = instanceTask;
|
this.InstanceTask = instanceTask;
|
||||||
this.Version = type.GetCustomAttribute<InterfaceVersionAttribute>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the current version of the instance, if it exists.
|
|
||||||
/// </summary>
|
|
||||||
public InterfaceVersionAttribute? Version { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a reference to the underlying instance.
|
/// Gets a reference to the underlying instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -95,31 +95,18 @@ internal class ServiceContainer : IServiceProvider, IServiceType
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate dependency versions (if they exist)
|
// validate dependency versions (if they exist)
|
||||||
var parameters = ctor.GetParameters().Select(p =>
|
var parameterTypes = ctor.GetParameters().Select(p => p.ParameterType).ToList();
|
||||||
{
|
|
||||||
var parameterType = p.ParameterType;
|
|
||||||
var requiredVersion = p.GetCustomAttribute(typeof(RequiredVersionAttribute)) as RequiredVersionAttribute;
|
|
||||||
return (parameterType, requiredVersion);
|
|
||||||
}).ToList();
|
|
||||||
|
|
||||||
var versionCheck = parameters.All(p => CheckInterfaceVersion(p.requiredVersion, p.parameterType));
|
|
||||||
|
|
||||||
if (!versionCheck)
|
|
||||||
{
|
|
||||||
Log.Error("Failed to create {TypeName}, a RequestedVersion could not be satisfied", objectType.FullName!);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var resolvedParams =
|
var resolvedParams =
|
||||||
await Task.WhenAll(
|
await Task.WhenAll(
|
||||||
parameters
|
parameterTypes
|
||||||
.Select(async p =>
|
.Select(async type =>
|
||||||
{
|
{
|
||||||
var service = await this.GetService(p.parameterType, scopeImpl, scopedObjects);
|
var service = await this.GetService(type, scopeImpl, scopedObjects);
|
||||||
|
|
||||||
if (service == null)
|
if (service == null)
|
||||||
{
|
{
|
||||||
Log.Error("Requested ctor service type {TypeName} was not available (null)", p.parameterType.FullName!);
|
Log.Error("Requested ctor service type {TypeName} was not available (null)", type.FullName!);
|
||||||
}
|
}
|
||||||
|
|
||||||
return service;
|
return service;
|
||||||
|
|
@ -160,31 +147,18 @@ internal class ServiceContainer : IServiceProvider, IServiceType
|
||||||
var objectType = instance.GetType();
|
var objectType = instance.GetType();
|
||||||
|
|
||||||
var props = objectType.GetProperties(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public |
|
var props = objectType.GetProperties(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public |
|
||||||
BindingFlags.NonPublic).Where(x => x.GetCustomAttributes(typeof(PluginServiceAttribute)).Any()).Select(
|
BindingFlags.NonPublic).Where(x => x.GetCustomAttributes(typeof(PluginServiceAttribute)).Any()).ToArray();
|
||||||
propertyInfo =>
|
|
||||||
{
|
|
||||||
var requiredVersion = propertyInfo.GetCustomAttribute(typeof(RequiredVersionAttribute)) as RequiredVersionAttribute;
|
|
||||||
return (propertyInfo, requiredVersion);
|
|
||||||
}).ToArray();
|
|
||||||
|
|
||||||
var versionCheck = props.All(x => CheckInterfaceVersion(x.requiredVersion, x.propertyInfo.PropertyType));
|
|
||||||
|
|
||||||
if (!versionCheck)
|
|
||||||
{
|
|
||||||
Log.Error("Failed to create {TypeName}, a RequestedVersion could not be satisfied", objectType.FullName!);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var prop in props)
|
foreach (var prop in props)
|
||||||
{
|
{
|
||||||
var service = await this.GetService(prop.propertyInfo.PropertyType, scopeImpl, publicScopes);
|
var service = await this.GetService(prop.PropertyType, scopeImpl, publicScopes);
|
||||||
if (service == null)
|
if (service == null)
|
||||||
{
|
{
|
||||||
Log.Error("Requested service type {TypeName} was not available (null)", prop.propertyInfo.PropertyType.FullName!);
|
Log.Error("Requested service type {TypeName} was not available (null)", prop.PropertyType.FullName!);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
prop.propertyInfo.SetValue(instance, service);
|
prop.SetValue(instance, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -199,29 +173,6 @@ internal class ServiceContainer : IServiceProvider, IServiceType
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
object? IServiceProvider.GetService(Type serviceType) => this.GetSingletonService(serviceType);
|
object? IServiceProvider.GetService(Type serviceType) => this.GetSingletonService(serviceType);
|
||||||
|
|
||||||
private static bool CheckInterfaceVersion(RequiredVersionAttribute? requiredVersion, Type parameterType)
|
|
||||||
{
|
|
||||||
// if there's no required version, ignore it
|
|
||||||
if (requiredVersion == null)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// if there's no requested version, ignore it
|
|
||||||
var declVersion = parameterType.GetCustomAttribute<InterfaceVersionAttribute>();
|
|
||||||
if (declVersion == null)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (declVersion.Version == requiredVersion.Version)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
Log.Error(
|
|
||||||
"Requested version {ReqVersion} does not match the implemented version {ImplVersion} for param type {ParamType}",
|
|
||||||
requiredVersion.Version,
|
|
||||||
declVersion.Version,
|
|
||||||
parameterType.FullName!);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task<object?> GetService(Type serviceType, ServiceScopeImpl? scope, object[] scopedObjects)
|
private async Task<object?> GetService(Type serviceType, ServiceScopeImpl? scope, object[] scopedObjects)
|
||||||
{
|
{
|
||||||
if (this.interfaceToTypeMap.TryGetValue(serviceType, out var implementingType))
|
if (this.interfaceToTypeMap.TryGetValue(serviceType, out var implementingType))
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
namespace Dalamud.IoC;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This attribute indicates the version of a service module that is required for the plugin to load.
|
|
||||||
/// </summary>
|
|
||||||
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property)]
|
|
||||||
public class RequiredVersionAttribute : Attribute
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="RequiredVersionAttribute"/> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="version">The required version.</param>
|
|
||||||
public RequiredVersionAttribute(string version)
|
|
||||||
{
|
|
||||||
this.Version = new(version);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the required version.
|
|
||||||
/// </summary>
|
|
||||||
public Version Version { get; }
|
|
||||||
}
|
|
||||||
|
|
@ -13,7 +13,6 @@ namespace Dalamud.Logging;
|
||||||
/// Implementation of <see cref="IPluginLog"/>.
|
/// Implementation of <see cref="IPluginLog"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
|
||||||
[ServiceManager.ScopedService]
|
[ServiceManager.ScopedService]
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<IPluginLog>]
|
[ResolveVia<IPluginLog>]
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ANONYMOUSMETHOD_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ANONYMOUSMETHOD_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue"><Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f9fce829_002De6f4_002D4cb2_002D80f1_002D5497c44f51df/@EntryIndexedValue"><Policy><Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></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_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_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
|
@ -24,4 +26,5 @@
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue