using LibGit2Sharp.Core;
using LibGit2Sharp.Handlers;
namespace LibGit2Sharp
{
///
/// Options controlling Submodule Update behavior and callbacks.
///
public sealed class SubmoduleUpdateOptions : FetchOptionsBase, IConvertableToGitCheckoutOpts
{
///
/// Initialize the submodule if it is not already initialized.
///
public bool Init { get; set; }
///
/// Delegate to be called during checkout for files that match
/// desired filter specified with the NotifyFlags property.
///
public CheckoutNotifyHandler OnCheckoutNotify { get; set; }
/// Delegate through which checkout will notify callers of
/// certain conditions. The conditions that are reported is
/// controlled with the CheckoutNotifyFlags property.
public CheckoutProgressHandler OnCheckoutProgress { get; set; }
///
/// The flags specifying what conditions are
/// reported through the OnCheckoutNotify delegate.
///
public CheckoutNotifyFlags CheckoutNotifyFlags { get; set; }
CheckoutCallbacks IConvertableToGitCheckoutOpts.GenerateCallbacks()
{
return CheckoutCallbacks.From(OnCheckoutProgress, OnCheckoutNotify);
}
CheckoutStrategy IConvertableToGitCheckoutOpts.CheckoutStrategy
{
get { return CheckoutStrategy.GIT_CHECKOUT_SAFE; }
}
CheckoutNotifyFlags IConvertableToGitCheckoutOpts.CheckoutNotifyFlags
{
get { return CheckoutNotifyFlags; }
}
}
}