コード例 #1
0
ファイル: TrackedProfile.cs プロジェクト: herbfunk/Funky
        public override bool Equals(object obj)
        {
            //Check for null and compare run-time types.
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            var p = (TrackedProfile)obj;

            return(ProfileName.Equals(p.ProfileName));
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            var other = obj as MPDServerProfile;

            if (other == null)
            {
                return(false);
            }

            return(ProfileName.Equals(other.ProfileName) &&
                   Hostname.Equals(other.Hostname));
        }
コード例 #3
0
        /// <summary>
        /// Returns true if PlayerProfileTexturePropertyValue instances are equal
        /// </summary>
        /// <param name="other">Instance of PlayerProfileTexturePropertyValue to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PlayerProfileTexturePropertyValue other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Timestamp == other.Timestamp ||
                     Timestamp != null &&
                     Timestamp.Equals(other.Timestamp)
                     ) &&
                 (
                     ProfileId == other.ProfileId ||
                     ProfileId != null &&
                     ProfileId.Equals(other.ProfileId)
                 ) &&
                 (
                     ProfileName == other.ProfileName ||
                     ProfileName != null &&
                     ProfileName.Equals(other.ProfileName)
                 ) &&
                 (
                     SignatureRequired == other.SignatureRequired ||
                     SignatureRequired != null &&
                     SignatureRequired.Equals(other.SignatureRequired)
                 ) &&
                 (
                     Textures == other.Textures ||
                     Textures != null &&
                     Textures.Equals(other.Textures)
                 ));
        }