/// <summary> /// Manually resolve rejected patch chunks. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to resolve rejected patch chunks in. /// </param> /// <param name="command"> /// Any extra options to the rejects 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 RejectsGui(this Repository repository, RejectsGuiCommand command) { if (repository == null) throw new ArgumentNullException("repository"); if (command == null) throw new ArgumentNullException("command"); repository.Execute(command); }
/// <summary> /// Manually resolve rejected patch chunks. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to resolve rejected patch chunks in. /// </param> /// <param name="file"> /// The file to resolve rejected patch chunks in. /// </param> /// <param name="command"> /// Any extra options to the rejects 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="RejectsGuiCommand.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 RejectsGui(this Repository repository, string file, RejectsGuiCommand 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("RejectsGuiCommand.File cannot be set before calling this method", "command"); command = (command ?? new RejectsGuiCommand()) .WithFile(file); repository.Execute(command); }