From 210e21977835103df2d4578d50e5d484da55a5a1 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 24 Oct 2019 12:57:07 +1100 Subject: [PATCH] rename get program methods --- Plugins/Wox.Plugin.Program/Programs/Win32.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Plugins/Wox.Plugin.Program/Programs/Win32.cs b/Plugins/Wox.Plugin.Program/Programs/Win32.cs index 87c216bac3..e619662f8e 100644 --- a/Plugins/Wox.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Wox.Plugin.Program/Programs/Win32.cs @@ -317,14 +317,14 @@ namespace Wox.Plugin.Program.Programs { if (root != null) { - programs.AddRange(ProgramsFromRegistryKey(root)); + programs.AddRange(GetProgramsFromRegistry(root)); } } using (var root = Registry.CurrentUser.OpenSubKey(appPaths)) { if (root != null) { - programs.AddRange(ProgramsFromRegistryKey(root)); + programs.AddRange(GetProgramsFromRegistry(root)); } } @@ -336,16 +336,16 @@ namespace Wox.Plugin.Program.Programs return filtered; } - private static IEnumerable ProgramsFromRegistryKey(RegistryKey root) + private static IEnumerable GetProgramsFromRegistry(RegistryKey root) { return root .GetSubKeyNames() - .Select(x => GetProgramRegistryPath(root, x)) + .Select(x => GetProgramPathFromRegistrySubKeys(root, x)) .Distinct() - .Select(x => ProgramFromRegistrySubkey(x)); + .Select(x => GetProgramFromPath(x)); } - private static string GetProgramRegistryPath(RegistryKey root, string subkey) + private static string GetProgramPathFromRegistrySubKeys(RegistryKey root, string subkey) { var path = string.Empty; @@ -365,7 +365,7 @@ namespace Wox.Plugin.Program.Programs return path = path.Trim('"', ' '); } - private static Win32 ProgramFromRegistrySubkey(string path) + private static Win32 GetProgramFromPath(string path) { if (string.IsNullOrEmpty(path)) return new Win32();