aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data/Entities/Library.cs
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2020-07-21 21:56:24 +0200
committerDavid <daullmer@gmail.com>2020-07-21 21:56:24 +0200
commitbe8cf1e9ef5f24903c406f5cdbe985e84ffeb102 (patch)
treeb3a925ec3cf8afd8a04eeaad94861b258dfec70f /Jellyfin.Data/Entities/Library.cs
parent9a2bcd6266fb222491abe6ea31d5e7e734699d5f (diff)
parent5b57c81ee14ce585161b9ac331e6e3528826b815 (diff)
Merge branch 'api-migration' into api-syncplay
# Conflicts: # MediaBrowser.Api/SyncPlay/SyncPlayService.cs
Diffstat (limited to 'Jellyfin.Data/Entities/Library.cs')
-rw-r--r--Jellyfin.Data/Entities/Library.cs24
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
*************************************************************************/
-
}
}