tgstation-server
5.12.1
The /tg/station 13 server suite
Loading...
Searching...
No Matches
src
Tgstation.Server.Host
System
AssemblyInformationProvider.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Net.Http.Headers;
3
using
System.Reflection;
4
5
using
Tgstation.Server.Api
;
6
7
namespace
Tgstation.Server.Host.System
8
{
10
sealed
class
AssemblyInformationProvider
:
IAssemblyInformationProvider
11
{
13
public
string
VersionPrefix
=>
"tgstation-server"
;
14
16
public
Version
Version
{
get
; }
17
19
public
AssemblyName
AssemblyName
{
get
; }
20
22
public
string
Path
{
get
; }
23
25
public
string
VersionString
{
get
; }
26
28
public
ProductInfoHeaderValue
ProductInfoHeaderValue
=>
new
(
29
VersionPrefix
,
30
Version
.ToString());
31
35
public
AssemblyInformationProvider
()
36
{
37
Assembly assembly = Assembly.GetExecutingAssembly();
38
Path
= assembly.Location;
39
AssemblyName
= assembly.GetName();
40
Version
=
AssemblyName
.Version.Semver();
41
VersionString
= String.Concat(
VersionPrefix
,
"-v"
,
Version
);
42
}
43
}
44
}
Tgstation.Server.Host.System.AssemblyInformationProvider
Definition:
AssemblyInformationProvider.cs:11
Tgstation.Server.Host.System.AssemblyInformationProvider.AssemblyName
AssemblyName AssemblyName
Gets the global::System.Reflection.AssemblyName.
Definition:
AssemblyInformationProvider.cs:19
Tgstation.Server.Host.System.AssemblyInformationProvider.ProductInfoHeaderValue
ProductInfoHeaderValue ProductInfoHeaderValue
The ProductInfoHeaderValue for the assembly.
Definition:
AssemblyInformationProvider.cs:28
Tgstation.Server.Host.System.AssemblyInformationProvider.Path
string Path
Gets the path to the executing assembly.
Definition:
AssemblyInformationProvider.cs:22
Tgstation.Server.Host.System.AssemblyInformationProvider.AssemblyInformationProvider
AssemblyInformationProvider()
Initializes a new instance of the AssemblyInformationProvider class.
Definition:
AssemblyInformationProvider.cs:35
Tgstation.Server.Host.System.AssemblyInformationProvider.VersionPrefix
string VersionPrefix
Prefix to VersionString.
Definition:
AssemblyInformationProvider.cs:13
Tgstation.Server.Host.System.AssemblyInformationProvider.Version
Version Version
The version of the assembly.
Definition:
AssemblyInformationProvider.cs:16
Tgstation.Server.Host.System.AssemblyInformationProvider.VersionString
string VersionString
A more verbose version of Version.
Definition:
AssemblyInformationProvider.cs:25
Tgstation.Server.Host.System.IAssemblyInformationProvider
For retrieving the Assembly's location.
Definition:
IAssemblyInformationProvider.cs:11
Tgstation.Server.Api
Definition:
ApiHeaders.cs:17
Tgstation.Server.Host.System
Definition:
AssemblyInformationProvider.cs:8
Generated by
1.9.5