diff options
Diffstat (limited to 'Jellyfin.Data/Entities/Library.cs')
| -rw-r--r-- | Jellyfin.Data/Entities/Library.cs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Jellyfin.Data/Entities/Library.cs b/Jellyfin.Data/Entities/Library.cs index c11c09e91..d935e43b1 100644 --- a/Jellyfin.Data/Entities/Library.cs +++ b/Jellyfin.Data/Entities/Library.cs @@ -25,14 +25,17 @@ namespace Jellyfin.Data.Entities } /// <summary> - /// Public constructor with required data + /// Public constructor with required data. /// </summary> /// <param name="name"></param> public Library(string name) { - if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name)); - this.Name = name; + if (string.IsNullOrEmpty(name)) + { + throw new ArgumentNullException(nameof(name)); + } + this.Name = name; Init(); } @@ -51,7 +54,7 @@ namespace Jellyfin.Data.Entities *************************************************************************/ /// <summary> - /// Backing field for Id + /// Backing field for Id. /// </summary> internal int _Id; /// <summary> @@ -64,7 +67,7 @@ namespace Jellyfin.Data.Entities partial void GetId(ref int result); /// <summary> - /// Identity, Indexed, Required + /// Identity, Indexed, Required. /// </summary> [Key] [Required] @@ -75,8 +78,9 @@ namespace Jellyfin.Data.Entities { int value = _Id; GetId(ref value); - return (_Id = value); + return _Id = value; } + protected set { int oldValue = _Id; @@ -89,7 +93,7 @@ namespace Jellyfin.Data.Entities } /// <summary> - /// Backing field for Name + /// Backing field for Name. /// </summary> protected string _Name; /// <summary> @@ -113,8 +117,9 @@ namespace Jellyfin.Data.Entities { string value = _Name; GetName(ref value); - return (_Name = value); + return _Name = value; } + set { string oldValue = _Name; @@ -127,7 +132,7 @@ namespace Jellyfin.Data.Entities } /// <summary> - /// Required, ConcurrenyToken + /// Required, ConcurrenyToken. /// </summary> [ConcurrencyCheck] [Required] @@ -141,7 +146,6 @@ namespace Jellyfin.Data.Entities /************************************************************************* * Navigation properties *************************************************************************/ - } } |
