tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
ApiVersionAttribute.cs
Go to the documentation of this file.
1using System;
2using System.Reflection;
3
5{
9 [AttributeUsage(AttributeTargets.Assembly)]
11 {
15 public static ApiVersionAttribute Instance => Assembly
16 .GetExecutingAssembly()
17 .GetCustomAttribute<ApiVersionAttribute>();
18
22 public string RawApiVersion { get; }
23
29 string rawApiVersion)
30 {
31 RawApiVersion = rawApiVersion ?? throw new ArgumentNullException(nameof(rawApiVersion));
32 }
33 }
34}
Attribute for bringing in the HTTP API version from MSBuild.
ApiVersionAttribute(string rawApiVersion)
Initializes a new instance of the ApiVersionAttribute class.
static ApiVersionAttribute Instance
Return the Assembly's instance of the ApiVersionAttribute.
string RawApiVersion
The Version string of the TGS API definition.