tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
ReattachInformation.cs
Go to the documentation of this file.
1using System;
2
7
9{
14 {
18 public IDmbProvider Dmb { get; set; }
19
23 public IDmbProvider? InitialDmb { get; set; }
24
28 public RuntimeInformation? RuntimeInformation { get; private set; }
29
33 public TimeSpan TopicRequestTimeout { get; }
34
38 readonly object runtimeInformationLock;
39
48 Models.ReattachInformation copy,
49 IDmbProvider dmb,
50 IDmbProvider? initialDmb,
51 TimeSpan topicRequestTimeout)
52 : base(copy)
53 {
54 Dmb = dmb ?? throw new ArgumentNullException(nameof(dmb));
55 InitialDmb = initialDmb;
56 TopicRequestTimeout = topicRequestTimeout;
57
58 runtimeInformationLock = new object();
59 }
60
69 internal ReattachInformation(
70 IDmbProvider dmb,
71 IProcess process,
72 RuntimeInformation runtimeInformation,
73 string accessIdentifier,
74 ushort port)
75 : base(accessIdentifier)
76 {
77 Dmb = dmb ?? throw new ArgumentNullException(nameof(dmb));
78 ProcessId = process?.Id ?? throw new ArgumentNullException(nameof(process));
79 RuntimeInformation = runtimeInformation ?? throw new ArgumentNullException(nameof(runtimeInformation));
80
81 LaunchSecurityLevel = runtimeInformation.SecurityLevel;
82 LaunchVisibility = runtimeInformation.Visibility;
83 Port = port;
84
85 runtimeInformationLock = new object();
86 }
87
92 public void SetRuntimeInformation(RuntimeInformation runtimeInformation)
93 {
94 ArgumentNullException.ThrowIfNull(runtimeInformation);
95
97 {
98 if (RuntimeInformation != null)
99 throw new InvalidOperationException("RuntimeInformation already set!");
100
101 RuntimeInformation = runtimeInformation;
102 }
103 }
104 }
105}
Representation of the initial data passed as part of a BridgeCommandType.Startup request.
DreamDaemonVisibility Visibility
The DreamDaemonSecurity level of the launch.
DreamDaemonSecurity SecurityLevel
The DreamDaemonSecurity level of the launch.
Parameters necessary for duplicating a ISessionController session.
TimeSpan TopicRequestTimeout
The TimeSpan which indicates when topic requests should timeout.
ReattachInformation(Models.ReattachInformation copy, IDmbProvider dmb, IDmbProvider? initialDmb, TimeSpan topicRequestTimeout)
Initializes a new instance of the ReattachInformation class. For use with a given copy and dmb .
void SetRuntimeInformation(RuntimeInformation runtimeInformation)
Set the RuntimeInformation post construction.
IDmbProvider? InitialDmb
The IDmbProvider initially used to launch DreamDaemon. Should be a different IDmbProvider than Dmb....
readonly object runtimeInformationLock
lock object for accessing RuntimeInformation.
IDmbProvider Dmb
The IDmbProvider used by DreamDaemon.
DreamDaemonSecurity LaunchSecurityLevel
The DreamDaemonSecurity level DreamDaemon was launched with.
DreamDaemonVisibility LaunchVisibility
The DreamDaemonVisibility DreamDaemon was launched with.
ushort Port
The port the game server was last listening on.
Provides absolute paths to the latest compiled .dmbs.
Abstraction over a global::System.Diagnostics.Process.
Definition IProcess.cs:11