Esempio n. 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Seed != 0)
            {
                hash ^= Seed.GetHashCode();
            }
            if (CommunicationVersion.Length != 0)
            {
                hash ^= CommunicationVersion.GetHashCode();
            }
            if (PackageVersion.Length != 0)
            {
                hash ^= PackageVersion.GetHashCode();
            }
            if (capabilities_ != null)
            {
                hash ^= Capabilities.GetHashCode();
            }
            if (NumAreas != 0)
            {
                hash ^= NumAreas.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
        public void NoDuplicatesAllowed()
        {
            var Capabilities1 = new Capabilities
            {
                Capability.ListBuckets,
                Capability.ListBuckets,
                Capability.ListFiles,
                Capability.ReadFiles,
                Capability.ShareFiles,
                Capability.WriteFiles,
                Capability.DeleteFiles
            };

            var Capabilities2 = new Capabilities
            {
                Capability.ListBuckets,
                Capability.ListFiles,
                Capability.ReadFiles,
                Capability.ShareFiles,
                Capability.WriteFiles,
                Capability.DeleteFiles
            };

            Assert.True(Capabilities1.Equals(Capabilities2));
            Assert.Equal(Capabilities1.GetHashCode(), Capabilities2.GetHashCode());
        }
 public override int GetHashCode()
 {
     return(DeviceAddress.GetHashCode() ^ IsInNetwork.GetHashCode() ^ Capabilities.GetHashCode() ^ Roles.GetHashCode() ^ SignalStrength.GetHashCode() ^
            BatteryStatus.GetHashCode() ^ IsAligned.GetHashCode() ^ ClockSynchronization.GetHashCode() ^ HasVersionMismatch.GetHashCode());
 }
 public override int GetHashCode()
 {
     return(NotificationType.GetHashCode() ^ Identity.GetHashCode() ^ Capabilities.GetHashCode() ^ FullNames.Aggregate(0, (v, s) => v ^ s.GetHashCode()));
 }
Esempio n. 5
0
        public override int GetHashCode()
        {
            int hashCode = -255518735;

            if (Id != null)
            {
                hashCode += Id.GetHashCode();
            }

            if (Name != null)
            {
                hashCode += Name.GetHashCode();
            }

            if (Address != null)
            {
                hashCode += Address.GetHashCode();
            }

            if (Timezone != null)
            {
                hashCode += Timezone.GetHashCode();
            }

            if (Capabilities != null)
            {
                hashCode += Capabilities.GetHashCode();
            }

            if (Status != null)
            {
                hashCode += Status.GetHashCode();
            }

            if (CreatedAt != null)
            {
                hashCode += CreatedAt.GetHashCode();
            }

            if (MerchantId != null)
            {
                hashCode += MerchantId.GetHashCode();
            }

            if (Country != null)
            {
                hashCode += Country.GetHashCode();
            }

            if (LanguageCode != null)
            {
                hashCode += LanguageCode.GetHashCode();
            }

            if (Currency != null)
            {
                hashCode += Currency.GetHashCode();
            }

            if (PhoneNumber != null)
            {
                hashCode += PhoneNumber.GetHashCode();
            }

            if (BusinessName != null)
            {
                hashCode += BusinessName.GetHashCode();
            }

            if (Type != null)
            {
                hashCode += Type.GetHashCode();
            }

            if (WebsiteUrl != null)
            {
                hashCode += WebsiteUrl.GetHashCode();
            }

            if (BusinessHours != null)
            {
                hashCode += BusinessHours.GetHashCode();
            }

            if (BusinessEmail != null)
            {
                hashCode += BusinessEmail.GetHashCode();
            }

            if (Description != null)
            {
                hashCode += Description.GetHashCode();
            }

            if (TwitterUsername != null)
            {
                hashCode += TwitterUsername.GetHashCode();
            }

            if (InstagramUsername != null)
            {
                hashCode += InstagramUsername.GetHashCode();
            }

            if (FacebookUrl != null)
            {
                hashCode += FacebookUrl.GetHashCode();
            }

            if (Coordinates != null)
            {
                hashCode += Coordinates.GetHashCode();
            }

            if (LogoUrl != null)
            {
                hashCode += LogoUrl.GetHashCode();
            }

            if (PosBackgroundUrl != null)
            {
                hashCode += PosBackgroundUrl.GetHashCode();
            }

            if (Mcc != null)
            {
                hashCode += Mcc.GetHashCode();
            }

            if (FullFormatLogoUrl != null)
            {
                hashCode += FullFormatLogoUrl.GetHashCode();
            }

            return(hashCode);
        }
Esempio n. 6
0
 public override int GetHashCode()
 {
     return(Capabilities.GetHashCode());
 }