public virtual Word AddWord(Word w) { if (!Words.Contains(w)) { var vw = new VocabularyWords(this, w); VwHelper.Add(vw); w.AddVocWords(vw); OnWordsChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, w)); } return(w); }
protected internal virtual void AddVocWords(VocabularyWords vw) { Contract.Requires(vw != null); Contract.Requires(vw.Vocabulary.Words.Contains(this)); VwHelper.Add(vw); }