Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
VersionString
string
System.OperatingSystem.VersionString
get
Definition at line
23
of file
OperatingSystem.cs
.
24
{
25
get
26
{
27
if
(
_versionString
==
null
)
28
{
29
string
value
=
_platform
switch
30
{
31
PlatformID.Win32S
=>
"Microsoft Win32S "
,
32
PlatformID.Win32Windows
=> (
_version.Major
> 4 || (
_version.Major
== 4 &&
_version.Minor
> 0)) ?
"Microsoft Windows 98 "
:
"Microsoft Windows 95 "
,
33
PlatformID.Win32NT
=>
"Microsoft Windows NT "
,
34
PlatformID.WinCE
=>
"Microsoft Windows CE "
,
35
PlatformID.Unix
=>
"Unix "
,
36
PlatformID.Xbox
=>
"Xbox "
,
37
PlatformID.MacOSX
=>
"Mac OS X "
,
38
PlatformID.Other
=>
"Other "
,
39
_
=>
"<unknown> "
,
40
};
41
Span<char>
span
=
stackalloc
char
[128];
42
string
versionString
;
43
if
(!
string
.IsNullOrEmpty(
_servicePack
))
44
{
45
IFormatProvider
formatProvider
=
null
;
46
IFormatProvider
provider
=
formatProvider
;
47
Span<char>
span2
=
span
;
48
Span<char>
initialBuffer
=
span2
;
49
DefaultInterpolatedStringHandler
handler =
new
DefaultInterpolatedStringHandler
(1, 3,
formatProvider
,
span2
);
50
handler.
AppendFormatted
(
value
);
51
handler.
AppendFormatted
(
_version
.
ToString
(3));
52
handler.
AppendLiteral
(
" "
);
53
handler.
AppendFormatted
(
_servicePack
);
54
versionString
=
string
.Create(
provider
,
initialBuffer
,
ref
handler);
55
}
56
else
57
{
58
IFormatProvider
formatProvider
=
null
;
59
IFormatProvider
provider2
=
formatProvider
;
60
Span<char>
span2
=
span
;
61
Span<char>
initialBuffer2
=
span2
;
62
DefaultInterpolatedStringHandler
handler2
=
new
DefaultInterpolatedStringHandler
(0, 2,
formatProvider
,
span2
);
63
handler2
.AppendFormatted(
value
);
64
handler2
.AppendFormatted(
_version
);
65
versionString
=
string
.Create(
provider2
,
initialBuffer2
,
ref
handler2
);
66
}
67
_versionString
=
versionString
;
68
}
69
return
_versionString
;
70
}
71
}
System.OperatingSystem._versionString
string _versionString
Definition
OperatingSystem.cs:15
System.OperatingSystem._servicePack
readonly string _servicePack
Definition
OperatingSystem.cs:13
System.OperatingSystem._version
readonly Version _version
Definition
OperatingSystem.cs:9
System.OperatingSystem._platform
readonly PlatformID _platform
Definition
OperatingSystem.cs:11
System.Version.ToString
override string ToString()
Definition
Version.cs:220
System.Runtime.Serialization.CollectionKind.Dictionary
@ Dictionary
System.ExceptionArgument.value
@ value
System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendLiteral
void AppendLiteral(string value)
Definition
DefaultInterpolatedStringHandler.cs:78
System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendFormatted
void AppendFormatted(ReadOnlySpan< char > value)
Definition
DefaultInterpolatedStringHandler.cs:210
System.Runtime.CompilerServices.DefaultInterpolatedStringHandler
Definition
DefaultInterpolatedStringHandler.cs:10
Referenced by
System.OperatingSystem.ToString()
.
System
OperatingSystem
Generated by
1.10.0