OpenTween.MySpecialPath.GetRegistryPath C# (CSharp) Method

GetRegistryPath() private static method

private static GetRegistryPath ( RegistryKey key ) : RegistryKey
key Microsoft.Win32.RegistryKey
return Microsoft.Win32.RegistryKey
        private static RegistryKey GetRegistryPath(RegistryKey key)
        {
            // パスを取得
            string basePath;
            if (key == Registry.LocalMachine)
            {
                basePath = "SOFTWARE";
            }
            else
            {
                basePath = "Software";
            }
            var path = string.Format(@"{0}\{1}\{2}",
                basePath,
                Application.CompanyName,
                Application.ProductName);
            // パスのレジストリ・キーの取得(および作成)
            return key.CreateSubKey(path);
        }