IHistoryPresenter.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.Collections.Generic;
  2. using JetBrains.Annotations;
  3. using Unity.Cloud.Collaborate.Models.Structures;
  4. namespace Unity.Cloud.Collaborate.Presenters
  5. {
  6. internal interface IHistoryPresenter : IPresenter
  7. {
  8. /// <summary>
  9. /// Request a move to the previous page. Ensures page number never goes below 0.
  10. /// </summary>
  11. void PrevPage();
  12. /// <summary>
  13. /// Request a move to the next page. Ensures page number doesn't go beyond the max number of pages.
  14. /// </summary>
  15. void NextPage();
  16. /// <summary>
  17. /// Set the revision id to request.
  18. /// </summary>
  19. [NotNull]
  20. string SelectedRevisionId { set; }
  21. /// <summary>
  22. /// Request to update the state of the project to a provided revision. If revision is in the past, then the
  23. /// state of the project at that point simply will be applied on top of the current without impacting history.
  24. /// </summary>
  25. /// <param name="revisionId">Revision id of the project to update to.</param>
  26. /// <param name="status">Status of the revision.</param>
  27. void RequestGoto([NotNull] string revisionId, HistoryEntryStatus status);
  28. /// <summary>
  29. /// Returns true if revert is supported.
  30. /// </summary>
  31. bool SupportsRevert { get; }
  32. /// <summary>
  33. /// Request to revert the specified files to the given revision.
  34. /// </summary>
  35. /// <param name="revisionId">Revision to revert the files back to.</param>
  36. /// <param name="files">Files to revert back.</param>
  37. void RequestRevert([NotNull] string revisionId, [NotNull] IReadOnlyList<string> files);
  38. }
  39. }