Exemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public MoMorphTypeCollection(FdoCache fdoCache)
        {
            Debug.Assert(fdoCache != null);
            m_fdoCache = fdoCache;

            List <IMoMorphType> al = new List <IMoMorphType>();

            foreach (IMoMorphType mt in m_fdoCache.LangProject.LexDbOA.MorphTypesOA.ReallyReallyAllPossibilities)
            {
                al.Add(mt);
            }
            if (al.Count < kmtLimit)
            {
                AddMissingMorphTypes(al, fdoCache);
            }
            Debug.Assert(al.Count == kmtLimit);
            InnerList.Capacity = kmtLimit;
            for (int i = 0; i < kmtLimit; ++i)
            {
                InnerList.Add(null);
            }
            foreach (IMoMorphType mmt in al)
            {
                InnerList[MoMorphType.FindMorphTypeIndex(fdoCache, mmt)] = mmt;
            }
        }