mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 23:37:44 +01:00
Add interfaces to non public/sealed classes referenced in public interfaces (#1808)
* Add interfaces to non public/sealed classes referenced in public interfaces * Fixed inheritdocs + made most classes internal * Add missing properties to IFate and Fate, fix documentation --------- Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
This commit is contained in:
parent
3994f528b8
commit
7947b896ea
55 changed files with 1466 additions and 584 deletions
|
|
@ -77,7 +77,7 @@ internal sealed unsafe class DtrBar : IInternalDisposableService, IDtrBar
|
|||
public IReadOnlyList<IReadOnlyDtrBarEntry> Entries => this.entries;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public DtrBarEntry Get(string title, SeString? text = null)
|
||||
public IDtrBarEntry Get(string title, SeString? text = null)
|
||||
{
|
||||
if (this.entries.Any(x => x.Title == title) || this.newEntries.Any(x => x.Title == title))
|
||||
throw new ArgumentException("An entry with the same title already exists.");
|
||||
|
|
@ -501,7 +501,7 @@ internal class DtrBarPluginScoped : IInternalDisposableService, IDtrBar
|
|||
[ServiceManager.ServiceDependency]
|
||||
private readonly DtrBar dtrBarService = Service<DtrBar>.Get();
|
||||
|
||||
private readonly Dictionary<string, DtrBarEntry> pluginEntries = new();
|
||||
private readonly Dictionary<string, IDtrBarEntry> pluginEntries = new();
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IReadOnlyList<IReadOnlyDtrBarEntry> Entries => this.dtrBarService.Entries;
|
||||
|
|
@ -518,7 +518,7 @@ internal class DtrBarPluginScoped : IInternalDisposableService, IDtrBar
|
|||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public DtrBarEntry Get(string title, SeString? text = null)
|
||||
public IDtrBarEntry Get(string title, SeString? text = null)
|
||||
{
|
||||
// If we already have a known entry for this plugin, return it.
|
||||
if (this.pluginEntries.TryGetValue(title, out var existingEntry)) return existingEntry;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue