ImportLiftCommon() приватный Метод

Import the lift file using the given MergeStyle: FlexLiftMerger.MergeStyle.MsKeepNew (aka 'merciful', in that all entries from lift file and those in FLEx are retained) FlexLiftMerger.MergeStyle.MsKeepOnlyNew (aka 'merciless', in that the Flex lexicon ends up with the same entries as in the lift file, even if some need to be deleted in FLEx.)
private ImportLiftCommon ( FlexLiftMerger mergeStyle ) : bool
mergeStyle FlexLiftMerger FlexLiftMerger.MergeStyle.MsKeepNew or FlexLiftMerger.MergeStyle.MsKeepOnlyNew
Результат bool
Пример #1
0
        /// <summary>
        /// This is invoked by reflection, due to almost insuperable sphaghetti in the relevant project references,
        /// from ChoooseLangProjectDialog.CreateProjectFromLift().
        /// If you are tempted to rename the method, be sure to do so in ChoooseLangProjectDialog.CreateProjectFromLift(), as well.
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="liftPath"></param>
        /// <param name="parentForm"></param>
        /// <returns></returns>
        public static bool ImportObtainedLexicon(FdoCache cache, string liftPath, Form parentForm)
        {
            var importer = new FLExBridgeListener
            {
                Cache         = cache,
                _liftPathname = liftPath,
                _parentForm   = parentForm
            };

            return(importer.ImportLiftCommon(FlexLiftMerger.MergeStyle.MsKeepNew));            // should be a new project
        }
Пример #2
0
		/// <summary>
		/// This is invoked by reflection, due to almost insuperable sphaghetti in the relevant project references,
		/// from ChoooseLangProjectDialog.CreateProjectFromLift().
		/// If you are tempted to rename the method, be sure to do so in ChoooseLangProjectDialog.CreateProjectFromLift(), as well.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="liftPath"></param>
		/// <param name="parentForm"></param>
		/// <returns></returns>
		public static bool ImportObtainedLexicon(FdoCache cache, string liftPath, Form parentForm)
		{
			using (var importer = new FLExBridgeListener())
			{
				importer.Cache = cache;
				importer._liftPathname = liftPath;
				importer._parentForm = parentForm;
				return importer.ImportLiftCommon(FlexLiftMerger.MergeStyle.MsKeepBoth); // should be a new project
			}
		}