@@ -96,20 +96,21 @@ public class OsBrandStringHelper
9696 { "10.0.17763" , "10 Redstone 5 [1809, October 2018 Update]" } ,
9797 { "10.0.18362" , "10 19H1 [1903, May 2019 Update]" } ,
9898 { "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]" }
100101 } ;
101102
102103 private class Windows10Version
103104 {
104- private int Version { get ; }
105+ private string Version { get ; }
105106 [ NotNull ] private string CodeName { get ; }
106107 [ NotNull ] private string MarketingName { get ; }
107108 private int BuildNumber { get ; }
108109
109110 [ NotNull ] private string ShortifiedCodeName => CodeName . Replace ( " " , "" ) ;
110111 [ NotNull ] private string ShortifiedMarketingName => MarketingName . Replace ( " " , "" ) ;
111112
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 )
113114 {
114115 Version = version ;
115116 CodeName = codeName ;
@@ -124,21 +125,24 @@ private string ToFullVersion([CanBeNull] int? ubr = null)
124125 // When people past in on GitHub, it can be a reason of an ugly horizontal scrollbar.
125126 // To avoid this, we are trying to minimize this line and use the minimum possible number of characters.
126127 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 } )";
128131
129132 // See https://en.wikipedia.org/wiki/Windows_10_version_history
130133 private static readonly List < Windows10Version > WellKnownVersions = new List < Windows10Version >
131134 {
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 ) ,
142146 } ;
143147
144148 [ CanBeNull ]
@@ -202,7 +206,8 @@ private MacOSXVersion(int darwinVersion, [NotNull] string codeName)
202206 new MacOSXVersion ( 16 , "Sierra" ) ,
203207 new MacOSXVersion ( 17 , "High Sierra" ) ,
204208 new MacOSXVersion ( 18 , "Mojave" ) ,
205- new MacOSXVersion ( 19 , "Catalina" )
209+ new MacOSXVersion ( 19 , "Catalina" ) ,
210+ new MacOSXVersion ( 20 , "Big Sur" )
206211 } ;
207212
208213 [ CanBeNull ]
0 commit comments