@@ -173,7 +173,10 @@ public static class ClientPlatformExtensions
173173 const ClientPlatform Platform_Windows =
174174 ClientPlatform . Win32X86 |
175175 ClientPlatform . Win32X64 |
176- ClientPlatform . Win32Arm64 |
176+ ClientPlatform . Win32Arm64 ;
177+
178+ const ClientPlatform Platform_WindowsStore =
179+ Platform_Windows |
177180 ClientPlatform . Win32StoreX86 |
178181 ClientPlatform . Win32StoreX64 |
179182 ClientPlatform . Win32StoreArm64 ;
@@ -228,7 +231,10 @@ public static class ClientPlatformExtensions
228231 ClientPlatform . AndroidPhoneX86 |
229232 ClientPlatform . AndroidPadX86 |
230233 ClientPlatform . AndroidTVX86 |
231- ClientPlatform . UWPX86 |
234+ ClientPlatform . UWPX86 ;
235+
236+ const ClientPlatform ArchitectureStoreFlags_X86 =
237+ ArchitectureFlags_X86 |
232238 ClientPlatform . Win32StoreX86 ;
233239
234240 // 32 位 ARM 处理器体系结构
@@ -249,6 +255,10 @@ public static class ClientPlatformExtensions
249255 ClientPlatform . UWPX64 |
250256 ClientPlatform . Win32StoreX64 ;
251257
258+ const ClientPlatform ArchitectureStoreFlags_X64 =
259+ ArchitectureFlags_X64 |
260+ ClientPlatform . Win32StoreX64 ;
261+
252262 // 64 位 ARM 处理器体系结构
253263 const ClientPlatform ArchitectureFlags_Arm64 =
254264 ClientPlatform . Win32Arm64 |
@@ -261,7 +271,10 @@ public static class ClientPlatformExtensions
261271 ClientPlatform . tvOSArm64 |
262272 ClientPlatform . AndroidPadArm64 |
263273 ClientPlatform . AndroidWearArm64 |
264- ClientPlatform . AndroidTVArm64 |
274+ ClientPlatform . AndroidTVArm64 ;
275+
276+ const ClientPlatform ArchitectureStoreFlags_Arm64 =
277+ ArchitectureFlags_Arm64 |
265278 ClientPlatform . UWPArm64 |
266279 ClientPlatform . Win32StoreArm64 ;
267280
@@ -299,9 +312,6 @@ public static class ClientPlatformExtensions
299312 ClientPlatform . Win32X86 |
300313 ClientPlatform . Win32X64 |
301314 ClientPlatform . Win32Arm64 |
302- ClientPlatform . Win32StoreX86 |
303- ClientPlatform . Win32StoreX64 |
304- ClientPlatform . Win32StoreArm64 |
305315 ClientPlatform . UWPX86 |
306316 ClientPlatform . UWPX64 |
307317 ClientPlatform . UWPArm64 |
@@ -311,6 +321,10 @@ public static class ClientPlatformExtensions
311321 ClientPlatform . LinuxArm64 |
312322 ClientPlatform . LinuxArm ;
313323
324+ const ClientPlatform DeviceIdiom_DesktopStore =
325+ DeviceIdiom_Desktop |
326+ Platform_WindowsStore ;
327+
314328 // 电视
315329 const ClientPlatform DeviceIdiom_TV =
316330 ClientPlatform . tvOSArm64 |
@@ -367,31 +381,31 @@ public static DeviceIdiom ToDeviceIdiom(this ClientPlatform source)
367381 return result != default ? result : DeviceIdiom . Unknown ;
368382 }
369383
370- public static ClientPlatform ToClientPlatform ( this ArchitectureFlags source )
384+ public static ClientPlatform ToClientPlatform ( this ArchitectureFlags source , bool isStore = true )
371385 {
372386 ClientPlatform result = default ;
373387 foreach ( var item in Enum2 . FlagsSplit ( source ) )
374388 {
375389 result |= item switch
376390 {
377- ArchitectureFlags . Arm64 => ArchitectureFlags_Arm64 ,
378- ArchitectureFlags . X86 => ArchitectureFlags_X86 ,
391+ ArchitectureFlags . Arm64 => isStore ? ArchitectureStoreFlags_Arm64 : ArchitectureFlags_Arm64 ,
392+ ArchitectureFlags . X86 => isStore ? ArchitectureStoreFlags_X86 : ArchitectureFlags_X86 ,
379393 ArchitectureFlags . Arm => ArchitectureFlags_Arm ,
380- ArchitectureFlags . X64 => ArchitectureFlags_X64 ,
394+ ArchitectureFlags . X64 => isStore ? ArchitectureStoreFlags_X64 : ArchitectureFlags_X64 ,
381395 _ => default ,
382396 } ;
383397 }
384398 return result ;
385399 }
386400
387- public static ClientPlatform ToClientPlatform ( this Platform source )
401+ public static ClientPlatform ToClientPlatform ( this Platform source , bool isStore = true )
388402 {
389403 ClientPlatform result = default ;
390404 foreach ( var item in Enum2 . FlagsSplit ( source ) )
391405 {
392406 result |= item switch
393407 {
394- Platform . Windows => Platform_Windows ,
408+ Platform . Windows => isStore ? Platform_WindowsStore : Platform_Windows ,
395409 Platform . Linux => Platform_Linux ,
396410 Platform . Android => Platform_Android ,
397411 Platform . Apple => Platform_Apple ,
@@ -402,7 +416,7 @@ public static ClientPlatform ToClientPlatform(this Platform source)
402416 return result ;
403417 }
404418
405- public static ClientPlatform ToClientPlatform ( this DeviceIdiom source )
419+ public static ClientPlatform ToClientPlatform ( this DeviceIdiom source , bool isStore = true )
406420 {
407421 ClientPlatform result = default ;
408422 foreach ( var item in Enum2 . FlagsSplit ( source ) )
@@ -412,7 +426,7 @@ public static ClientPlatform ToClientPlatform(this DeviceIdiom source)
412426 DeviceIdiom . TV => DeviceIdiom_TV ,
413427 DeviceIdiom . Phone => DeviceIdiom_Phone ,
414428 DeviceIdiom . Tablet => DeviceIdiom_Tablet ,
415- DeviceIdiom . Desktop => DeviceIdiom_Desktop ,
429+ DeviceIdiom . Desktop => isStore ? DeviceIdiom_DesktopStore : DeviceIdiom_Desktop ,
416430 DeviceIdiom . Watch => DeviceIdiom_Watch ,
417431 _ => default
418432 } ;
0 commit comments