tgstation-server  4.4.0
The /tg/station 13 server suite
TopicParameters.cs
Go to the documentation of this file.
1 using System;
3 
4 namespace Tgstation.Server.Host.Components.Interop.Topic
5 {
10  {
15  public TopicCommandType? CommandType { get; }
16 
20  public ChatCommand ChatCommand { get; }
21 
26 
30  public ushort? NewPort { get; }
31 
35  public RebootState? NewRebootState { get; }
36 
40  public string NewInstanceName { get; }
41 
45  public ChatUpdate ChatUpdate { get; }
46 
50  public Version NewServerVersion { get; }
51 
56  private TopicParameters(TopicCommandType commandType)
57  {
58  CommandType = commandType;
59  }
60 
65  public TopicParameters(ChatCommand chatCommand)
67  {
68  ChatCommand = chatCommand ?? throw new ArgumentNullException(nameof(chatCommand));
69  }
70 
75  public TopicParameters(EventNotification eventNotification)
77  {
78  EventNotification = eventNotification ?? throw new ArgumentNullException(nameof(eventNotification));
79  }
80 
85  public TopicParameters(ushort newPort)
87  {
88  NewPort = newPort;
89  }
90 
95  public TopicParameters(RebootState newRebootState)
97  {
98  NewRebootState = newRebootState;
99  }
100 
105  public TopicParameters(string newInstanceName)
107  {
108  NewInstanceName = newInstanceName ?? throw new ArgumentNullException(nameof(newInstanceName));
109  }
110 
115  public TopicParameters(ChatUpdate channelsUpdate)
117  {
118  ChatUpdate = channelsUpdate ?? throw new ArgumentNullException(nameof(channelsUpdate));
119  }
120 
126  public TopicParameters(Version newServerVersion, ushort serverPort)
128  {
129  NewServerVersion = newServerVersion ?? throw new ArgumentNullException(nameof(newServerVersion));
130  NewPort = serverPort;
131  }
132 
139  {
140  }
141  }
142 }
TopicParameters(EventNotification eventNotification)
Initializes a new instance of the TopicParameters .
TopicCommandType
The type of topic command being sent.
Represents a chat command to be handled by DD
Definition: ChatCommand.cs:9
Notify the server of a reattach and potentially new version.
RebootState
Represents the action to take when /world/Reboot() is called
Definition: RebootState.cs:6
Data structure for TopicCommandType.EventNotification requests.
TopicParameters(ushort newPort)
Initializes a new instance of the TopicParameters .
TopicParameters(RebootState newRebootState)
Initializes a new instance of the TopicParameters .
TopicParameters(string newInstanceName)
Initializes a new instance of the TopicParameters .
TopicParameters(TopicCommandType commandType)
Initializes a new instance of the TopicParameters .
TopicParameters(Version newServerVersion, ushort serverPort)
Initializes a new instance of the TopicParameters .
TopicParameters(ChatCommand chatCommand)
Initializes a new instance of the TopicParameters .
TopicParameters()
Initializes a new instance of the TopicParameters .
Represents an update of ChannelRepresentations.
Definition: ChatUpdate.cs:11
TopicParameters(ChatUpdate channelsUpdate)
Initializes a new instance of the TopicParameters .