mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-30 04:18:27 +01:00
Remove constructor side effects and remove unneeded parameterless constructors
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#pragma warning disable CA2227
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Jellyfin.Data.Interfaces;
|
||||
@@ -17,29 +16,11 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object.</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes.</param>
|
||||
/// <param name="book">The book.</param>
|
||||
public BookMetadata(string title, string language, Book book) : base(title, language)
|
||||
public BookMetadata(string title, string language) : base(title, language)
|
||||
{
|
||||
if (book == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(book));
|
||||
}
|
||||
|
||||
book.BookMetadata.Add(this);
|
||||
|
||||
Publishers = new HashSet<Company>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BookMetadata"/> class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </remarks>
|
||||
protected BookMetadata()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ISBN.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user