/// <summary> /// Save MRU list to XML file. /// </summary> /// <param name="path"></param> /// <param name="VM"></param> public static void Save(string path, IMRUListViewModel VM) { try { XmlSerializerUtil.Save <MRUList>(path, ConvertToModel(VM)); } catch { throw; } }
/// <summary> /// Save MRU list to XML file in an awaitable fashion. /// </summary> /// <param name="path"></param> /// <param name="VM"></param> /// <returns></returns> public static Task <bool> SaveAsync(string path, IMRUListViewModel VM) { return(Task.Run(() => { try { XmlSerializerUtil.Save <MRUList>(path, ConvertToModel(VM)); return true; } catch { throw; } })); }