Abstractions.WindowsApi.pInvokes.GetRegistryLocation C# (CSharp) 메소드

GetRegistryLocation() 공개 정적인 메소드

get RegistryKey from structenums.RegistryLocation
public static GetRegistryLocation ( structenums location ) : RegistryKey
location structenums
리턴 Microsoft.Win32.RegistryKey
        public static RegistryKey GetRegistryLocation(structenums.RegistryLocation location)
        {
            switch (location)
            {
                case structenums.RegistryLocation.HKEY_CLASSES_ROOT:
                    return Registry.ClassesRoot;

                case structenums.RegistryLocation.HKEY_CURRENT_USER:
                    return Registry.CurrentUser;

                case structenums.RegistryLocation.HKEY_LOCAL_MACHINE:
                    return Registry.LocalMachine;

                case structenums.RegistryLocation.HKEY_USERS:
                    return Registry.Users;

                case structenums.RegistryLocation.HKEY_CURRENT_CONFIG:
                    return Registry.CurrentConfig;

                default:
                    return null;
            }
        }