HashCommandBuilder Class

Summary

Builder for HashCommand.
graph BT Type-->Base0["BaseOutputBuilder<HashCommandBuilder, IHashOutput>"] Base0-->Base1["Object"] Type-.->Interface0["ISupportArgumentBuilder<IHaveArgumentFiles>"] Type-.->Interface1["ISupportArgumentBuilder<IHaveArgumentDirectories>"] Type-.->Interface2["ISupportSwitchBuilder<ISupportSwitchIncludeFilenames>"] Type-.->Interface3["ISupportSwitchBuilder<ISupportSwitchExcludeFilenames>"] Type-.->Interface4["ISupportSwitchBuilder<ISupportSwitchRecurseSubdirectories>"] Type-.->Interface5["ISupportSwitchBuilder<ISupportSwitchCompressFilesOpenForWriting>"] Type-.->Interface6["ISupportSwitchBuilder<ISupportSwitchCompressionMethod>"] Type-.->Interface7["ISupportSwitchBuilder<ISupportSwitchNtfsAlternateStreams>"] Type-.->Interface8["ISupportSwitchBuilder<ISupportSwitchSetHashFunction>"] Type["HashCommandBuilder"] class Type type-node

Syntax

public sealed class HashCommandBuilder : BaseOutputBuilder<HashCommandBuilder, IHashOutput>, 
    ISupportArgumentBuilder<IHaveArgumentFiles>, ISupportArgumentBuilder<IHaveArgumentDirectories>, 
    ISupportSwitchBuilder<ISupportSwitchIncludeFilenames>, 
    ISupportSwitchBuilder<ISupportSwitchExcludeFilenames>, 
    ISupportSwitchBuilder<ISupportSwitchRecurseSubdirectories>, 
    ISupportSwitchBuilder<ISupportSwitchCompressFilesOpenForWriting>, 
    ISupportSwitchBuilder<ISupportSwitchCompressionMethod>, 
    ISupportSwitchBuilder<ISupportSwitchNtfsAlternateStreams>, 
    ISupportSwitchBuilder<ISupportSwitchSetHashFunction>

Examples

Task("GetHash")
    .Does(() =>
{
    SevenZip(m => m
        .InHashMode()
        .WithFiles(File("foo.txt"))
        .WithHashFunction(SwitchSetHashFunction.Sha1)
        .WithCommandOutput(o =>
        {
            Information("7Zip version is:" + o.Information);
            var file = o.Files.Single(); // only one file was given above
            var hash = file.Hashes.Single(); // only one hash-function was given above
            Information($"{hash.HashFunction} of {file.FilePath} is: {hash.Hash}");
        }));
});

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Properties

Name Value Summary
OutputCommand BaseOutputCommand<IHashOutput>
Gets the output command.

Extension Methods

Name Value Summary
Dump<HashCommandBuilder>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<HashCommandBuilder>(HashCommandBuilder[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<HashCommandBuilder>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<HashCommandBuilder>(string) void
Requires the Cake.Issues addin
ThrowIfNull<HashCommandBuilder>(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<HashCommandBuilder>(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
Requires the Cake.Issues addin

See Also