コード例 #1
0
        /// <summary>
        /// Show the TortoiseHg annotate dialog.
        /// </summary>
        /// <param name="repository">
        /// The <see cref="Repository"/> to annotate in.
        /// </param>
        /// <param name="file">
        /// The file to annotate.
        /// </param>
        /// <param name="command">
        /// Any extra options to the annotate method, or <c>null</c> for default options.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <para><paramref name="repository"/> is <c>null</c>.</para>
        /// <para>- or -</para>
        /// <para><paramref name="file"/> is <c>null</c> or empty.</para>
        /// </exception>
        /// <exception cref="ArgumentException">
        /// <para><see cref="AnnotateGuiCommand.File"/> cannot be set before calling this method.</para>
        /// </exception>
        /// <remarks>
        /// This command is only available for the <see cref="GuiClientType.PyQT"/> client type.
        /// </remarks>
        public static void AnnotateGui(this Repository repository, string file, AnnotateGuiCommand command = null)
        {
            if (repository == null)
                throw new ArgumentNullException("repository");
            if (StringEx.IsNullOrWhiteSpace(file))
                throw new ArgumentNullException("file");
            if (command != null && !StringEx.IsNullOrWhiteSpace(command.File))
                throw new ArgumentException("AnnotateGuiCommand.File cannot be set before calling this method", "command");

            command = (command ?? new AnnotateGuiCommand())
                .WithFile(file);

            repository.Execute(command);
        }
コード例 #2
0
        /// <summary>
        /// Show the TortoiseHg annotate dialog.
        /// </summary>
        /// <param name="repository">
        /// The <see cref="Repository"/> to annotate in.
        /// </param>
        /// <param name="command">
        /// Any extra options to the annotate method, or <c>null</c> for default options.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <para><paramref name="repository"/> is <c>null</c>.</para>
        /// <para> - or -</para>
        /// <para><paramref name="command"/> is <c>null</c>.</para>
        /// </exception>
        public static void AnnotateGui(this Repository repository, AnnotateGuiCommand command)
        {
            if (repository == null)
                throw new ArgumentNullException("repository");
            if (command == null)
                throw new ArgumentNullException("command");

            repository.Execute(command);
        }