Exemple #1
0
        /// <summary>
        /// Adds the media to the playlist.
        /// </summary>
        /// <param name="playlistId">The playlist ID that the media will be added to.</param>
        /// <param name="mediaId">The media ID to add to the playlist.</param>
        /// <returns>true if the matched record was found and updated, otherwise false.</returns>
        /// <remarks>The invalid media ID will be ignored.</remarks>
        /// <exception cref="InvalidOperationException">The <see cref="MediaDatabase"/> is disconnected.</exception>
        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed.</exception>
        /// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="mediaId"/> is null.</exception>
        /// <exception cref="ArgumentException"><paramref name="mediaId"/> is a zero-length string, contains only white space.</exception>
        /// <exception cref="ArgumentOutOfRangeException"><paramref name="playlistId"/> is less than or equal to zero.</exception>
        /// <since_tizen> 4 </since_tizen>
        public bool AddMember(int playlistId, string mediaId)
        {
            ValidationUtil.ValidateNotNullOrEmpty(mediaId, nameof(mediaId));

            return(AddMembers(playlistId, new string[] { mediaId }));
        }
Exemple #2
0
        /// <summary>
        /// Removes the media from a tag.
        /// </summary>
        /// <param name="tagId">The tag ID.</param>
        /// <param name="mediaId">The media ID to remove from the tag.</param>
        /// <returns>true if the matched record was found and updated, otherwise false.</returns>
        /// <remarks>The invalid media ID will be ignored.</remarks>
        /// <exception cref="InvalidOperationException">The <see cref="MediaDatabase"/> is disconnected.</exception>
        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
        /// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="mediaId"/> is null.</exception>
        /// <exception cref="ArgumentException"><paramref name="mediaId"/> is a zero-length string, contains only white space.</exception>
        /// <exception cref="ArgumentOutOfRangeException"><paramref name="tagId"/> is less than or equal to zero.</exception>
        /// <since_tizen> 4 </since_tizen>
        public bool RemoveMedia(int tagId, string mediaId)
        {
            ValidationUtil.ValidateNotNullOrEmpty(mediaId, nameof(mediaId));

            return(RemoveMedia(tagId, new string[] { mediaId }));
        }