< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Dto.UserDto
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Dto/UserDto.cs
Line coverage
75%
Covered lines: 3
Uncovered lines: 1
Coverable lines: 4
Total lines: 113
Line coverage: 75%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
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%
ToString()0%620%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/Dto/UserDto.cs

#LineLine coverage
 1#nullable disable
 2using System;
 3using MediaBrowser.Model.Configuration;
 4using MediaBrowser.Model.Users;
 5
 6namespace MediaBrowser.Model.Dto
 7{
 8    /// <summary>
 9    /// Class UserDto.
 10    /// </summary>
 11    public class UserDto : IItemDto, IHasServerId
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="UserDto"/> class.
 15        /// </summary>
 16        public UserDto()
 17        {
 7118            Configuration = new UserConfiguration();
 7119            Policy = new UserPolicy();
 7120        }
 21
 22        /// <summary>
 23        /// Gets or sets the name.
 24        /// </summary>
 25        /// <value>The name.</value>
 26        public string Name { get; set; }
 27
 28        /// <summary>
 29        /// Gets or sets the server identifier.
 30        /// </summary>
 31        /// <value>The server identifier.</value>
 32        public string ServerId { get; set; }
 33
 34        /// <summary>
 35        /// Gets or sets the name of the server.
 36        /// This is not used by the server and is for client-side usage only.
 37        /// </summary>
 38        /// <value>The name of the server.</value>
 39        public string ServerName { get; set; }
 40
 41        /// <summary>
 42        /// Gets or sets the id.
 43        /// </summary>
 44        /// <value>The id.</value>
 45        public Guid Id { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets the primary image tag.
 49        /// </summary>
 50        /// <value>The primary image tag.</value>
 51        public string PrimaryImageTag { get; set; }
 52
 53        /// <summary>
 54        /// Gets or sets a value indicating whether this instance has password.
 55        /// </summary>
 56        /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value>
 57        public bool HasPassword { get; set; }
 58
 59        /// <summary>
 60        /// Gets or sets a value indicating whether this instance has configured password.
 61        /// </summary>
 62        /// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value>
 63        public bool HasConfiguredPassword { get; set; }
 64
 65        /// <summary>
 66        /// Gets or sets a value indicating whether this instance has configured easy password.
 67        /// </summary>
 68        /// <value><c>true</c> if this instance has configured easy password; otherwise, <c>false</c>.</value>
 69        [Obsolete("Easy Password has been replaced with Quick Connect")]
 70        public bool HasConfiguredEasyPassword { get; set; }
 71
 72        /// <summary>
 73        /// Gets or sets whether async login is enabled or not.
 74        /// </summary>
 75        public bool? EnableAutoLogin { get; set; }
 76
 77        /// <summary>
 78        /// Gets or sets the last login date.
 79        /// </summary>
 80        /// <value>The last login date.</value>
 81        public DateTime? LastLoginDate { get; set; }
 82
 83        /// <summary>
 84        /// Gets or sets the last activity date.
 85        /// </summary>
 86        /// <value>The last activity date.</value>
 87        public DateTime? LastActivityDate { get; set; }
 88
 89        /// <summary>
 90        /// Gets or sets the configuration.
 91        /// </summary>
 92        /// <value>The configuration.</value>
 93        public UserConfiguration Configuration { get; set; }
 94
 95        /// <summary>
 96        /// Gets or sets the policy.
 97        /// </summary>
 98        /// <value>The policy.</value>
 99        public UserPolicy Policy { get; set; }
 100
 101        /// <summary>
 102        /// Gets or sets the primary image aspect ratio.
 103        /// </summary>
 104        /// <value>The primary image aspect ratio.</value>
 105        public double? PrimaryImageAspectRatio { get; set; }
 106
 107        /// <inheritdoc />
 108        public override string ToString()
 109        {
 0110            return Name ?? base.ToString();
 111        }
 112    }
 113}

Methods/Properties

.ctor()
ToString()