public static void KillTimer (IntPtr timerId) { Timer t = (Timer) TimerStore[timerId.GetHashCode()]; t.Stop (); t.Elapsed -= new ElapsedEventHandler (InternalTimerElapsed); t.Dispose (); TimerStore.Remove (timerId.GetHashCode()); }
/// <summary> /// Gets a unique hash code for this instance. /// </summary> /// <returns>A hash code.</returns> public override Int32 GetHashCode() => xMin.GetHashCode() ^ yMin.GetHashCode() ^ xMax.GetHashCode() ^ yMax.GetHashCode();
private static uint InitHash(IntPtr handle, int hashsize, out uint seed, out uint incr) { uint num = (uint) (handle.GetHashCode() & 0x7fffffff); seed = num; incr = 1 + ((uint) (((seed >> 5) + 1) % (hashsize - 1))); return num; }
public override int GetHashCode() { return(_value.GetHashCode()); }
/// <summary> /// Gets a unique hash code for this instance. /// </summary> /// <returns>A unique hash code.</returns> public override int GetHashCode() { return(requestType.GetHashCode() ^ width.GetHashCode() ^ height.GetHashCode() ^ horiResolution.GetHashCode() ^ vertResolution.GetHashCode()); }
public static void GetHashCodeRespectAllBits() { var ptr1 = new IntPtr(0x123456FFFFFFFF); var ptr2 = new IntPtr(0x654321FFFFFFFF); Assert.NotEqual(ptr1.GetHashCode(), ptr2.GetHashCode()); }
public static void Equals(IntPtr ptr1, object obj, bool expected) { if (obj is IntPtr) { IntPtr ptr2 = (IntPtr)obj; Assert.Equal(expected, ptr1 == ptr2); Assert.Equal(!expected, ptr1 != ptr2); Assert.Equal(expected, ptr1.GetHashCode().Equals(ptr2.GetHashCode())); } Assert.Equal(expected, ptr1.Equals(obj)); Assert.Equal(ptr1.GetHashCode(), ptr1.GetHashCode()); }
public override int GetHashCode() { return(Handle.GetHashCode()); }
public override int GetHashCode() { return(method.GetHashCode() ^ (m_target != null ? m_target.GetHashCode() : 0)); }
public override int GetHashCode() { return(sig.GetHashCode()); }
/// <summary> /// Gets a unique hash code for this instance. /// </summary> /// <returns>A hash code.</returns> public override int GetHashCode() { //TODO better hash algo return(xMin.GetHashCode() ^ yMin.GetHashCode() ^ xMax.GetHashCode() ^ yMax.GetHashCode()); }
public sealed override int GetHashCode() { return(Address0.GetHashCode()); }
public override int GetHashCode() { return(_xMin.GetHashCode() ^ _yMin.GetHashCode() ^ _xMax.GetHashCode() ^ _yMax.GetHashCode()); }