< Summary - Jellyfin

Information
Class: Jellyfin.Data.Entities.Libraries.MediaFileStream
Assembly: Jellyfin.Data
File(s): /srv/git/jellyfin/Jellyfin.Data/Entities/Libraries/MediaFileStream.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 50
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
OnSavingChanges()100%210%

File(s)

/srv/git/jellyfin/Jellyfin.Data/Entities/Libraries/MediaFileStream.cs

#LineLine coverage
 1#pragma warning disable CA1711 // Identifiers should not have incorrect suffix
 2
 3using System.ComponentModel.DataAnnotations;
 4using System.ComponentModel.DataAnnotations.Schema;
 5using Jellyfin.Data.Interfaces;
 6
 7namespace Jellyfin.Data.Entities.Libraries
 8{
 9    /// <summary>
 10    /// An entity representing a stream in a media file.
 11    /// </summary>
 12    public class MediaFileStream : IHasConcurrencyToken
 13    {
 14        /// <summary>
 15        /// Initializes a new instance of the <see cref="MediaFileStream"/> class.
 16        /// </summary>
 17        /// <param name="streamNumber">The number of this stream.</param>
 18        public MediaFileStream(int streamNumber)
 19        {
 020            StreamNumber = streamNumber;
 021        }
 22
 23        /// <summary>
 24        /// Gets the id.
 25        /// </summary>
 26        /// <remarks>
 27        /// Identity, Indexed, Required.
 28        /// </remarks>
 29        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 30        public int Id { get; private set; }
 31
 32        /// <summary>
 33        /// Gets or sets the stream number.
 34        /// </summary>
 35        /// <remarks>
 36        /// Required.
 37        /// </remarks>
 38        public int StreamNumber { get; set; }
 39
 40        /// <inheritdoc />
 41        [ConcurrencyCheck]
 42        public uint RowVersion { get; private set; }
 43
 44        /// <inheritdoc />
 45        public void OnSavingChanges()
 46        {
 047            RowVersion++;
 048        }
 49    }
 50}