CalculateFileHash Class

Summary

Defines a ITask that calculates the hash of a given file.
graph TD Base0["FileHashTask"]-->Type click Base0 "/nBuildKit.MsBuild/api/NBuildKit.MsBuild.Tasks.FileSystem/FileHashTask" Base1["BaseTask"]-->Base0 click Base1 "/nBuildKit.MsBuild/api/NBuildKit.MsBuild.Tasks.Core/BaseTask" Base2["Task"]-->Base1 Type["CalculateFileHash"] class Type type-node

Syntax

public sealed class CalculateFileHash : FileHashTask

Properties

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

Methods

Name Value Summary
ComputeHash(string) byte[]
Calculates the file has for the given file path with the selected algorithm.
Inherited from FileHashTask
ConvertHashToString(byte[]) string
Converts a byte array containing a hash to a hexadecimal string.
Inherited from FileHashTask
static
ErrorCodeById(string) string
Returns the error code for the given ID.
Inherited from BaseTask
Execute() bool
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