/// <summary>
/// Retrieves data about multiple verbs (executable commands) from the registry.
/// </summary>
/// <param name="typeKey">The registry key containing information about the file type / protocol the verbs belong to.</param>
/// <param name="commandMapper">Provides best-match command-line to <see cref="Command"/> mapping.</param>
/// <returns>A list of detected <see cref="Verb"/>.</returns>
private static IEnumerable <Verb> GetVerbs(RegistryKey typeKey, CommandMapper commandMapper)
{
#region Sanity checks
if (typeKey == null)
{
throw new ArgumentNullException(nameof(typeKey));
}
if (commandMapper == null)
{
throw new ArgumentNullException(nameof(commandMapper));
}
#endregion
return(RegUtils.GetSubKeyNames(typeKey, "shell").Select(verbName => GetVerb(typeKey, commandMapper, verbName)).WhereNotNull());
}