mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 13:36:50 +01:00
Change instance references to be a ulong
This commit is contained in:
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user