예제 #1
0
        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++;
        }
예제 #2
0
        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++;
        }