Пример #1
0
 public void GetHashCode_Get()
 {
     uut.ScriptHash = new UInt160(TestUtils.GetByteArray(20, 0x42));
     uut.Key        = TestUtils.GetByteArray(10, 0x42);
     uut.GetHashCode().Should().Be(806209853);
 }
Пример #2
0
 private static DataBuffer GetDependencyKey(DataBuffer typeId, StorageKey key)
 {
     return(Utility.CombineHashCodes(typeId.GetHashCode(), key.GetHashCode()));
 }
Пример #3
0
 public void GetHashCode_Get()
 {
     uut.Id  = 0x42000000;
     uut.Key = TestUtils.GetByteArray(10, 0x42);
     uut.GetHashCode().Should().Be(1374529787);
 }
Пример #4
0
 /// <summary>
 ///     <para>Overriden. Serves as a hash function for a particular type.</para>
 /// </summary>
 /// <returns>
 ///     <para>A hash code for the current <see cref="ObjectReference"/>.</para>
 /// </returns>
 public override int GetHashCode()
 {
     return(Utility.CombineHashCodes(TypeId.GetHashCode(), ObjectId.GetHashCode()));
 }