/// ------------------------------------------------------------------------------------ /// <summary> /// Saves the XLIFFDocument to the specified XLIFF file. /// </summary> /// ------------------------------------------------------------------------------------ public void Save(string xliffFile) { var retry = true; for (;;) { try { XLiffXmlSerializationHelper.SerializeToFile(xliffFile, this); return; } catch (IOException) { if (retry) { // Maybe the file was locked. Wait and try again. retry = false; Thread.Sleep(20); } else { throw; } } } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Saves the XLIFFDocument to the specified XLIFF file. /// </summary> /// ------------------------------------------------------------------------------------ public void Save(string xliffFile) { XLiffXmlSerializationHelper.SerializeToFile(xliffFile, this); }