/// <summary> /// Show the move file dialog. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to move files in. /// </param> /// <param name="command"> /// Any extra options to the mv method, or <c>null</c> for default options. /// </param> /// <exception cref="ArgumentNullException"> /// <para><paramref name="repository"/> is <c>null</c>.</para> /// </exception> public static void MoveGui(this Repository repository, MoveGuiCommand command = null) { if (repository == null) throw new ArgumentNullException("repository"); command = command ?? new MoveGuiCommand(); repository.Execute(command); }
/// <summary> /// Show the move file dialog. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to move files in. /// </param> /// <param name="source"> /// The source file to move. /// </param> /// <param name="destination"> /// The destination to move it to. /// </param> /// <param name="command"> /// Any extra options to the mv 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="source"/> is <c>null</c> or empty.</para> /// <para>- or -</para> /// <para><paramref name="destination"/> is <c>null</c> or empty.</para> /// </exception> /// <exception cref="ArgumentException"> /// <para><see cref="MoveCopyRenameGuiCommandBase{T}.Source"/> cannot be set before calling this method.</para> /// <para>- or -</para> /// <para><see cref="MoveCopyRenameGuiCommandBase{T}.Destination"/> cannot be set before calling this method.</para> /// </exception> public static void MoveGui(this Repository repository, string source, string destination, MoveGuiCommand command = null) { if (repository == null) throw new ArgumentNullException("repository"); if (StringEx.IsNullOrWhiteSpace(source)) throw new ArgumentNullException("source"); if (StringEx.IsNullOrWhiteSpace(destination)) throw new ArgumentNullException("destination"); command = (command ?? new MoveGuiCommand()) .WithSource(source) .WithDestination(destination); repository.Execute(command); }