mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 18:53:27 +01:00
Enable nullabe reference types for MediaBrowser.Model
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
@@ -8,16 +6,19 @@ using System.Threading.Tasks;
|
||||
namespace MediaBrowser.Model.Tasks
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IScheduledTaskWorker
|
||||
/// Interface IScheduledTaskWorker.
|
||||
/// </summary>
|
||||
public interface IScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name of the task
|
||||
/// Gets the name of the task.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the key of the task.
|
||||
/// </summary>
|
||||
string Key { get; }
|
||||
|
||||
/// <summary>
|
||||
@@ -33,7 +34,7 @@ namespace MediaBrowser.Model.Tasks
|
||||
string Category { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Executes the task
|
||||
/// Executes the task.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <param name="progress">The progress.</param>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
using System;
|
||||
using MediaBrowser.Model.Events;
|
||||
|
||||
|
||||
@@ -14,9 +14,7 @@ namespace MediaBrowser.Model.Tasks
|
||||
{
|
||||
var isHidden = false;
|
||||
|
||||
var configurableTask = task.ScheduledTask as IConfigurableScheduledTask;
|
||||
|
||||
if (configurableTask != null)
|
||||
if (task.ScheduledTask is IConfigurableScheduledTask configurableTask)
|
||||
{
|
||||
isHidden = configurableTask.IsHidden;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,14 @@ namespace MediaBrowser.Model.Tasks
|
||||
{
|
||||
public class TaskCompletionEventArgs : EventArgs
|
||||
{
|
||||
public IScheduledTaskWorker Task { get; set; }
|
||||
public TaskCompletionEventArgs(IScheduledTaskWorker task, TaskResult result)
|
||||
{
|
||||
Task = task;
|
||||
Result = result;
|
||||
}
|
||||
|
||||
public TaskResult Result { get; set; }
|
||||
public IScheduledTaskWorker Task { get; }
|
||||
|
||||
public TaskResult Result { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Tasks
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Tasks
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
Reference in New Issue
Block a user