-
Notifications
You must be signed in to change notification settings - Fork 753
/
IPersistenceProvider.cs
43 lines (38 loc) · 1.63 KB
/
IPersistenceProvider.cs
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
using System;
namespace AutoUpdaterDotNET;
/// <summary>
/// Provides a mechanism for storing AutoUpdater state between sessions.
/// </summary>
public interface IPersistenceProvider
{
/// <summary>
/// Reads the flag indicating whether a specific version should be skipped or not.
/// </summary>
/// <returns>Returns a version to skip. If skip value is false or not present then it will return null.</returns>
Version GetSkippedVersion();
/// <summary>
/// Reads the value containing the date and time at which the user must be given again the possibility to upgrade the
/// application.
/// </summary>
/// <returns>
/// Returns a DateTime value at which the user must be given again the possibility to upgrade the application. If
/// remind later value is not present then it will return null.
/// </returns>
DateTime? GetRemindLater();
/// <summary>
/// Sets the values indicating the specific version that must be ignored by AutoUpdater.
/// </summary>
/// <param name="version">
/// Version code for the specific version that must be ignored. Set it to null if you don't want to
/// skip any version.
/// </param>
void SetSkippedVersion(Version version);
/// <summary>
/// Sets the date and time at which the user must be given again the possibility to upgrade the application.
/// </summary>
/// <param name="remindLaterAt">
/// Date and time at which the user must be given again the possibility to upgrade the
/// application.
/// </param>
void SetRemindLater(DateTime? remindLaterAt);
}