コード例 #1
0
 public void AddPlaylist(Playlist playlist)
 {
     using (var tran = _session.BeginTransaction())
     {
         try
         {
             _session.Save(playlist);
             tran.Commit();
             Logger.LogMediafileAdded(playlist.PlaylistName);
         }
         catch (Exception ex)
         {
             Logger.AddToLog("Failed to add media file.", ex);
             tran.Rollback();
         }
     }
 }
コード例 #2
0
ファイル: PlaylistFactory.cs プロジェクト: HolySquad/noname
        public static Playlist CreatePlaylist(string name, string comment)
        {
            var playlist = new Playlist(name, comment);

            return playlist;
        }