Change instance references to be a ulong

This commit is contained in:
Jordan Dominion
2023-10-31 23:16:18 -04:00
parent 29579a351d
commit e1d359d2f7
2 changed files with 8 additions and 3 deletions
@@ -10,6 +10,6 @@ namespace Tgstation.Server.Host.Components
/// <summary>
/// A unique ID for the <see cref="IInstanceReference"/>.
/// </summary>
public Guid Uid { get; }
public ulong Uid { get; }
}
}
@@ -18,8 +18,13 @@ namespace Tgstation.Server.Host.Components
/// </summary>
sealed class InstanceWrapper : ReferenceCounter<IInstance>, IInstanceReference
{
/// <summary>
/// Static counter for <see cref="Uid"/>.
/// </summary>
static ulong instanceWrapperInstances;
/// <inheritdoc />
public Guid Uid { get; }
public ulong Uid { get; }
/// <inheritdoc />
public IRepositoryManager RepositoryManager => Instance.RepositoryManager;
@@ -44,7 +49,7 @@ namespace Tgstation.Server.Host.Components
/// </summary>
public InstanceWrapper()
{
Uid = Guid.NewGuid();
Uid = Interlocked.Increment(ref instanceWrapperInstances);
}
/// <inheritdoc />