tgstation-server 6.19.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
InstanceManagerExtensions.cs
Go to the documentation of this file.
1using System;
2
5
7{
12 {
19 public static IInstanceReference? GetInstanceReference(this IInstanceManager instanceManager, Api.Models.Instance metadata)
20 {
21 ArgumentNullException.ThrowIfNull(instanceManager);
22 return instanceManager.GetInstanceReference(metadata.Require(x => x.Id));
23 }
24 }
25}
static ? IInstanceReference GetInstanceReference(this IInstanceManager instanceManager, Api.Models.Instance metadata)
Get the IInstanceReference associated with given metadata .
IInstanceReference? GetInstanceReference(long instanceId)
Get the IInstanceReference associated with given instanceId .