@@ -96,20 +96,21 @@ public class OsBrandStringHelper
96
96
{ "10.0.17763" , "10 Redstone 5 [1809, October 2018 Update]" } ,
97
97
{ "10.0.18362" , "10 19H1 [1903, May 2019 Update]" } ,
98
98
{ "10.0.18363" , "10 19H2 [1909, November 2019 Update]" } ,
99
- { "10.0.19041" , "10 20H1 [2004, May 2020 Update]" }
99
+ { "10.0.19041" , "10 20H1 [2004, May 2020 Update]" } ,
100
+ { "10.0.19042" , "10 20H2 [20H2, October 2020 Update]" }
100
101
} ;
101
102
102
103
private class Windows10Version
103
104
{
104
- private int Version { get ; }
105
+ private string Version { get ; }
105
106
[ NotNull ] private string CodeName { get ; }
106
107
[ NotNull ] private string MarketingName { get ; }
107
108
private int BuildNumber { get ; }
108
109
109
110
[ NotNull ] private string ShortifiedCodeName => CodeName . Replace ( " " , "" ) ;
110
111
[ NotNull ] private string ShortifiedMarketingName => MarketingName . Replace ( " " , "" ) ;
111
112
112
- private Windows10Version ( int version , [ NotNull ] string codeName , [ NotNull ] string marketingName , int buildNumber )
113
+ private Windows10Version ( string version , [ NotNull ] string codeName , [ NotNull ] string marketingName , int buildNumber )
113
114
{
114
115
Version = version ;
115
116
CodeName = codeName ;
@@ -124,21 +125,24 @@ private string ToFullVersion([CanBeNull] int? ubr = null)
124
125
// When people past in on GitHub, it can be a reason of an ugly horizontal scrollbar.
125
126
// To avoid this, we are trying to minimize this line and use the minimum possible number of characters.
126
127
public string ToPrettifiedString ( [ CanBeNull ] int ? ubr )
127
- => $ "{ ToFullVersion ( ubr ) } ({ Version } /{ ShortifiedMarketingName } /{ ShortifiedCodeName } )";
128
+ => Version == ShortifiedCodeName
129
+ ? $ "{ ToFullVersion ( ubr ) } ({ Version } /{ ShortifiedMarketingName } )"
130
+ : $ "{ ToFullVersion ( ubr ) } ({ Version } /{ ShortifiedMarketingName } /{ ShortifiedCodeName } )";
128
131
129
132
// See https://en.wikipedia.org/wiki/Windows_10_version_history
130
133
private static readonly List < Windows10Version > WellKnownVersions = new List < Windows10Version >
131
134
{
132
- new Windows10Version ( 1507 , "Threshold 1" , "RTM" , 10240 ) ,
133
- new Windows10Version ( 1511 , "Threshold 2" , "November Update" , 10586 ) ,
134
- new Windows10Version ( 1607 , "Redstone 1" , "Anniversary Update" , 14393 ) ,
135
- new Windows10Version ( 1703 , "Redstone 2" , "Creators Update" , 15063 ) ,
136
- new Windows10Version ( 1709 , "Redstone 3" , "Fall Creators Update" , 16299 ) ,
137
- new Windows10Version ( 1803 , "Redstone 4" , "April 2018 Update" , 17134 ) ,
138
- new Windows10Version ( 1809 , "Redstone 5" , "October 2018 Update" , 17763 ) ,
139
- new Windows10Version ( 1903 , "19H1" , "May 2019 Update" , 18362 ) ,
140
- new Windows10Version ( 1909 , "19H2" , "November 2019 Update" , 18363 ) ,
141
- new Windows10Version ( 2004 , "20H1" , "May 2020 Update" , 19041 )
135
+ new Windows10Version ( "1507" , "Threshold 1" , "RTM" , 10240 ) ,
136
+ new Windows10Version ( "1511" , "Threshold 2" , "November Update" , 10586 ) ,
137
+ new Windows10Version ( "1607" , "Redstone 1" , "Anniversary Update" , 14393 ) ,
138
+ new Windows10Version ( "1703" , "Redstone 2" , "Creators Update" , 15063 ) ,
139
+ new Windows10Version ( "1709" , "Redstone 3" , "Fall Creators Update" , 16299 ) ,
140
+ new Windows10Version ( "1803" , "Redstone 4" , "April 2018 Update" , 17134 ) ,
141
+ new Windows10Version ( "1809" , "Redstone 5" , "October 2018 Update" , 17763 ) ,
142
+ new Windows10Version ( "1903" , "19H1" , "May 2019 Update" , 18362 ) ,
143
+ new Windows10Version ( "1909" , "19H2" , "November 2019 Update" , 18363 ) ,
144
+ new Windows10Version ( "2004" , "20H1" , "May 2020 Update" , 19041 ) ,
145
+ new Windows10Version ( "20H2" , "20H2" , "October 2020 Update" , 19042 ) ,
142
146
} ;
143
147
144
148
[ CanBeNull ]
@@ -202,7 +206,8 @@ private MacOSXVersion(int darwinVersion, [NotNull] string codeName)
202
206
new MacOSXVersion ( 16 , "Sierra" ) ,
203
207
new MacOSXVersion ( 17 , "High Sierra" ) ,
204
208
new MacOSXVersion ( 18 , "Mojave" ) ,
205
- new MacOSXVersion ( 19 , "Catalina" )
209
+ new MacOSXVersion ( 19 , "Catalina" ) ,
210
+ new MacOSXVersion ( 20 , "Big Sur" )
206
211
} ;
207
212
208
213
[ CanBeNull ]
0 commit comments