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