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:
Blair 2024-06-29 07:05:34 +10:00 committed by GitHub
parent 3994f528b8
commit 7947b896ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 1466 additions and 584 deletions

View file

@ -71,7 +71,7 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable
public int Length => ObjectTableLength;
/// <inheritdoc/>
public GameObject? this[int index]
public IGameObject? this[int index]
{
get
{
@ -82,7 +82,7 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable
}
/// <inheritdoc/>
public GameObject? SearchById(ulong gameObjectId)
public IGameObject? SearchById(ulong gameObjectId)
{
_ = this.WarnMultithreadedUsage();
@ -107,7 +107,7 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable
}
/// <inheritdoc/>
public unsafe GameObject? CreateObjectReference(nint address)
public unsafe IGameObject? CreateObjectReference(nint address)
{
_ = this.WarnMultithreadedUsage();
@ -216,7 +216,7 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable
internal sealed partial class ObjectTable
{
/// <inheritdoc/>
public IEnumerator<GameObject> GetEnumerator()
public IEnumerator<IGameObject> GetEnumerator()
{
// If something's trying to enumerate outside the framework thread, we use the ObjectPool.
if (this.WarnMultithreadedUsage())
@ -246,7 +246,7 @@ internal sealed partial class ObjectTable
/// <inheritdoc/>
IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator();
private sealed class Enumerator : IEnumerator<GameObject>, IResettable
private sealed class Enumerator : IEnumerator<IGameObject>, IResettable
{
private readonly int slotId;
private ObjectTable? owner;
@ -261,7 +261,7 @@ internal sealed partial class ObjectTable
this.slotId = slotId;
}
public GameObject Current { get; private set; } = null!;
public IGameObject Current { get; private set; } = null!;
object IEnumerator.Current => this.Current;