tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
DMApiConstants.cs
Go to the documentation of this file.
1using System;
2
3using Newtonsoft.Json;
4using Newtonsoft.Json.Serialization;
5
9
11{
15 static class DMApiConstants
16 {
20 public const string ParamApiVersion = "server_service_version";
21
25 public const string ParamServerPort = "tgs_port";
26
30 public const string ParamAccessIdentifier = "tgs_key";
31
35 public const string TopicData = "tgs_data";
36
41 public const uint MaximumBridgeRequestLength = 8198;
42
46 public const uint MaximumTopicRequestLength = 65528;
47
51 public const uint MaximumTopicResponseLength = 65529;
52
56 public static readonly Version InteropVersion = Version.Parse(MasterVersionsAttribute.Instance.RawInteropVersion);
57
61 public static readonly JsonSerializerSettings SerializerSettings = new()
62 {
63 ContractResolver = new DefaultContractResolver
64 {
65 NamingStrategy = new CamelCaseNamingStrategy(),
66 },
67 Converters = new JsonConverter[]
68 {
69 new VersionConverter(),
70 new BoolConverter(),
71 },
72 DefaultValueHandling = DefaultValueHandling.Ignore,
73 ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
74 };
75 }
76}
Constants used for communication with the DMAPI.
const uint MaximumTopicResponseLength
The maximum length in bytes of a Byond.TopicSender.ITopicClient response.
const uint MaximumBridgeRequestLength
The maximum length of a BYOND side bridge request URL.
static readonly JsonSerializerSettings SerializerSettings
JsonSerializerSettings for use when communicating with the DMAPI.
const string ParamServerPort
Identifies the Core.IServerPortProvider.HttpApiPort of the server.
const string ParamAccessIdentifier
Identifies the DMApiParameters.AccessIdentifier for the session.
const uint MaximumTopicRequestLength
The maximum length in bytes of a Byond.TopicSender.ITopicClient payload.
const string ParamApiVersion
Identifies a DMAPI execution with the version as the value.
static readonly Version InteropVersion
The DMAPI InteropVersion being used.
const string TopicData
Parameter json is encoded in for topic requests.
JsonConverter for decoding bools returned by BYOND.
Attribute for bringing in the master versions list from MSBuild that aren't embedded into assemblies ...
string RawInteropVersion
The Version string of the DMAPI interop version used.
static MasterVersionsAttribute Instance
Return the Assembly's instance of the MasterVersionsAttribute.
JsonConverter and IYamlTypeConverter for serializing global::System.Versions in semver format.