示例#1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Now that L10NSharp creates all writable Xliff/Tmx files under LocalApplicationData
        /// instead of the common/shared AppData folder, applications can use this method to
        /// purge old Xliff/Tmx files.</summary>
        /// <param name="appId">ID of the application used for creating the Xliff/Tmx files
        /// (typically the same ID passed as the 2nd parameter to LocalizationManagerInternal.Create).
        /// </param>
        /// <param name="directoryOfWritableTranslationFiles">Folder from which to delete
        /// Xliff/Tmx files.</param>
        /// <param name="directoryOfInstalledTranslationFiles">Used to limit file deletion to only
        /// include copies of the installed Xliff/Tmx files (plus the generated default file). If
        /// this is <c>null</c>, then all Xliff/Tmx files for the given appID will be deleted from
        /// <paramref name="directoryOfWritableTranslationFiles"/></param>
        /// ------------------------------------------------------------------------------------
        public static void DeleteOldTranslationFiles(string appId,
                                                     string directoryOfWritableTranslationFiles, string directoryOfInstalledTranslationFiles)
        {
            switch (TranslationMemoryKind)
            {
            case TranslationMemory.XLiff:
                XLiffLocalizationManager.DeleteOldXliffFiles(appId,
                                                             directoryOfWritableTranslationFiles,
                                                             directoryOfInstalledTranslationFiles);
                break;

            default:
                TMXLocalizationManager.DeleteOldTmxFiles(appId,
                                                         directoryOfWritableTranslationFiles,
                                                         directoryOfInstalledTranslationFiles);
                break;
            }
        }
示例#2
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Now that L10NSharp creates all writable Xliff files under LocalApplicationData
 /// instead of the common/shared AppData folder, applications can use this method to
 /// purge old Xliff files.</summary>
 /// <param name="appId">ID of the application used for creating the Xliff files (typically
 /// the same ID passed as the 2nd parameter to LocalizationManagerInternal.Create).</param>
 /// <param name="directoryOfWritableXliffFiles">Folder from which to delete Xliff files.
 /// </param>
 /// <param name="directoryOfInstalledXliffFiles">Used to limit file deletion to only
 /// include copies of the installed Xliff files (plus the generated default file). If this
 /// is <c>null</c>, then all Xliff files for the given appID will be deleted from
 /// <paramref name="directoryOfWritableXliffFiles"/></param>
 /// ------------------------------------------------------------------------------------
 public static void DeleteOldXliffFiles(string appId, string directoryOfWritableXliffFiles,
                                        string directoryOfInstalledXliffFiles)
 {
     XLiffLocalizationManager.DeleteOldXliffFiles(appId, directoryOfWritableXliffFiles,
                                                  directoryOfInstalledXliffFiles);
 }