IAsyncMigrationRoutine.cs 919 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Threading;
  3. using System.Threading.Tasks;
  4. namespace Jellyfin.Server.Migrations;
  5. /// <summary>
  6. /// Interface that describes a migration routine.
  7. /// </summary>
  8. internal interface IAsyncMigrationRoutine
  9. {
  10. /// <summary>
  11. /// Execute the migration routine.
  12. /// </summary>
  13. /// <param name="cancellationToken">A cancellation token triggered if the migration should be aborted.</param>
  14. /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
  15. public Task PerformAsync(CancellationToken cancellationToken);
  16. }
  17. /// <summary>
  18. /// Interface that describes a migration routine.
  19. /// </summary>
  20. [Obsolete("Use IAsyncMigrationRoutine instead")]
  21. internal interface IMigrationRoutine
  22. {
  23. /// <summary>
  24. /// Execute the migration routine.
  25. /// </summary>
  26. [Obsolete("Use IAsyncMigrationRoutine.PerformAsync instead")]
  27. public void Perform();
  28. }