示例#1
0
 /// <inheritdoc/>
 public override int GetHashCode()
 => base.GetHashCode() ^
 DeviceId.GetHashCode() ^
 Function.GetHashCode() ^
 Address.GetHashCode() ^
 Count.GetHashCode() ^
 Data.GetHashCode();
示例#2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Topic.Length != 0)
            {
                hash ^= Topic.GetHashCode();
            }
            if (MessageFormat.Length != 0)
            {
                hash ^= MessageFormat.GetHashCode();
            }
            if (IoType != 0)
            {
                hash ^= IoType.GetHashCode();
            }
            if (DeviceId.Length != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            hash ^= tags_.GetHashCode();
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Uid.Length != 0)
            {
                hash ^= Uid.GetHashCode();
            }
            if (DeviceId.Length != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (Msg.Length != 0)
            {
                hash ^= Msg.GetHashCode();
            }
            if (Time != 0L)
            {
                hash ^= Time.GetHashCode();
            }
            if (App.Length != 0)
            {
                hash ^= App.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#4
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (DeviceId != null)
         {
             hashCode = hashCode * 59 + DeviceId.GetHashCode();
         }
         if (DeviceType != null)
         {
             hashCode = hashCode * 59 + DeviceType.GetHashCode();
         }
         if (Zone != null)
         {
             hashCode = hashCode * 59 + Zone.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#5
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (Control != 0)
        {
            hash ^= Control.GetHashCode();
        }
        if (Status != 0)
        {
            hash ^= Status.GetHashCode();
        }
        if (DeviceName.Length != 0)
        {
            hash ^= DeviceName.GetHashCode();
        }
        if (DeviceId.Length != 0)
        {
            hash ^= DeviceId.GetHashCode();
        }
        if (Operator.Length != 0)
        {
            hash ^= Operator.GetHashCode();
        }
        return(hash);
    }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Topic.Length != 0)
            {
                hash ^= Topic.GetHashCode();
            }
            if (MessageFormat.Length != 0)
            {
                hash ^= MessageFormat.GetHashCode();
            }
            if (IoType != global::Ubii.Devices.Component.Types.IOType.Publisher)
            {
                hash ^= IoType.GetHashCode();
            }
            if (DeviceId.Length != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            hash ^= tags_.GetHashCode();
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#7
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((DeviceId != null ? DeviceId.GetHashCode() : 0) * 397) ^ (Name != null ? Name.GetHashCode() : 0));
     }
 }
示例#8
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (DeviceId != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            if (ResourceId != 0)
            {
                hash ^= ResourceId.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (TimestampPs != 0UL)
            {
                hash ^= TimestampPs.GetHashCode();
            }
            if (DurationPs != 0UL)
            {
                hash ^= DurationPs.GetHashCode();
            }
            hash ^= Args.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (MsgType.Length != 0)
            {
                hash ^= MsgType.GetHashCode();
            }
            if (DeviceId.Length != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            if (ModuleId.Length != 0)
            {
                hash ^= ModuleId.GetHashCode();
            }
            if (Id != 0L)
            {
                hash ^= Id.GetHashCode();
            }
            if (HeartbeatCreatedTicksUtc != 0L)
            {
                hash ^= HeartbeatCreatedTicksUtc.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#10
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((DeviceId.GetHashCode() * 397) ^ (SecretToken != null ? SecretToken.GetHashCode() : 0));
     }
 }
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         return((VendorId.GetHashCode() * 397) ^ DeviceId.GetHashCode());
     }
 }
示例#12
0
文件: Request.cs 项目: lanicon/Modbus
 /// <inheritdoc/>
 public override int GetHashCode()
 => base.GetHashCode() ^
 TransactionId.GetHashCode() ^
 DeviceId.GetHashCode() ^
 Function.GetHashCode() ^
 Address.GetHashCode() ^
 Count.GetHashCode() ^
 Bytes.GetHashCode();
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (CardProcessor != 0)
            {
                hash ^= CardProcessor.GetHashCode();
            }
            if (CardAgreement.Length != 0)
            {
                hash ^= CardAgreement.GetHashCode();
            }
            if (LicenseId != 0)
            {
                hash ^= LicenseId.GetHashCode();
            }
            if (SiteId != 0)
            {
                hash ^= SiteId.GetHashCode();
            }
            if (DeviceId != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (Password.Length != 0)
            {
                hash ^= Password.GetHashCode();
            }
            if (ServiceURI.Length != 0)
            {
                hash ^= ServiceURI.GetHashCode();
            }
            if (DebugLoggingEnabled != false)
            {
                hash ^= DebugLoggingEnabled.GetHashCode();
            }
            if (PorticoDeveloperId.Length != 0)
            {
                hash ^= PorticoDeveloperId.GetHashCode();
            }
            if (PorticoVersionNumber.Length != 0)
            {
                hash ^= PorticoVersionNumber.GetHashCode();
            }
            return(hash);
        }
示例#14
0
文件: EntityId.cs 项目: ewin66/Forge
        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode()
        {
            int hash = 3;

            hash = 43 * hash + SystemId.GetHashCode();
            hash = 43 ^ hash + DeviceId.GetHashCode();
            hash = 43 ^ hash + Id.GetHashCode();
            return(hash);
        }
示例#15
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(base.GetHashCode() ^
            DeviceId.GetHashCode() ^
            Function.GetHashCode() ^
            Address.GetHashCode() ^
            Count.GetHashCode() ^
            Bytes.GetHashCode());
 }
示例#16
0
文件: Response.cs 项目: mishun/Modbus
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(base.GetHashCode() ^
            TransactionId.GetHashCode() ^
            DeviceId.GetHashCode() ^
            Function.GetHashCode() ^
            Address.GetHashCode() ^
            Count.GetHashCode() ^
            Data.GetHashCode());
 }
示例#17
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (FriendlyName != null ? FriendlyName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DeviceId != null ? DeviceId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Device != null ? Device.GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#18
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (DeviceId != null ? DeviceId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PnpDeviceId != null ? PnpDeviceId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         return(hashCode);
     }
 }
 public override int GetHashCode() {
   int hashcode = 157;
   unchecked {
     hashcode = (hashcode * 397) + SessionId.GetHashCode();
     hashcode = (hashcode * 397) + DeviceId.GetHashCode();
     hashcode = (hashcode * 397) + TCollections.GetHashCode(Measurements);
     hashcode = (hashcode * 397) + Values.GetHashCode();
     hashcode = (hashcode * 397) + Timestamp.GetHashCode();
   }
   return hashcode;
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (ClientType != global::AcFunDanmu.DeviceInfo.Types.PlatformType.KInvalid)
            {
                hash ^= ClientType.GetHashCode();
            }
            if (DeviceId.Length != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            if (ClientIp.Length != 0)
            {
                hash ^= ClientIp.GetHashCode();
            }
            if (AppVersion.Length != 0)
            {
                hash ^= AppVersion.GetHashCode();
            }
            if (Channel.Length != 0)
            {
                hash ^= Channel.GetHashCode();
            }
            if (appInfo_ != null)
            {
                hash ^= AppInfo.GetHashCode();
            }
            if (deviceInfo_ != null)
            {
                hash ^= DeviceInfo.GetHashCode();
            }
            if (envInfo_ != null)
            {
                hash ^= EnvInfo.GetHashCode();
            }
            if (ClientPort != 0)
            {
                hash ^= ClientPort.GetHashCode();
            }
            if (Location.Length != 0)
            {
                hash ^= Location.GetHashCode();
            }
            if (Kpf.Length != 0)
            {
                hash ^= Kpf.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#21
0
        /// <inheritdoc />
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = DeviceId.GetHashCode();
                hashCode = (hashCode * 397) ^ Revision.GetHashCode();
                hashCode = (hashCode * 397) ^ SubSystem.GetHashCode();
                hashCode = (hashCode * 397) ^ Class.GetHashCode();
                hashCode = (hashCode * 397) ^ DeviceType.GetHashCode();
                hashCode = (hashCode * 397) ^ VendorId.GetHashCode();

                return(hashCode);
            }
        }
示例#22
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PlatformType != global::AcFunDanmu.DeviceInfo.Types.PlatformType.KInvalid)
            {
                hash ^= PlatformType.GetHashCode();
            }
            if (OsVersion.Length != 0)
            {
                hash ^= OsVersion.GetHashCode();
            }
            if (DeviceModel.Length != 0)
            {
                hash ^= DeviceModel.GetHashCode();
            }
            if (ImeiMd5.Length != 0)
            {
                hash ^= ImeiMd5.GetHashCode();
            }
            if (DeviceId.Length != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            if (SoftDid.Length != 0)
            {
                hash ^= SoftDid.GetHashCode();
            }
            if (KwaiDid.Length != 0)
            {
                hash ^= KwaiDid.GetHashCode();
            }
            if (Manufacturer.Length != 0)
            {
                hash ^= Manufacturer.GetHashCode();
            }
            if (DeviceName.Length != 0)
            {
                hash ^= DeviceName.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#23
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (DeviceId != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            hash ^= Resources.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#24
0
        public AudioDevice(MMDevice device)
        {
            Device = device;

            _deviceEnumerator = new MMDeviceEnumerator();
            _deviceEnumerator.RegisterEndpointNotificationCallback(this);

            Device.AudioEndpointVolume.OnVolumeNotification += OnEndpointVolumeChanged;

            UpdateDisplayName();
            Flow     = Device.DataFlow.ToDeviceFlow();
            DeviceId = Device.ID;
            Id       = DeviceId.GetHashCode();

            // This is kinda silly...
            var defaultDevice = _deviceEnumerator.GetDefaultAudioEndpoint(Device.DataFlow, Role.Console); // Multimedia? Communications?

            IsDefault = defaultDevice.ID == DeviceId;
            defaultDevice.Dispose();
        }
示例#25
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (DeviceId != null)
         {
             hashCode = hashCode * 59 + DeviceId.GetHashCode();
         }
         if (Timestamp != null)
         {
             hashCode = hashCode * 59 + Timestamp.GetHashCode();
         }
         if (Value != null)
         {
             hashCode = hashCode * 59 + Value.GetHashCode();
         }
         return(hashCode);
     }
 }
        public override int GetHashCode()
        {
            int hashCode = -363727408;

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

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

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

            return(hashCode);
        }
示例#27
0
        public override int GetHashCode()
        {
            int hashCode = 227219520;

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

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

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

            return(hashCode);
        }
示例#28
0
        public override int GetHashCode()
        {
            int hashCode = -1796237610;

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

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

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

            return(hashCode);
        }
示例#29
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (DeviceId != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            if (Type.Length != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (Strength != 0)
            {
                hash ^= Strength.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#30
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (DeviceId.Length != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            if (TopicPrefix.Length != 0)
            {
                hash ^= TopicPrefix.GetHashCode();
            }
            if (Alias.Length != 0)
            {
                hash ^= Alias.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }