Ejemplo n.º 1
0
        private static void Detect()
        {
            OperatingSystem os = Environment.OSVersion;

            switch (os.Platform)
            {
            case PlatformID.Win32NT:
                Version v = os.Version;
                if (v.Major < 5)
                {
                    impl = DataProtectionImplementation.Unsupported;
                }
                else
                {
                    // Windows 2000 (5.0) and later
                    impl = DataProtectionImplementation.Win32CryptoProtect;
                }
                break;

            case PlatformID.Unix:
                impl = DataProtectionImplementation.ManagedProtection;
                break;

            default:
                impl = DataProtectionImplementation.Unsupported;
                break;
            }
        }
Ejemplo n.º 2
0
        private static void Detect()
        {
            OperatingSystem os = Environment.OSVersion;

            switch (os.Platform)
            {
            case PlatformID.Unix:
                impl = DataProtectionImplementation.ManagedProtection;
                break;

            case PlatformID.Win32NT:
            default:
                impl = DataProtectionImplementation.Unsupported;
                break;
            }
        }
Ejemplo n.º 3
0
		private static void Detect ()
		{
			OperatingSystem os = Environment.OSVersion;
			switch (os.Platform) {
			case PlatformID.Win32NT:
				Version v = os.Version;
				if (v.Major < 5) {
					impl = DataProtectionImplementation.Unsupported;
				} else {
					// Windows 2000 (5.0) and later
					impl = DataProtectionImplementation.Win32CryptoProtect;
				}
				break;
			case PlatformID.Unix:
				impl = DataProtectionImplementation.ManagedProtection;
				break;
			default:
				impl = DataProtectionImplementation.Unsupported;
				break;
			}
		}