tgstation-server
6.12.0
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.Common
;
6
using
Tgstation.Server.Common.Extensions
;
7
8
namespace
Tgstation.Server.Host.System
9
{
11
sealed
class
AssemblyInformationProvider
:
IAssemblyInformationProvider
12
{
14
public
string
VersionPrefix
=>
Constants
.
CanonicalPackageName
;
15
17
public
Version
Version
{
get
; }
18
20
public
AssemblyName
AssemblyName
{
get
; }
21
23
public
string
Path
{
get
; }
24
26
public
string
VersionString
{
get
; }
27
29
public
ProductInfoHeaderValue
ProductInfoHeaderValue
=>
new
(
30
VersionPrefix
,
31
Version
.ToString());
32
36
public
AssemblyInformationProvider
()
37
{
38
Assembly assembly = Assembly.GetExecutingAssembly();
39
Path
= assembly.Location;
40
AssemblyName
= assembly.GetName();
41
Version
=
AssemblyName
.Version!.Semver();
42
VersionString
= String.Concat(
VersionPrefix
,
"-v"
,
Version
);
43
}
44
}
45
}
Tgstation.Server.Common.Constants
Constant values.
Definition
Constants.cs:7
Tgstation.Server.Common.Constants.CanonicalPackageName
const string CanonicalPackageName
The name of the project.
Definition
Constants.cs:11
Tgstation.Server.Host.System.AssemblyInformationProvider
Definition
AssemblyInformationProvider.cs:12
Tgstation.Server.Host.System.AssemblyInformationProvider.AssemblyName
AssemblyName AssemblyName
Gets the global::System.Reflection.AssemblyName.
Definition
AssemblyInformationProvider.cs:20
Tgstation.Server.Host.System.AssemblyInformationProvider.ProductInfoHeaderValue
ProductInfoHeaderValue ProductInfoHeaderValue
The ProductInfoHeaderValue for the assembly.
Definition
AssemblyInformationProvider.cs:29
Tgstation.Server.Host.System.AssemblyInformationProvider.Path
string Path
Gets the path to the executing assembly.
Definition
AssemblyInformationProvider.cs:23
Tgstation.Server.Host.System.AssemblyInformationProvider.AssemblyInformationProvider
AssemblyInformationProvider()
Initializes a new instance of the AssemblyInformationProvider class.
Definition
AssemblyInformationProvider.cs:36
Tgstation.Server.Host.System.AssemblyInformationProvider.VersionPrefix
string VersionPrefix
Prefix to VersionString.
Definition
AssemblyInformationProvider.cs:14
Tgstation.Server.Host.System.AssemblyInformationProvider.Version
Version Version
The version of the assembly.
Definition
AssemblyInformationProvider.cs:17
Tgstation.Server.Host.System.AssemblyInformationProvider.VersionString
string VersionString
A more verbose version of Version.
Definition
AssemblyInformationProvider.cs:26
Tgstation.Server.Host.System.IAssemblyInformationProvider
For retrieving the Assembly's location.
Definition
IAssemblyInformationProvider.cs:11
Tgstation.Server.Common.Extensions
Definition
ValueTaskExtensions.cs:7
Tgstation.Server.Common
Definition
Constants.cs:2
Tgstation.Server.Host.System
Definition
AssemblyInformationProvider.cs:9
Generated by
1.9.8