示例#1
0
        private SearchInformation AddSearch(SearchInformation setting)
        {
            setting.SetNewKey();
            //var key = Guid.NewGuid().ToString();
            //setting.Key = key;

            this.SearchSettings.Add(setting.Key, setting);

            return(setting);
        }
示例#2
0
 /// <summary>
 /// 検索条件をアルバムに登録
 /// </summary>
 /// <param name="item"></param>
 public void MarkSearchFavorite(SearchInformation item)
 {
     if (item == null)
     {
         return;
     }
     if (item.Key.IsNullOrEmpty())
     {
         item.SetNewKey();
         //item.Key = Guid.NewGuid().ToString();
     }
     if (!this.FavoriteSearchList.Any(x => x.Key.Equals(item.Key)))
     {
         item.Name = this.GenerateAlbumName();
         this.FavoriteSearchList.Insert(0, item);
     }
 }