/// <summary>
        /// Initializes a new instance of the <see cref="PlaylistUpdatedEventArgs"/> class.
        /// </summary>
        /// <param name="mode">A value indicating the updated repeat mode.</param>
        /// <param name="name">A value indicating the playlist name.</param>
        /// <param name="playlist">A value indicating the playlist.</param>
        /// <exception cref="ArgumentException"><paramref name="mode"/> is invalid.</exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="name"/> or <paramref name="playlist"/> is null.
        /// </exception>
        /// <since_tizen> 5 </since_tizen>
        public PlaylistUpdatedEventArgs(MediaControlPlaylistMode mode, string name, MediaControlPlaylist playlist)
        {
            ValidationUtil.ValidateEnum(typeof(MediaControlPlaylistMode), mode, nameof(mode));

            Mode     = mode;
            Name     = name ?? throw new ArgumentNullException(nameof(name));
            Playlist = playlist ?? throw new ArgumentNullException(nameof(playlist));
        }
        /// <summary>
        /// Delete playlist.
        /// </summary>
        /// <remarks>Currently, only server can remove the playlist.</remarks>
        /// <param name="playlist">The name of playlist.</param>
        /// <exception cref="ArgumentNullException"><paramref name="playlist"/> is null.</exception>
        /// <exception cref="InvalidOperationException">
        ///     The server is not running .<br/>
        ///     -or-<br/>
        ///     An internal error occurs.
        /// </exception>
        /// <since_tizen> 5 </since_tizen>
        public static void RemovePlaylist(MediaControlPlaylist playlist)
        {
            if (playlist == null)
            {
                throw new ArgumentNullException(nameof(playlist));
            }

            Native.DeletePlaylist(Handle, playlist.Handle);
            playlist.Dispose();
        }