using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Connect; using MediaBrowser.Model.Extensions; using System; using System.ComponentModel; using System.Diagnostics; using System.Runtime.Serialization; namespace MediaBrowser.Model.Dto { /// /// Class UserDto /// [DebuggerDisplay("Name = {Name}, ID = {Id}, HasPassword = {HasPassword}")] public class UserDto : IHasPropertyChangedEvent, IItemDto { /// /// Gets or sets the name. /// /// The name. public string Name { get; set; } /// /// Gets or sets the name of the connect user. /// /// The name of the connect user. public string ConnectUserName { get; set; } /// /// Gets or sets the connect user identifier. /// /// The connect user identifier. public string ConnectUserId { get; set; } /// /// Gets or sets the type of the connect link. /// /// The type of the connect link. public UserLinkType? ConnectLinkType { get; set; } /// /// Gets or sets the id. /// /// The id. public string Id { get; set; } /// /// Gets or sets the primary image tag. /// /// The primary image tag. public string PrimaryImageTag { get; set; } /// /// Gets or sets a value indicating whether this instance has password. /// /// true if this instance has password; otherwise, false. public bool HasPassword { get; set; } public bool HasConfiguredPassword { get; set; } /// /// Gets or sets the last login date. /// /// The last login date. public DateTime? LastLoginDate { get; set; } /// /// Gets or sets the last activity date. /// /// The last activity date. public DateTime? LastActivityDate { get; set; } /// /// Gets or sets the configuration. /// /// The configuration. public UserConfiguration Configuration { get; set; } /// /// Gets or sets the primary image aspect ratio. /// /// The primary image aspect ratio. public double? PrimaryImageAspectRatio { get; set; } /// /// Gets or sets the original primary image aspect ratio. /// /// The original primary image aspect ratio. public double? OriginalPrimaryImageAspectRatio { get; set; } /// /// Gets a value indicating whether this instance has primary image. /// /// true if this instance has primary image; otherwise, false. [IgnoreDataMember] public bool HasPrimaryImage { get { return PrimaryImageTag != null; } } /// /// Initializes a new instance of the class. /// public UserDto() { Configuration = new UserConfiguration(); } /// /// Occurs when [property changed]. /// public event PropertyChangedEventHandler PropertyChanged; public override string ToString() { return Name ?? base.ToString(); } } }