コード例 #1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the in memory fdo cache.
		/// </summary>
		/// <param name="provider">The provider.</param>
		/// ------------------------------------------------------------------------------------
		protected virtual InMemoryFdoCache CreateInMemoryFdoCache(IWsFactoryProvider provider)
		{
			return InMemoryFdoCache.CreateInMemoryFdoCache(this);
		}
コード例 #2
0
ファイル: InMemoryFdoCache.cs プロジェクト: sillsdev/WorldPad
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Create a new in-memory FdoCache. Sets default analysis writing system to English and
		/// default vernacular writing system to French. Hvo for language project is set to
		/// 1.</summary>
		/// <returns>In-memory FdoCache object</returns>
		/// ------------------------------------------------------------------------------------
		public static InMemoryFdoCache CreateInMemoryFdoCache(IWsFactoryProvider provider)
		{
			return new InMemoryFdoCache(provider);
		}
コード例 #3
0
ファイル: InMemoryFdoCache.cs プロジェクト: sillsdev/WorldPad
		/// -----------------------------------------------------------------------------------
		/// <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;
		}
コード例 #4
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the scripture in-memory cache with the specified ws factory provider.
		/// </summary>
		/// <param name="wsFactProvider">The ws fact provider.</param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		public static ScrInMemoryFdoCache Create(IWsFactoryProvider wsFactProvider)
		{
			return new ScrInMemoryFdoCache(wsFactProvider);
		}
コード例 #5
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Creates and initializes new instance of the <see cref="InMemoryFdoCache"/> class.
		/// </summary>
		/// <param name="wsFactProvider"></param>
		/// -----------------------------------------------------------------------------------
		protected ScrInMemoryFdoCache(IWsFactoryProvider wsFactProvider)
			: base(wsFactProvider)
		{
		}
コード例 #6
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the in memory fdo cache.
		/// </summary>
		/// <param name="provider">The provider.</param>
		/// ------------------------------------------------------------------------------------
		protected override InMemoryFdoCache CreateInMemoryFdoCache(IWsFactoryProvider provider)
		{
			m_scrInMemoryCache = (ScrInMemoryFdoCache)ScrInMemoryFdoCache.Create(provider);
			return m_scrInMemoryCache;
		}