public void Register(string value) { var existing = Links.FirstOrDefault(i => i.Value == value); if (existing == null) { existing = new ChainLink(value); Links.Add(existing); } existing.Probability++; }
public void Register(string value) { var existing = Links.FirstOrDefault(i => i.Value == value); if (existing == null) { existing = new ChainLink (value); Links.Add (existing); } existing.Probability++; }