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