< Summary - Jellyfin

Information
Class: Jellyfin.Data.Entities.AccessSchedule
Assembly: Jellyfin.Data
File(s): /srv/git/jellyfin/Jellyfin.Data/Entities/AccessSchedule.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 62
Line coverage: 100%
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%11100%

File(s)

/srv/git/jellyfin/Jellyfin.Data/Entities/AccessSchedule.cs

#LineLine coverage
 1using System;
 2using System.ComponentModel.DataAnnotations.Schema;
 3using System.Xml.Serialization;
 4using Jellyfin.Data.Enums;
 5
 6namespace Jellyfin.Data.Entities
 7{
 8    /// <summary>
 9    /// An entity representing a user's access schedule.
 10    /// </summary>
 11    public class AccessSchedule
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="AccessSchedule"/> class.
 15        /// </summary>
 16        /// <param name="dayOfWeek">The day of the week.</param>
 17        /// <param name="startHour">The start hour.</param>
 18        /// <param name="endHour">The end hour.</param>
 19        /// <param name="userId">The associated user's id.</param>
 20        public AccessSchedule(DynamicDayOfWeek dayOfWeek, double startHour, double endHour, Guid userId)
 21        {
 1022            UserId = userId;
 1023            DayOfWeek = dayOfWeek;
 1024            StartHour = startHour;
 1025            EndHour = endHour;
 1026        }
 27
 28        /// <summary>
 29        /// Gets the id of this instance.
 30        /// </summary>
 31        /// <remarks>
 32        /// Identity, Indexed, Required.
 33        /// </remarks>
 34        [XmlIgnore]
 35        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 36        public int Id { get; private set; }
 37
 38        /// <summary>
 39        /// Gets the id of the associated user.
 40        /// </summary>
 41        [XmlIgnore]
 42        public Guid UserId { get; private set; }
 43
 44        /// <summary>
 45        /// Gets or sets the day of week.
 46        /// </summary>
 47        /// <value>The day of week.</value>
 48        public DynamicDayOfWeek DayOfWeek { get; set; }
 49
 50        /// <summary>
 51        /// Gets or sets the start hour.
 52        /// </summary>
 53        /// <value>The start hour.</value>
 54        public double StartHour { get; set; }
 55
 56        /// <summary>
 57        /// Gets or sets the end hour.
 58        /// </summary>
 59        /// <value>The end hour.</value>
 60        public double EndHour { get; set; }
 61    }
 62}