public void StoreMappedId(string id, string mappedId) { var idMatch = new IdMatch { Id = id, ItemName = mappedId, }; _storage.TryAddMatch(idMatch); }
public bool GetMappedId(string id, out string mappedId) { mappedId = null; List <IdMatch> matches = _storage.GetMatches(); IdMatch match = matches.Find(m => string.Equals(m.Id, id, StringComparison.OrdinalIgnoreCase)); if (match != null) { mappedId = match.ItemName; } return(mappedId != null); }
public override int GetHashCode() { int hash = 1; if (IdMatch.Length != 0) { hash ^= IdMatch.GetHashCode(); } if (Quantity != 0) { hash ^= Quantity.GetHashCode(); } if (Person.Length != 0) { hash ^= Person.GetHashCode(); } if (Username.Length != 0) { hash ^= Username.GetHashCode(); } return(hash); }