Exemplo n.º 1
0
 /// <summary>
 /// Serves as a hash function for a <see cref="OpenTK.Input.JoystickCapabilities"/> object.
 /// </summary>
 /// <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a
 /// hash table.</returns>
 public override int GetHashCode()
 {
     return
         (AxisCount.GetHashCode() ^
          ButtonCount.GetHashCode() ^
          HatCount.GetHashCode() ^
          IsConnected.GetHashCode());
 }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            int ret = 0;

            // Base the calculation on the properties that are copied in CopyProperties
            ret |= ButtonCount.GetHashCode();
            ret |= ButtonType.GetHashCode();
            ret |= CurrentPageLabelCssClass.GetHashCode();
            ret |= NextPageImageUrl.GetHashCode();
            ret |= NextPageText.GetHashCode();
            ret |= NextPreviousButtonCssClass.GetHashCode();
            ret |= NumericButtonCssClass.GetHashCode();
            ret |= PreviousPageImageUrl.GetHashCode();
            ret |= PreviousPageText.GetHashCode();
            ret |= RenderNonBreakingSpacesBetweenControls.GetHashCode();

            return(ret);
        }