Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     return(CardValue.GetHashCode() +
            CardSuit.GetHashCode() +
            Visibility.GetHashCode() +
            PileId.GetHashCode() +
            Owner.GetHashCode());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Returns HashCode</returns>
 public override int GetHashCode()
 {
     return(String.Format("{0}|{1}|{2}|{3}|",
                          DisplayName.GetHashCode(),
                          Description.GetHashCode(),
                          Classification?.GetHashCode() ?? 0,
                          Visibility.GetHashCode()
                          ).GetHashCode());
 }
Ejemplo n.º 3
0
 public override int GetHashCode()
 {
     var result = InfraModuleName != null ? InfraModuleName.GetHashCode() : 0;
     result = 31 * result + InfraName.GetHashCode();
     result = 31 * result + Visibility.GetHashCode();
     result = 31 * result + (IsNamedWindow ? 1 : 0);
     result = 31 * result + IndexName.GetHashCode();
     result = 31 * result + (IndexModuleName != null ? IndexModuleName.GetHashCode() : 0);
     return result;
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Fresnel != null ? Fresnel.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Visibility != null ? Visibility.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (NormalDistribution != null ? NormalDistribution.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Returns HashCode</returns>
 public override int GetHashCode()
 {
     return(String.Format("{0}|{1}|{2}|{3}|{4}|{5}|",
                          DisplayName.GetHashCode(),
                          Description.GetHashCode(),
                          Classification?.GetHashCode() ?? 0,
                          Visibility.GetHashCode(),
                          Photo.GetHashCode(),
                          HiddenGroupMembershipEnabled.GetHashCode()
                          ).GetHashCode());
 }
 public override int GetHashCode()
 {
   unchecked
   {
     int result = Index;
     result = (result * 397) ^ DisplayIndex;
     result = (result * 397) ^ Width.GetHashCode();
     result = (result * 397) ^ Visibility.GetHashCode();
     result = (result * 397) ^ (Header != null ? Header.GetHashCode() : 0);
     result = (result * 397) ^ (SortDirection != null ? SortDirection.GetHashCode() : -1);
     return result;
   }
 }
Ejemplo n.º 7
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Title != null ? Title.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Temperature != null ? Temperature.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Wind != null ? Wind.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Humidity != null ? Humidity.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Visibility != null ? Visibility.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Sunrise != null ? Sunrise.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Sunset != null ? Sunset.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 8
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = Uid != null?Uid.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Outputs != null ? Outputs.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Visibility != null ? Visibility.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Tags != null ? Tags.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ConfigDescriptions != null ? ConfigDescriptions.GetHashCode() : 0);
                return(hashCode);
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ConstructorDefinition"/> class.
        /// </summary>
        /// <param name="accessModifier">Access modifier determining the visibility of the constructor.</param>
        /// <param name="parameterTypes">Types of the parameters of the constructor to create.</param>
        /// <param name="implementBaseClassConstructorCall">
        /// Callback that implements the call to a base class constructor, if the type under construction derives from another type;
        /// null to call the parameterless constructor of the base class.
        /// </param>
        public ConstructorDefinition(Visibility accessModifier, Type[] parameterTypes, ImplementBaseClassConstructorCallCallback implementBaseClassConstructorCall = null)
        {
            if (parameterTypes == null)
            {
                throw new ArgumentNullException(nameof(parameterTypes));
            }

            mAccessModifier = accessModifier;
            mParameterTypes = new List <Type>(parameterTypes);
            mImplementBaseClassConstructorCallCallback = implementBaseClassConstructorCall;

            // calculate the hash code of the constructor definition
            // => use the hash codes of the constructor parameter types as these types identify the constructor uniquely
            mHashCode = mAccessModifier.GetHashCode();
            foreach (var type in mParameterTypes)
            {
                mHashCode ^= type.GetHashCode();
            }
        }
Ejemplo n.º 10
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = Triggers != null?Triggers.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Conditions != null ? Conditions.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Actions != null ? Actions.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Configuration != null ? Configuration.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ConfigDescriptions != null ? ConfigDescriptions.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (TemplateUid != null ? TemplateUid.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Uid != null ? Uid.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Tags != null ? Tags.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Visibility != null ? Visibility.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ Enabled.GetHashCode();
                hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0);
                return(hashCode);
            }
        }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (WidgetId != null)
         {
             hashCode = hashCode * 59 + WidgetId.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Visibility != null)
         {
             hashCode = hashCode * 59 + Visibility.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Icon != null)
         {
             hashCode = hashCode * 59 + Icon.GetHashCode();
         }
         if (Labelcolor != null)
         {
             hashCode = hashCode * 59 + Labelcolor.GetHashCode();
         }
         if (Valuecolor != null)
         {
             hashCode = hashCode * 59 + Valuecolor.GetHashCode();
         }
         if (Mappings != null)
         {
             hashCode = hashCode * 59 + Mappings.GetHashCode();
         }
         if (SwitchSupport != null)
         {
             hashCode = hashCode * 59 + SwitchSupport.GetHashCode();
         }
         if (SendFrequency != null)
         {
             hashCode = hashCode * 59 + SendFrequency.GetHashCode();
         }
         if (Separator != null)
         {
             hashCode = hashCode * 59 + Separator.GetHashCode();
         }
         if (Refresh != null)
         {
             hashCode = hashCode * 59 + Refresh.GetHashCode();
         }
         if (Height != null)
         {
             hashCode = hashCode * 59 + Height.GetHashCode();
         }
         if (MinValue != null)
         {
             hashCode = hashCode * 59 + MinValue.GetHashCode();
         }
         if (MaxValue != null)
         {
             hashCode = hashCode * 59 + MaxValue.GetHashCode();
         }
         if (Step != null)
         {
             hashCode = hashCode * 59 + Step.GetHashCode();
         }
         if (Url != null)
         {
             hashCode = hashCode * 59 + Url.GetHashCode();
         }
         if (Encoding != null)
         {
             hashCode = hashCode * 59 + Encoding.GetHashCode();
         }
         if (Service != null)
         {
             hashCode = hashCode * 59 + Service.GetHashCode();
         }
         if (Period != null)
         {
             hashCode = hashCode * 59 + Period.GetHashCode();
         }
         if (Legend != null)
         {
             hashCode = hashCode * 59 + Legend.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (Item != null)
         {
             hashCode = hashCode * 59 + Item.GetHashCode();
         }
         if (LinkedPage != null)
         {
             hashCode = hashCode * 59 + LinkedPage.GetHashCode();
         }
         if (Widgets != null)
         {
             hashCode = hashCode * 59 + Widgets.GetHashCode();
         }
         return(hashCode);
     }
 }