blob: 97b5012c012ef2a0038deb6ce9f25429bd3ee9a0 (
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
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
79
|
using System;
using LibGit2Sharp.Handlers;
namespace LibGit2Sharp
{
/// <summary>
/// Flags controlling checkout notification behavior.
/// </summary>
[Flags]
public enum CheckoutNotifyFlags
{
/// <summary>
/// No checkout notification.
/// </summary>
None = 0, /* GIT_CHECKOUT_NOTIFY_NONE */
/// <summary>
/// Notify on conflicting paths.
/// </summary>
Conflict = (1 << 0), /* GIT_CHECKOUT_NOTIFY_CONFLICT */
/// <summary>
/// Notify about dirty files. These are files that do not need
/// an update, but no longer match the baseline.
/// </summary>
Dirty = (1 << 1), /* GIT_CHECKOUT_NOTIFY_DIRTY */
/// <summary>
/// Notify for files that will be updated.
/// </summary>
Updated = (1 << 2), /* GIT_CHECKOUT_NOTIFY_UPDATED */
/// <summary>
/// Notify for untracked files.
/// </summary>
Untracked = (1 << 3), /* GIT_CHECKOUT_NOTIFY_UNTRACKED */
/// <summary>
/// Notify about ignored file.
/// </summary>
Ignored = (1 << 4), /* GIT_CHECKOUT_NOTIFY_IGNORED */
}
/// <summary>
/// Class to specify options and callback on CheckoutNotifications.
/// </summary>
public class CheckoutNotificationOptions
{
/// <summary>
/// Needed for mocking purposes.
/// </summary>
protected CheckoutNotificationOptions()
{
}
/// <summary>
/// The delegate that will be called for files that match the
/// options specified in NotifyFlags.
/// </summary>
public virtual CheckoutNotifyHandler CheckoutNotifyHandler { get; private set; }
/// <summary>
/// The Flags specifying what notifications are reported.
/// </summary>
public virtual CheckoutNotifyFlags NotifyFlags { get; private set; }
/// <summary>
/// Construct the CheckoutNotificationOptions class.
/// </summary>
/// <param name="checkoutNotifyHandler"><see cref="CheckoutNotifyHandler"/> that checkout notifications are reported through.</param>
/// <param name="notifyFlags">The checkout notification type.</param>
public CheckoutNotificationOptions(CheckoutNotifyHandler checkoutNotifyHandler, CheckoutNotifyFlags notifyFlags)
{
CheckoutNotifyHandler = checkoutNotifyHandler;
NotifyFlags = notifyFlags;
}
}
}
|