mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
26 lines
815 B
C#
26 lines
815 B
C#
using System.Reflection;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Dalamud.IoC.Internal;
|
|
|
|
/// <summary>
|
|
/// An object instance registered in the <see cref="ServiceContainer"/>.
|
|
/// </summary>
|
|
internal class ObjectInstance
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="ObjectInstance"/> class.
|
|
/// </summary>
|
|
/// <param name="instanceTask">Weak reference to the underlying instance.</param>
|
|
/// <param name="type">Type of the underlying instance.</param>
|
|
public ObjectInstance(Task<WeakReference> instanceTask, Type type)
|
|
{
|
|
this.InstanceTask = instanceTask;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets a reference to the underlying instance.
|
|
/// </summary>
|
|
/// <returns>The underlying instance.</returns>
|
|
public Task<WeakReference> InstanceTask { get; }
|
|
}
|