/// <summary> /// Create one. The SDA passed MAY be the DomainDataByFlid of the cache, but it is usually another /// decorator. /// </summary> public DictionaryPublicationDecorator(FdoCache cache, ISilDataAccessManaged domainDataByFlid, int mainFlid, ICmPossibility publication) : base(domainDataByFlid) { Cache = cache; m_entryRepo = Cache.ServiceLocator.GetInstance <ILexEntryRepository>(); m_lexRefRepo = Cache.ServiceLocator.GetInstance <ILexReferenceRepository>(); m_senseRepo = Cache.ServiceLocator.GetInstance <ILexSenseRepository>(); m_lerRepo = Cache.ServiceLocator.GetInstance <ILexEntryRefRepository>(); m_LexDbEntriesFlid = mainFlid; m_headwordFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "HeadWord", false); m_mlHeadwordFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "MLHeadWord", false); m_picsOfSensesFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "PicturesOfSenses", false); m_senseOutlineFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexSenseTags.kClassId, "LexSenseOutline", false); m_mlOwnerOutlineFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexSenseTags.kClassId, "MLOwnerOutlineName", false); m_publishAsMinorEntryFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "PublishAsMinorEntry", false); m_headwordRefFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "HeadWordRef", false); m_headwordReversalFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "ReversalName", false); m_reversalNameFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexSenseTags.kClassId, "ReversalName", false); Publication = publication; BuildExcludedObjects(); BuildFieldsToFilter(); BuildHomographInfo(); }
/// <summary> /// Create one. The SDA passed MAY be the DomainDataByFlid of the cache, but it is usually another /// decorator. /// </summary> /// <param name="cache"></param> /// <param name="domainDataByFlid"></param> public DictionaryPublicationDecorator(FdoCache cache, ISilDataAccessManaged domainDataByFlid, int mainFlid, ICmPossibility publication) : base(domainDataByFlid) { Cache = cache; m_entryRepo = Cache.ServiceLocator.GetInstance<ILexEntryRepository>(); m_lexRefRepo = Cache.ServiceLocator.GetInstance<ILexReferenceRepository>(); m_senseRepo = Cache.ServiceLocator.GetInstance<ILexSenseRepository>(); m_lerRepo = Cache.ServiceLocator.GetInstance<ILexEntryRefRepository>(); m_LexDbEntriesFlid = mainFlid; m_headwordFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "HeadWord", false); m_mlHeadwordFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "MLHeadWord", false); m_picsOfSensesFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "PicturesOfSenses", false); m_senseOutlineFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexSenseTags.kClassId, "LexSenseOutline", false); m_mlOwnerOutlineFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexSenseTags.kClassId, "MLOwnerOutlineName", false); m_publishAsMinorEntryFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "PublishAsMinorEntry", false); m_doNotShowMainEntryInFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "DoNotShowMainEntryIn", false); m_headwordRefFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "HeadWordRef", false); m_headwordReversalFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexEntryTags.kClassId, "HeadWordReversal", false); m_reversalNameFlid = Cache.MetaDataCacheAccessor.GetFieldId2(LexSenseTags.kClassId, "ReversalName", false); Publication = publication; BuildExcludedObjects(); BuildFieldsToFilter(); BuildHomographInfo(); }