BaseAddLikeSyntaxCommand Class

Summary

BaseClass for add,update,delete.
graph BT Type-->Base0["BaseCommand"] click Base0 "/api/Cake.SevenZip.Commands/BaseCommand" Base0-->Base1["Object"] Type-.->Interface0["IHaveArgumentArchive"] click Interface0 "/api/Cake.SevenZip.Arguments/IHaveArgumentArchive" Type-.->Interface1["IHaveArgumentFiles"] click Interface1 "/api/Cake.SevenZip.Arguments/IHaveArgumentFiles" Type-.->Interface2["IHaveArgumentDirectories"] click Interface2 "/api/Cake.SevenZip.Arguments/IHaveArgumentDirectories" Type-.->Interface3["IHaveArgument"] click Interface3 "/api/Cake.SevenZip.Arguments/IHaveArgument" Type["BaseAddLikeSyntaxCommand"] class Type type-node Derived0["UpdateCommand"]-->Type click Derived0 "/api/Cake.SevenZip.Commands/UpdateCommand" Derived1["DeleteCommand"]-->Type click Derived1 "/api/Cake.SevenZip.Commands/DeleteCommand" Derived2["AddCommand"]-->Type click Derived2 "/api/Cake.SevenZip.Commands/AddCommand"

Syntax

public abstract class BaseAddLikeSyntaxCommand : BaseCommand, IHaveArgumentArchive, 
    IHaveArgumentFiles, IHaveArgumentDirectories, IHaveArgument

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Constructors

Properties

Name Value Summary
Archive FilePath
Sets the archive the command operates on.
CommandChar string
Gets the command character. (e.g. "a", "u" or "e"...)
Inherited from BaseCommand
CommandName string
Gets the name of the command. (i.e. "add", "update" or "extract".)
Directories DirectoryPathCollection
Gets or sets the list of Directories the command operates on.

For add and update, adding a directory will add the directory itself to the root of the archive including everything in it.

DirectoryContents DirectoryPathCollection
Gets or sets the list of Directory-contents the command operates on.

For add and update, adding a directory this way will add the files of the directory to the root of the archive but not the directory itself.

Files FilePathCollection
Gets or sets the list of files this command operates on. These are single files. (I.e. to add to, or to remove from the archive).

For add and update, single files from the file-system will always be placed directly into the archive without any directory-structure.

Setting Files like this in add/update:
Files = new[] {
  new FilePath("C:\\some\\place\\a.txt"),
  new FilePath("C:\\some\\other\\place\\b.txt"),
  new FilePath("C:\\a\\totally\\different\\place\\c.txt")
};
Will result in an archive:
Archive.zip
- a.txt
- b.txt
- c.txt
without any directory structure.
Switches IEnumerable<ISwitch>
Gets all supported switches.
Inherited from BaseCommand
ThrowOnMissingInputFiles bool
Gets a value indicating whether to throw on missing input files.

Methods

Name Value Summary
BuildArgumentParams(ProcessArgumentBuilder) void
adds only the arguments to the builder. (i.e. Archive, files, directories).
BuildArguments(ProcessArgumentBuilder) void
Builds the arguments.
Inherited from BaseCommand

Extension Methods

Name Value Summary
Dump<BaseAddLikeSyntaxCommand>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<BaseAddLikeSyntaxCommand>(BaseAddLikeSyntaxCommand[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<BaseAddLikeSyntaxCommand>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<BaseAddLikeSyntaxCommand>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<BaseAddLikeSyntaxCommand>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<BaseAddLikeSyntaxCommand>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin