示例#1
0
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            var arg = (ArgStructure)obj;

            return(Primary.Equals(arg.Primary));
        }
示例#2
0
        /// <summary>
        /// Returns true if SummaryGear instances are equal
        /// </summary>
        /// <param name="other">Instance of SummaryGear to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SummaryGear other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     ResourceState == other.ResourceState ||
                     ResourceState != null &&
                     ResourceState.Equals(other.ResourceState)
                 ) &&
                 (
                     Primary == other.Primary ||
                     Primary != null &&
                     Primary.Equals(other.Primary)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Distance == other.Distance ||
                     Distance != null &&
                     Distance.Equals(other.Distance)
                 ));
        }
 public override bool Equals(object obj)
 {
     return(obj is UniformColors colors &&
            Primary.Equals(colors.Primary) &&
            Secondary.Equals(colors.Secondary));
 }