IChangesView.cs
3.15 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System.Collections.Generic;
using JetBrains.Annotations;
using Unity.Cloud.Collaborate.Models.Structures;
using Unity.Cloud.Collaborate.Presenters;
namespace Unity.Cloud.Collaborate.Views
{
internal interface IChangesView : IView<IChangesPresenter>
{
/// <summary>
/// Set busy status in the view.
/// </summary>
/// <param name="busy">Whether or not the presenter is busy with a request.</param>
void SetBusyStatus(bool busy);
/// <summary>
/// Set the search query in the view.
/// </summary>
/// <param name="query">Latest search query to set.</param>
void SetSearchQuery([NotNull] string query);
/// <summary>
/// Set the revision summary in the view.
/// </summary>
/// <param name="message">Latest summary to set.</param>
void SetRevisionSummary([NotNull] string message);
/// <summary>
/// Set the conflicts to be displayed.
/// </summary>
/// <param name="list">List of conflicts to display.</param>
void SetConflicts([NotNull] IReadOnlyList<IChangeEntryData> list);
/// <summary>
/// Set the changes to be selected.
/// </summary>
void SetSelectedChanges();
/// <summary>
/// Set the changes to be displayed.
/// </summary>
/// <param name="list">List of changes to be displayed.</param>
void SetChanges([NotNull] IReadOnlyList<IChangeEntryData> list);
/// <summary>
/// Set the count of toggled entries.
/// </summary>
/// <param name="count">Latest toggled count.</param>
void SetToggledCount(int count);
/// <summary>
/// Enable or disable the publish button based on the provided values. The optional reason is to be used as a
/// hint to users about why the functionality is blocked.
/// </summary>
/// <param name="enabled">Whether or not the publish is to be enabled.</param>
/// <param name="reason">Reason for the publish to be disabled.</param>
void SetPublishEnabled(bool enabled, [CanBeNull] string reason = null);
/// <summary>
/// Display a dialogue to the user.
/// </summary>
/// <param name="title">Title for the dialogue.</param>
/// <param name="message">Message inside the dialogue.</param>
/// <param name="affirmative">Affirmative button text.</param>
/// <returns>True if affirmative is clicked.</returns>
bool DisplayDialogue([NotNull] string title, [NotNull] string message, [NotNull] string affirmative);
/// <summary>
/// Display a dialogue to the user.
/// </summary>
/// <param name="title">Title for the dialogue.</param>
/// <param name="message">Message inside the dialogue.</param>
/// <param name="affirmative">Affirmative button text.</param>
/// <param name="negative">Negative button text.</param>
/// <returns>True if affirmative is clicked.</returns>
bool DisplayDialogue([NotNull] string title, [NotNull] string message, [NotNull] string affirmative, [NotNull] string negative);
}
}