/// ------------------------------------------------------------------------------------ /// <summary> /// Creates the meta data cache. /// </summary> /// <param name="mainModelPathname">The main model pathname.</param> /// <returns></returns> /// ------------------------------------------------------------------------------------ public static IFwMetaDataCache CreateMetaDataCache(string mainModelPathname) { var mdc = new MetaDataCache(); mdc.InitXml(mainModelPathname, true); return(mdc); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Creates the meta data cache. /// </summary> /// <param name="mainModelPathname">The main model pathname.</param> /// <returns></returns> /// ------------------------------------------------------------------------------------ public static IFwMetaDataCache CreateMetaDataCache(string mainModelPathname) { var mdc = new MetaDataCache(); mdc.InitXml(mainModelPathname, true); return mdc; }
/// ----------------------------------------------------------------------------------- /// <summary> /// Creates and initializes new instance of the <see cref="InMemoryFdoCache"/> class. /// </summary> /// <param name="wsFactProvider"></param> /// ----------------------------------------------------------------------------------- protected InMemoryFdoCache(IWsFactoryProvider wsFactProvider) { m_fdoCache = new NewFdoCache(); m_fdoCache.TestMode = true; IFwMetaDataCache metaCache = new MetaDataCache(); ((NewFdoCache)m_fdoCache).MetaDataCache = metaCache; LoadMetaData("Cellar"); LoadMetaData("LangProj"); LoadMetaData("Ling"); // create the DB-less cache m_cacheBase = new NewCacheBase(metaCache); ((NewFdoCache)m_fdoCache).DataAccess = m_cacheBase; // create a LgWritingSystemFactory and setup the default WSs ILgWritingSystemFactory wsFactory = wsFactProvider.NewILgWritingSystemFactory; // We don't want InstallLanguage being called in these tests. wsFactory.BypassInstall = true; m_cacheBase.WritingSystemFactory = wsFactory; // only do this if it hasn't been done yet s_wsHvos.En = SetupWs("en"); s_wsHvos.Es = SetupWs("es"); s_wsHvos.De = SetupWs("de"); s_wsHvos.Fr = SetupWs("fr"); s_wsHvos.Ipa = SetupWs("ipa"); s_wsHvos.XKal = SetupWs("xkal"); s_wsHvos.Ur = SetupWs("ur", true); s_wsHvos.Grc = SetupWs("grc"); s_wsHvos.Hbo = SetupWs("hbo", true); ((NewFdoCache)m_fdoCache).WritingSystemFactory = wsFactory; }