Merge remote-tracking branch 'upstream/master' into 3.1.7

This commit is contained in:
crobibero
2020-08-31 08:00:05 -06:00
130 changed files with 2206 additions and 1564 deletions

View File

@@ -0,0 +1,26 @@
using System;
namespace Jellyfin.Data.Events
{
/// <summary>
/// Provides a generic EventArgs subclass that can hold any kind of object.
/// </summary>
/// <typeparam name="T">The type of this event.</typeparam>
public class GenericEventArgs<T> : EventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="GenericEventArgs{T}"/> class.
/// </summary>
/// <param name="arg">The argument.</param>
public GenericEventArgs(T arg)
{
Argument = arg;
}
/// <summary>
/// Gets the argument.
/// </summary>
/// <value>The argument.</value>
public T Argument { get; }
}
}

View File

@@ -0,0 +1,11 @@
using System;
namespace Jellyfin.Data.Events.System
{
/// <summary>
/// An event that occurs when there is a pending restart.
/// </summary>
public class PendingRestartEventArgs : EventArgs
{
}
}

View File

@@ -0,0 +1,18 @@
using Jellyfin.Data.Entities;
namespace Jellyfin.Data.Events.Users
{
/// <summary>
/// An event that occurs when a user is created.
/// </summary>
public class UserCreatedEventArgs : GenericEventArgs<User>
{
/// <summary>
/// Initializes a new instance of the <see cref="UserCreatedEventArgs"/> class.
/// </summary>
/// <param name="arg">The user.</param>
public UserCreatedEventArgs(User arg) : base(arg)
{
}
}
}

View File

@@ -0,0 +1,18 @@
using Jellyfin.Data.Entities;
namespace Jellyfin.Data.Events.Users
{
/// <summary>
/// An event that occurs when a user is deleted.
/// </summary>
public class UserDeletedEventArgs : GenericEventArgs<User>
{
/// <summary>
/// Initializes a new instance of the <see cref="UserDeletedEventArgs"/> class.
/// </summary>
/// <param name="arg">The user.</param>
public UserDeletedEventArgs(User arg) : base(arg)
{
}
}
}

View File

@@ -0,0 +1,18 @@
using Jellyfin.Data.Entities;
namespace Jellyfin.Data.Events.Users
{
/// <summary>
/// An event that occurs when a user is locked out.
/// </summary>
public class UserLockedOutEventArgs : GenericEventArgs<User>
{
/// <summary>
/// Initializes a new instance of the <see cref="UserLockedOutEventArgs"/> class.
/// </summary>
/// <param name="arg">The user.</param>
public UserLockedOutEventArgs(User arg) : base(arg)
{
}
}
}

View File

@@ -0,0 +1,18 @@
using Jellyfin.Data.Entities;
namespace Jellyfin.Data.Events.Users
{
/// <summary>
/// An event that occurs when a user's password has changed.
/// </summary>
public class UserPasswordChangedEventArgs : GenericEventArgs<User>
{
/// <summary>
/// Initializes a new instance of the <see cref="UserPasswordChangedEventArgs"/> class.
/// </summary>
/// <param name="arg">The user.</param>
public UserPasswordChangedEventArgs(User arg) : base(arg)
{
}
}
}

View File

@@ -0,0 +1,18 @@
using Jellyfin.Data.Entities;
namespace Jellyfin.Data.Events.Users
{
/// <summary>
/// An event that occurs when a user is updated.
/// </summary>
public class UserUpdatedEventArgs : GenericEventArgs<User>
{
/// <summary>
/// Initializes a new instance of the <see cref="UserUpdatedEventArgs"/> class.
/// </summary>
/// <param name="arg">The user.</param>
public UserUpdatedEventArgs(User arg) : base(arg)
{
}
}
}

View File

@@ -7,6 +7,14 @@
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<Authors>Jellyfin Contributors</Authors>
<PackageId>Jellyfin.Data</PackageId>
<VersionPrefix>10.7.0</VersionPrefix>
<RepositoryUrl>https://github.com/jellyfin/jellyfin</RepositoryUrl>
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>