protected IReversalIndexEntry CreateReversalIndexEntry(string riForm)
        {
            var            revIndexEntry = m_revIndexEntryFactory.Create();
            var            wsObj         = Cache.LanguageProject.DefaultAnalysisWritingSystem;
            IReversalIndex revIndex      = m_revIndexRepo.FindOrCreateIndexForWs(wsObj.Handle);

            //Add an entry to the Reveral index
            revIndex.EntriesOC.Add(revIndexEntry);
            revIndexEntry.ReversalForm.set_String(wsObj.Handle, Cache.TsStrFactory.MakeString(riForm, wsObj.Handle));
            return(revIndexEntry);
        }
        protected IReversalIndexEntry GetOrCreateReversalIndexEntry(List <ICmObject> addList)
        {
            Assert.IsNotNull(m_revIndexEntryFactory, "Fixture Initialization is not complete.");
            Assert.IsNotNull(m_window, "No window.");

            var revIndexEntry = m_revIndexEntryFactory.Create();

            addList.Add(revIndexEntry);
            return(revIndexEntry);
        }
Beispiel #3
0
        private IReversalIndex CreateInterestingReversalEntries()
        {
            var index = m_revIndexFactory.Create();

            Cache.LangProject.LexDbOA.ReversalIndexesOC.Add(index);
            index.WritingSystem = "en";
            var indexEntry = m_revIndexEntryFactory.Create();

            index.EntriesOC.Add(indexEntry);
            var wsEn = Cache.ServiceLocator.WritingSystemManager.Get("en").Handle;

            indexEntry.ReversalForm.set_String(wsEn, "Reversal Form");
            m_nolanryan.AllSenses[0].ReversalEntriesRC.Add(indexEntry);
            var indexEntry2 = m_revIndexEntryFactory.Create();

            index.EntriesOC.Add(indexEntry2);
            indexEntry2.ReversalForm.set_String(wsEn, "Reversal 2 Form");
            m_water.AllSenses[0].ReversalEntriesRC.Add(indexEntry2);
            var entry2SubentryA = m_revIndexEntryFactory.Create();

            indexEntry2.SubentriesOS.Add(entry2SubentryA);
            entry2SubentryA.ReversalForm.set_String(wsEn, "Reversal 2a Form");
            m_water2.AllSenses[0].ReversalEntriesRC.Add(entry2SubentryA);
            var entry2SubentryB = m_revIndexEntryFactory.Create();

            indexEntry2.SubentriesOS.Add(entry2SubentryB);
            entry2SubentryB.ReversalForm.set_String(wsEn, "Reversal 2b Form");
            m_hotWater.AllSenses[0].ReversalEntriesRC.Add(entry2SubentryB);
            var subsubentry = m_revIndexEntryFactory.Create();

            entry2SubentryB.SubentriesOS.Add(subsubentry);
            subsubentry.ReversalForm.set_String(wsEn, "Reversal 2b || !2b Form");
            m_waterH2O.ReversalEntriesRC.Add(subsubentry);
            var senseLessIndexEntry = m_revIndexEntryFactory.Create();

            index.EntriesOC.Add(senseLessIndexEntry);
            senseLessIndexEntry.ReversalForm.set_String(wsEn, "Reversal Form NoSense");
            return(index);
        }