示例#1
0
        public static string SpecialFolder(SpecialFolders folder)
        {
#if NETCORE
            if (Platform == PlatformFamily.Windows)
            {
                return(Windows.GetFolder(folder));
            }
            if (IsUnix)
            {
                return(Unix.GetFolder(folder));
            }

            throw new NotSupportedException($"Not supported for platform '{Platform}'.");
#else
            return(Environment.GetFolderPath(s_lookup[folder]));
#endif
        }