FileHashTask Class

Summary

Defines a base class for ITask implementations that calculate file hashes.
graph TD Base0["BaseTask"]-->Type click Base0 "/nBuildKit.MsBuild/api/NBuildKit.MsBuild.Tasks.Core/BaseTask" Base1["Task"]-->Base0 Type["FileHashTask"] class Type type-node Type-->Derived0["CalculateFileHash"] click Derived0 "/nBuildKit.MsBuild/api/NBuildKit.MsBuild.Tasks.FileSystem/CalculateFileHash" Type-->Derived1["ValidateHash"] click Derived1 "/nBuildKit.MsBuild/api/NBuildKit.MsBuild.Tasks.FileSystem/ValidateHash"

Syntax

public abstract class FileHashTask : BaseTask

Properties

Name Value Summary
Algorithm string
Gets or sets the algorithm that should be used to calculate the file hash.
ErrorInformation ITaskItem[]
Gets or sets the collection containing the error codes for the task.
Inherited from BaseTask

Methods

Name Value Summary
ComputeHash(string) byte[]
Calculates the file has for the given file path with the selected algorithm.
ConvertHashToString(byte[]) string
Converts a byte array containing a hash to a hexadecimal string.
static
ErrorCodeById(string) string
Returns the error code for the given ID.
Inherited from BaseTask
GetAbsolutePath(ITaskItem) string
Returns the absolute path for the given path item.
Inherited from BaseTask
GetAbsolutePath(ITaskItem, ITaskItem) string
Returns the absolute path for the given path item.
Inherited from BaseTask
GetAbsolutePath(string) string
Returns the absolute path for the given path item.
Inherited from BaseTask
VerbosityForCurrentMsBuildInstance() string
Gets the verbosity that the current MsBuild instance is running at.
Inherited from BaseTask
static