Wycademy/src/Wycademy/Commands/Services/WeaponInfoService.cs
/// <summary>
/// Search for MHGen weapons matching a given search term.
/// </summary>
/// <param name="searchTerm">The search term to use.</param>
/// <returns>All MHGen weapons that match the given search term.</returns>
Search for MHGen weapons matching a given search term.
Search for MHGen weapons matching a given search term .
public IEnumerable<GenWeaponInfo> SearchGen(string searchTerm)
        {
            var pairs = _genWeapons.Where(p => p.Value.Name.ToLower().Contains(searchTerm.ToLower()) 
                                            || p.Value.FinalName.ToLower().Contains(searchTerm.ToLower()));
            return pairs.Select(p => p.Value).ToList();
        }
public IEnumerable < GenWeaponInfo > SearchGen ( string searchTerm ) { var pairs = _genWeapons . Where ( p => p . Value . Name . ToLower ( ) . Contains ( searchTerm . ToLower ( ) ) || p . Value . FinalName . ToLower ( ) . Contains ( searchTerm . ToLower ( ) ) ) ; return pairs . Select ( p => p . Value ) . ToList ( ) ; }
Search for MHGen weapons matching a given search term.
Search for MHGen weapons matching a given search term .
All MHGen weapons that match the given search term.
All MHGen weapons that match the given search term .
searchTerm
string
The search term to use.
The search term to use .