public void StoreNameMatch(string id, string searchName, string OnlineName) { var onlineMatch = new SimpleNameMatch { Id = id, ItemName = searchName, OnlineName = OnlineName, }; _storage.TryAddMatch(onlineMatch); }
public bool GetNameMatch(string name, out string id) { id = null; List <SimpleNameMatch> matches = _storage.GetMatches(); SimpleNameMatch match = matches.Find(m => string.Equals(m.ItemName, name, StringComparison.OrdinalIgnoreCase) || string.Equals(m.OnlineName, name, StringComparison.OrdinalIgnoreCase)); if (match != null) { id = match.Id; } return(id != null); }