PageRenderTime 633ms CodeModel.GetById 628ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Mercurial.Net/Hooks/IMercurialControllingHook.cs

#
C# | 50 lines | 11 code | 4 blank | 35 comment | 0 complexity | d76917fb0c90e35acec10e44ec18bb87 MD5 | raw file
 1using System;
 2
 3namespace Mercurial.Hooks
 4{
 5    /// <summary>
 6    /// This interface must be implementing by all controlling hooks.
 7    /// </summary>
 8    public interface IMercurialControllingHook
 9    {
10        /// <summary>
11        /// Terminates the hook program and allows the Mercurial command being hooked to proceed as normal.
12        /// </summary>
13        void TerminateHookAndProceed();
14
15        /// <summary>
16        /// Terminates the hook and cancels the Mercurial command being executed.
17        /// </summary>
18        /// <param name="exitCode">
19        /// The exit code to pass back to Mercurial, must be or higher to signal failure. Default is 1.
20        /// </param>
21        /// <param name="message">
22        /// A message to output to the Mercurial console log; or an empty string if no such message is needed.
23        /// </param>
24        /// <exception cref="ArgumentOutOfRangeException">
25        /// <para><paramref name="exitCode"/> must be 1 or higher.</para>
26        /// </exception>
27        /// <exception cref="ArgumentNullException">
28        /// <para><paramref name="message"/> is <c>null</c>.</para>
29        /// </exception>
30        void TerminateHookAndCancelCommand(int exitCode, string message);
31
32        /// <summary>
33        /// Terminates the hook and cancels the Mercurial command being executed, with
34        /// an exit code of 1 and no message.
35        /// </summary>
36        void TerminateHookAndCancelCommand();
37
38        /// <summary>
39        /// Terminates the hook and cancels the Mercurial command being executed, with
40        /// the specified exit code and no message.
41        /// </summary>
42        /// <param name="exitCode">
43        /// The exit code to pass back to Mercurial, must be or higher to signal failure. Default is 1.
44        /// </param>
45        /// <exception cref="ArgumentOutOfRangeException">
46        /// <para><paramref name="exitCode"/> must be 1 or higher.</para>
47        /// </exception>
48        void TerminateHookAndCancelCommand(int exitCode);
49    }
50}