/// <summary>
 /// Serializes all files except builds to <paramref name="filePath"/>.
 /// </summary>
 public void Serialize(string filePath)
 {
     var stashes = new List<XmlLeagueStash>(_persistentData.LeagueStashes.Select(
         p => new XmlLeagueStash { Name = p.Key, Bookmarks = new List<StashBookmark>(p.Value) }));
     var xmlPersistentData = new XmlPersistentData
     {
         AppVersion = SerializationUtils.AssemblyFileVersion,
         CurrentBuildPath = PathFor(_persistentData.CurrentBuild, false),
         Options = _persistentData.Options,
         SelectedBuildPath = PathFor(_persistentData.SelectedBuild, false),
         StashBookmarks = _persistentData.StashBookmarks.ToList(),
         LeagueStashes = stashes
     };
     SerializationUtils.XmlSerializeToFile(xmlPersistentData, filePath);
     SerializeStash();
 }
        /// <summary>
        /// Serializes all files except builds to <paramref name="filePath"/>.
        /// </summary>
        public void Serialize(string filePath)
        {
            var stashes = new List <XmlLeagueStash>(_persistentData.LeagueStashes.Select(
                                                        p => new XmlLeagueStash {
                Name = p.Key, Bookmarks = new List <StashBookmark>(p.Value)
            }));
            var xmlPersistentData = new XmlPersistentData
            {
                AppVersion        = SerializationUtils.AssemblyFileVersion,
                CurrentBuildPath  = PathFor(_persistentData.CurrentBuild, false),
                Options           = _persistentData.Options,
                SelectedBuildPath = PathFor(_persistentData.SelectedBuild, false),
                StashBookmarks    = _persistentData.StashBookmarks.ToList(),
                LeagueStashes     = stashes
            };

            SerializationUtils.XmlSerialize(xmlPersistentData, filePath);
            SerializeStash();
        }