FileHash
Namespace: TagBites.IO
Assembly: TagBites.IO.dll
Provides evidence about the hash value for a file.
public sealed struct FileHash : System.ValueType
Constructors
FileHash(FileHashAlgorithm, string)
Initializes a new instance of type TagBites.IO.FileHash with specified algorithm and value.
public void FileHash(FileHashAlgorithm algorithm, string value)
Result Type: void
Parameters
Type | Name | |
---|---|---|
FileHashAlgorithm | algorithm | The algorithm use for generating hash value. |
string | value | The value of file hash. |
Fields
Empty
Represents the empty file hash. This field is read-only.
public FileHash Empty
Result Type: FileHash
Properties
Algorithm
Gets the algorithm used for generating hash value. <returns>A TagBites.IO.FileHashAlgorithm value specifies the algorithm used for generating hash value.</returns>
public FileHashAlgorithm Algorithm { get; }
Result Type: FileHashAlgorithm
IsEmpty
Determines whether the current file hash is empty. <returns><see langword="true" /> if the file hash is empty; otherwise, <see langword="false" />.</returns>
public bool IsEmpty { get; }
Result Type: bool
Value
Gets a System.String representing the value of current file hash. <returns>Gets a System.String representing the value of current file hash.</returns>
public string Value { get; }
Result Type: string
Methods
Equals(FileHash)
Determines whether the specified TagBites.IO.FileHash instance is equals to current file hash.
public bool Equals(FileHash other)
Result Type: bool
Parameters
Type | Name | |
---|---|---|
FileHash | other | The other object to compare. |
Equals(object)
public bool Equals(object obj)
Result Type: bool
Parameters
Type | Name | |
---|---|---|
object | obj |
GetHashCode()
public int GetHashCode()
Result Type: int
op_Equality(FileHash, FileHash)
Determines whether the specified TagBites.IO.FileHash instances are considered equal.
public bool op_Equality(FileHash left, FileHash right)
Result Type: bool
Parameters
Type | Name | |
---|---|---|
FileHash | left | The first object to compare. |
FileHash | right | The second object to compare. |
op_Inequality(FileHash, FileHash)
Determines whether the specified TagBites.IO.FileHash instances are considered different.
public bool op_Inequality(FileHash left, FileHash right)
Result Type: bool
Parameters
Type | Name | |
---|---|---|
FileHash | left | The first object to compare. |
FileHash | right | The second object to compare. |
ToString()
public string ToString()
Result Type: string