ContentHash
ReferencesContains information that is useful to uniquely identify an object. This object is immutable.
Constructors
ContentHash
#Constructs a copy of a content hash.
protected ContentHash()
ContentHash
other
The other content hash to copy.
Properties
Gets the length of the content, in bytes.
Gets the 20-bytes long SHA1 hash of the content.
Methods
Creates a copy of this content hash. Because content hash is immutable, this can be used as a deep copy.
Returns: A different instance of the same content hash.
Creates a new ContentHash, representing the content of a file.
Determines if another content hash has the same value.
Returns: True if the two hashes are equal.
Equals
#Determines if another object is a content hash with same value.
Returns: True if the two hashes are equal.
Overrides: Object.Equals
GetHashCode
#Gets an hash code for this content hash. Two equal content hashes have equal hash code. The other way around might not be true.
Returns: An hash code value.
Overrides: Object.GetHashCode
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| ContentHash | == | ContentHash | bool | Determines if two ContentHash instances are equal by value. |
| ContentHash | != | ContentHash | bool | Determines if two ContentHash instances are different by value. |