diff --git a/Dalamud/Interface/Internal/Windows/PluginImageCache.cs b/Dalamud/Interface/Internal/Windows/PluginImageCache.cs index 644165044..634999143 100644 --- a/Dalamud/Interface/Internal/Windows/PluginImageCache.cs +++ b/Dalamud/Interface/Internal/Windows/PluginImageCache.cs @@ -54,8 +54,6 @@ internal class PluginImageCache : IInternalDisposableService private readonly CancellationTokenSource cancelToken = new(); private readonly Task downloadTask; private readonly Task loadTask; - - private record LoadedIcon(IDalamudTextureWrap Texture, DateTime LoadedSince); private readonly ConcurrentDictionary pluginIconMap = new(); private readonly ConcurrentDictionary pluginImagesMap = new(); @@ -701,4 +699,11 @@ internal class PluginImageCache : IInternalDisposableService return output; } + + /// + /// Record for a loaded icon. + /// + /// The texture of the icon. + /// The time the icon was loaded at. + private record LoadedIcon(IDalamudTextureWrap Texture, DateTime LoadedSince); } diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs index 579f8357b..cfe06fca9 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs @@ -125,7 +125,7 @@ internal class ContextMenuAgingStep : IAgingStep private void OnMenuOpened(MenuOpenedArgs args) { - LogMenuOpened(args); + this.LogMenuOpened(args); switch (this.currentSubStep) { diff --git a/Dalamud/IoC/Internal/ServiceContainer.cs b/Dalamud/IoC/Internal/ServiceContainer.cs index 5b141979e..9adf37f85 100644 --- a/Dalamud/IoC/Internal/ServiceContainer.cs +++ b/Dalamud/IoC/Internal/ServiceContainer.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Threading.Tasks; @@ -132,7 +133,7 @@ internal class ServiceContainer : IServiceProvider, IServiceType return null; } - var instance = FormatterServices.GetUninitializedObject(objectType); + var instance = RuntimeHelpers.GetUninitializedObject(objectType); if (!await this.InjectProperties(instance, scopedObjects, scope)) { diff --git a/Dalamud/Memory/Exceptions/MemoryAllocationException.cs b/Dalamud/Memory/Exceptions/MemoryAllocationException.cs index 61f124bad..efa875def 100644 --- a/Dalamud/Memory/Exceptions/MemoryAllocationException.cs +++ b/Dalamud/Memory/Exceptions/MemoryAllocationException.cs @@ -33,14 +33,4 @@ public class MemoryAllocationException : MemoryException : base(message, innerException) { } - - /// - /// Initializes a new instance of the class. - /// - /// The object that holds the serialized data about the exception being thrown. - /// The object that contains contextual information about the source or destination. - protected MemoryAllocationException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } diff --git a/Dalamud/Memory/Exceptions/MemoryException.cs b/Dalamud/Memory/Exceptions/MemoryException.cs index 6cb1b887c..117a13c6b 100644 --- a/Dalamud/Memory/Exceptions/MemoryException.cs +++ b/Dalamud/Memory/Exceptions/MemoryException.cs @@ -33,14 +33,4 @@ public abstract class MemoryException : Exception : base(message, innerException) { } - - /// - /// Initializes a new instance of the class. - /// - /// The object that holds the serialized data about the exception being thrown. - /// The object that contains contextual information about the source or destination. - protected MemoryException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } diff --git a/Dalamud/Memory/Exceptions/MemoryPermissionException.cs b/Dalamud/Memory/Exceptions/MemoryPermissionException.cs index b4dddfc5f..abc749740 100644 --- a/Dalamud/Memory/Exceptions/MemoryPermissionException.cs +++ b/Dalamud/Memory/Exceptions/MemoryPermissionException.cs @@ -33,14 +33,4 @@ public class MemoryPermissionException : MemoryException : base(message, innerException) { } - - /// - /// Initializes a new instance of the class. - /// - /// The object that holds the serialized data about the exception being thrown. - /// The object that contains contextual information about the source or destination. - protected MemoryPermissionException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } diff --git a/Dalamud/Memory/Exceptions/MemoryReadException.cs b/Dalamud/Memory/Exceptions/MemoryReadException.cs index ee02c5473..f0b79075d 100644 --- a/Dalamud/Memory/Exceptions/MemoryReadException.cs +++ b/Dalamud/Memory/Exceptions/MemoryReadException.cs @@ -33,14 +33,4 @@ public class MemoryReadException : MemoryException : base(message, innerException) { } - - /// - /// Initializes a new instance of the class. - /// - /// The object that holds the serialized data about the exception being thrown. - /// The object that contains contextual information about the source or destination. - protected MemoryReadException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } diff --git a/Dalamud/Memory/Exceptions/MemoryWriteException.cs b/Dalamud/Memory/Exceptions/MemoryWriteException.cs index edbf06fdc..87011edd3 100644 --- a/Dalamud/Memory/Exceptions/MemoryWriteException.cs +++ b/Dalamud/Memory/Exceptions/MemoryWriteException.cs @@ -33,14 +33,4 @@ public class MemoryWriteException : MemoryException : base(message, innerException) { } - - /// - /// Initializes a new instance of the class. - /// - /// The object that holds the serialized data about the exception being thrown. - /// The object that contains contextual information about the source or destination. - protected MemoryWriteException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } diff --git a/Dalamud/Plugin/Internal/PluginManager.cs b/Dalamud/Plugin/Internal/PluginManager.cs index 4ef7e8320..792294851 100644 --- a/Dalamud/Plugin/Internal/PluginManager.cs +++ b/Dalamud/Plugin/Internal/PluginManager.cs @@ -146,7 +146,7 @@ internal partial class PluginManager : IInternalDisposableService this.MainRepo = PluginRepository.CreateMainRepo(this.happyHttpClient); // NET8 CHORE - //this.ApplyPatches(); + // this.ApplyPatches(); registerStartupBlocker( Task.Run(this.LoadAndStartLoadSyncPlugins), diff --git a/Dalamud/Utility/RollingList.cs b/Dalamud/Utility/RollingList.cs index 9ca012be4..0f1553bf9 100644 --- a/Dalamud/Utility/RollingList.cs +++ b/Dalamud/Utility/RollingList.cs @@ -93,8 +93,9 @@ namespace Dalamud.Utility this.firstIndex = 0; } } - else // value < this._size + else { + // value < this._size ThrowHelper.ThrowArgumentOutOfRangeExceptionIfLessThan(nameof(value), value, 0); if (value < this.Count) { @@ -156,14 +157,14 @@ namespace Dalamud.Utility } /// Add items to this . - /// Items to add. - public void AddRange(IEnumerable items) + /// Items to add. + public void AddRange(IEnumerable range) { if (this.size == 0) return; - foreach (var item in items) this.Add(item); + foreach (var item in range) this.Add(item); } - /// Removes all elements from the + /// Removes all elements from the . public void Clear() { this.items.Clear();