tgstation-server  4.4.0
The /tg/station 13 server suite
RuntimeInformation.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
7 
8 namespace Tgstation.Server.Host.Components.Interop.Bridge
9 {
13  public sealed class RuntimeInformation : ChatUpdate
14  {
18  public Version ServerVersion { get; }
19 
23  public ushort ServerPort { get; }
24 
28  public bool ApiValidateOnly { get; }
29 
33  public string InstanceName { get; }
34 
38  public Api.Models.Internal.RevisionInformation Revision { get; }
39 
43  public DreamDaemonSecurity? SecurityLevel { get; }
44 
48  public IReadOnlyCollection<TestMergeInformation> TestMerges { get; }
49 
62  IAssemblyInformationProvider assemblyInformationProvider,
63  IServerPortProvider serverPortProvider,
64  IEnumerable<TestMergeInformation> testMerges,
65  IEnumerable<Chat.ChannelRepresentation> chatChannels,
66  Api.Models.Instance instance,
67  Api.Models.Internal.RevisionInformation revision,
68  DreamDaemonSecurity? securityLevel,
69  bool apiValidateOnly)
70  : base(chatChannels)
71  {
72  ServerVersion = assemblyInformationProvider?.Version ?? throw new ArgumentNullException(nameof(assemblyInformationProvider));
73  ServerPort = serverPortProvider?.HttpApiPort ?? throw new ArgumentNullException(nameof(serverPortProvider));
74  TestMerges = testMerges?.ToList() ?? throw new ArgumentNullException(nameof(testMerges));
75  InstanceName = instance?.Name ?? throw new ArgumentNullException(nameof(instance));
76  Revision = revision ?? throw new ArgumentNullException(nameof(revision));
77  SecurityLevel = securityLevel;
78  ApiValidateOnly = apiValidateOnly;
79  }
80  }
81 }
ushort HttpApiPort
The port the server listens on.
Representation of the initial data passed as part of a BridgeCommandType.Startup request.
RuntimeInformation(IAssemblyInformationProvider assemblyInformationProvider, IServerPortProvider serverPortProvider, IEnumerable< TestMergeInformation > testMerges, IEnumerable< Chat.ChannelRepresentation > chatChannels, Api.Models.Instance instance, Api.Models.Internal.RevisionInformation revision, DreamDaemonSecurity?securityLevel, bool apiValidateOnly)
Initializes a new instance of the RuntimeInformation .
DreamDaemonSecurity
DreamDaemon&#39;s security level
Provides access to the server&#39;s HttpApiPort.
Represents an update of ChannelRepresentations.
Definition: ChatUpdate.cs:11