aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Migrations/IAsyncMigrationRoutine.cs
blob: 5b6a5fe9420c1fef48e1e0c05baa45a24de52bbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Threading;
using System.Threading.Tasks;

namespace Jellyfin.Server.Migrations;

/// <summary>
/// Interface that describes a migration routine.
/// </summary>
internal interface IAsyncMigrationRoutine
{
    /// <summary>
    /// Execute the migration routine.
    /// </summary>
    /// <param name="cancellationToken">A cancellation token triggered if the migration should be aborted.</param>
    /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
    public Task PerformAsync(CancellationToken cancellationToken);
}

/// <summary>
/// Interface that describes a migration routine.
/// </summary>
[Obsolete("Use IAsyncMigrationRoutine instead")]
internal interface IMigrationRoutine
{
    /// <summary>
    /// Execute the migration routine.
    /// </summary>
    [Obsolete("Use IAsyncMigrationRoutine.PerformAsync instead")]
    public void Perform();
}