///<summary>
        /// Returns an instance of an ldml in folder writing system reposistory.
        ///</summary>
        ///<param name="basePath">base location of the global writing system repository</param>
        ///<param name="migrationHandler">Callback if during the initialization any writing system id's are changed</param>
        ///<param name="loadProblemHandler">Callback if during the initialization any writing systems cannot be loaded</param>
        ///<param name="compatibilityMode"></param>
        public static LdmlInFolderWritingSystemRepository Initialize(
            string basePath,
            LdmlVersion0MigrationStrategy.MigrationHandler migrationHandler,
            WritingSystemLoadProblemHandler loadProblemHandler,
            WritingSystemCompatibility compatibilityMode
            )
        {
            var migrator = new LdmlInFolderWritingSystemRepositoryMigrator(basePath, migrationHandler, compatibilityMode);

            migrator.Migrate();

            var instance = new LdmlInFolderWritingSystemRepository(basePath, compatibilityMode);

            instance.LoadAllDefinitions();

            // Call the loadProblemHandler with both migration problems and load problems
            var loadProblems = new List <WritingSystemRepositoryProblem>();

            loadProblems.AddRange(migrator.MigrationProblems);
            loadProblems.AddRange(instance.LoadProblems);
            if (loadProblems.Count > 0 && loadProblemHandler != null)
            {
                loadProblemHandler(loadProblems);
            }

            return(instance);
        }
		///<summary>
		/// Returns an instance of an ldml in folder writing system reposistory.
		///</summary>
		///<param name="basePath">base location of the global writing system repository</param>
		///<param name="migrationHandler">Callback if during the initialization any writing system id's are changed</param>
		///<param name="loadProblemHandler">Callback if during the initialization any writing systems cannot be loaded</param>
		///<param name="compatibilityMode"></param>
		public static LdmlInFolderWritingSystemRepository Initialize(
			string basePath,
			LdmlVersion0MigrationStrategy.MigrationHandler migrationHandler,
			WritingSystemLoadProblemHandler loadProblemHandler,
			WritingSystemCompatibility compatibilityMode
		)
		{
			var migrator = new LdmlInFolderWritingSystemRepositoryMigrator(basePath, migrationHandler, compatibilityMode);
			migrator.Migrate();

			var instance = new LdmlInFolderWritingSystemRepository(basePath, compatibilityMode);
			instance.LoadAllDefinitions();

			// Call the loadProblemHandler with both migration problems and load problems
			var loadProblems = new List<WritingSystemRepositoryProblem>();
			loadProblems.AddRange(migrator.MigrationProblems);
			loadProblems.AddRange(instance.LoadProblems);
			if (loadProblems.Count > 0 && loadProblemHandler != null)
			{
				loadProblemHandler(loadProblems);
			}

			return instance;
		}
			public TestEnvironment(string id1, string id2)
			{
				WritingSystemRepository = new LdmlInFolderWritingSystemRepository(WritingSystemsPath, WritingSystemCompatibility.Flex7V0Compatible);
				_file = _folder.GetNewTempFile(true);
				File.WriteAllText(_file.Path, String.Format("|{0}||{0}||{1}|", id1, id2));
			}