Пример #1
0
        /// <summary>Constructor with first message reference</summary>
        public Word(string text, MessageIdentity inmessage, int position)
        {
            _text = text;

            List <int> l = new List <int>();

            l.Add(position);
            _messagePositionCollection.Add(inmessage.ToMessageString(), l);
        }
Пример #2
0
        /// <summary>Add a message referencing this word</summary>
        public void Add(MessageIdentity inmessage, int position)
        {
            var msgid = inmessage.ToMessageString();

            if (_messagePositionCollection.ContainsKey(msgid))
            {
                _messagePositionCollection[msgid].Add(position);
            }
            else
            {
                List <int> l = new List <int>();
                l.Add(position);
                _messagePositionCollection.Add(msgid, l);
            }
        }