示例#1
0
        static FileInfoHelper()
        {
#if NETCF
            Helper = new GenericFileInfoHelper();
#else
            if (PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.Windows) ||
                PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.WindowsNT))
            {
                Helper = new Win32FileInfoHelper();
            }
            else
            {
                Helper = new GenericFileInfoHelper();
            }
#endif
        }
示例#2
0
        /// <summary>
        /// Initializes static members of the FileInfoHelper class.
        /// </summary>
        static FileInfoHelper()
        {
#if NET_CF || SILVERLIGHT
            Helper = new PortableFileInfoHelper();
#else
            if (PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.Windows) ||
                PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.WindowsNT))
            {
                Helper = new Win32FileInfoHelper();
            }
            else
            {
                Helper = new PortableFileInfoHelper();
            }
#endif
        }
示例#3
0
        /// <summary>
        /// Initializes static members of the ThreadIDHelper class.
        /// </summary>
        static ThreadIDHelper()
        {
#if NET_CF
            Instance = new Win32ThreadIDHelper();
#else
            if (PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.Windows) ||
                PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.WindowsCE) ||
                PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.WindowsNT))
            {
                Instance = new Win32ThreadIDHelper();
            }
            else
            {
                Instance = new PortableThreadIDHelper();
            }
#endif
        }