Environment.WinRT.cs 796 B

123456789101112131415161718192021222324
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System.IO;
  5. using Internal.Runtime.Augments;
  6. namespace System
  7. {
  8. public static partial class Environment
  9. {
  10. public static string UserName => "Windows User";
  11. public static string UserDomainName => "Windows Domain";
  12. private static string GetFolderPathCore(SpecialFolder folder, SpecialFolderOption option)
  13. {
  14. WinRTInteropCallbacks callbacks = WinRTInterop.UnsafeCallbacks;
  15. return callbacks != null && callbacks.IsAppxModel() ?
  16. callbacks.GetFolderPath(folder, option) :
  17. null;
  18. }
  19. }
  20. }