* Use new Lock objects
* Fix CA1513: Use ObjectDisposedException.ThrowIf
* Fix CA1860: Avoid using 'Enumerable.Any()' extension method
* Fix IDE0028: Use collection initializers or expressions
* Fix CA2263: Prefer generic overload when type is known
* Fix CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
* Fix IDE0270: Null check can be simplified
* Fix IDE0280: Use 'nameof'
* Fix IDE0009: Add '.this'
* Fix IDE0007: Use 'var' instead of explicit type
* Fix IDE0062: Make local function static
* Fix CA1859: Use concrete types when possible for improved performance
* Fix IDE0066: Use switch expression
Only applied to where it doesn't look horrendous.
* Use is over switch
* Fix CA1847: Use String.Contains(char) instead of String.Contains(string) with single characters
* Fix SYSLIB1045: Use 'GeneratedRegexAttribute' to generate the regular expression implementation at compile-time.
* Fix CA1866: Use 'string.EndsWith(char)' instead of 'string.EndsWith(string)' when you have a string with a single char
* Fix IDE0057: Substring can be simplified
* Fix IDE0059: Remove unnecessary value assignment
* Fix CA1510: Use ArgumentNullException throw helper
* Fix IDE0300: Use collection expression for array
* Fix IDE0250: Struct can be made 'readonly'
* Fix IDE0018: Inline variable declaration
* Fix CA1850: Prefer static HashData method over ComputeHash
* Fi CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'
* Update ModuleLog instantiations
* Organize usings
* Add additional dtr click events
* Let's just break things and make them really nice
* Add additional dtr click events
* Let's just break things and make them really nice
* Add additional dtr click events
* Let's just break things and make them really nice
* git is stupid
* Documentation fixing
* GameGui uses CS methods now
Co-authored-by: Infi <infiziert@protonmail.ch>
* Shove even more things over to CS
* Clean up NetworkHandlers too
* bump cs so things build at least
---------
Co-authored-by: Infi <infiziert@protonmail.ch>
genericizes the way WorkingPluginId is accessed away from the manifest, since we probably don't want to have it there in the future for regular plugins either
* wip
* hacky fix for overlapping event text in profiler
* move IsResumeGameAfterPluginLoad logic to PluginManager
* fix some warnings
* handle exceptions properly
* remove ability to cancel, rename button to "hide" instead
* undo Dalamud.Service refactor for now
* warnings
* add explainer, show which plugins are still loading
* add some text if loading takes more than 3 minutes
* undo wrong CS merge
* Add IInternal/PublicDisposableService
Plugins are exposed interfaces that are not inherited from
`IDisposable`, but services implementing plugin interfaces often
implement `IDisposable`. Some plugins may try to call
`IDisposable.Dispose` on everything provided, and it also is possible to
use `using` clause too eagerly while working on Dalamud itself, such as
writing `using var smth = await Service<SomeService>.GetAsync();`. Such
behaviors often lead to a difficult-to-debug errors, and making those
services either not an `IDisposable` or making `IDisposable.Dispose` do
nothing if the object has been loaded would prevent such errors. As
`ServiceManager` must be the only class dealing with construction and
disposal of services, `IInternalDisposableService` has been added to
limit who can dispose the object. `IPublicDisposableService` also has
been added to classes that can be constructed and accessed directly by
plugins; for those, `Dispose` will be ignored if the instance is a
service instance, and only `DisposeService` will respond.
In addition, `DalamudPluginInterface` and `UiBuilder` also have been
changed so that their `IDisposable.Dispose` no longer respond, and
instead, internal functions have been added to only allow disposal from
Dalamud.
* Cleanup
* Postmerge fixes
* More explanation on RunOnFrameworkThread(ClearHooks)
* Mark ReliableFileStorage public ctor obsolete
---------
Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
* Accommodate nested AddonLifecycle event calls
The game is free to call event handlers of another addon from one addon,
but the previous code was written under the assumption that only one
function may be called at a time. This changes the recycled addon args
into pooled args.
* Always clear addon name cache
* Actually make AddonEventManager thread safe
* Ensure AddonEventHandlers are also thread safe
Additionally, use Guid instead of strings
* Make DalamudInternalKey readonly
* Properly use ConcurrentDict features
Fixes GUID not working