Пример #1
0
        public bool Equals(TagMetadataItem input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Description == input.Description ||
                     (Description != null && Description.Equals(input.Description))
                     ) &&
                 (
                     TagText == input.TagText ||
                     (TagText != null && TagText.Equals(input.TagText))
                 ) &&
                 (
                     Groups == input.Groups ||
                     (Groups != null && Groups.SequenceEqual(input.Groups))
                 ) &&
                 (
                     IsDefault == input.IsDefault ||
                     (IsDefault != null && IsDefault.Equals(input.IsDefault))
                 ) &&
                 (
                     Name == input.Name ||
                     (Name != null && Name.Equals(input.Name))
                 ));
        }
Пример #2
0
 public override void WriteXml(XmlWriter writer)
 {
     writer.WriteElementString("id", Id.ToString());
     writer.WriteElementString("name", Name);
     writer.WriteElementString("is_default", IsDefault.ToString());
     writer.WriteElementString("is_closed", IsClosed.ToString());
 }
Пример #3
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + Id.GetHashCode();

                if (ContextName != null)
                {
                    hash = hash * 59 + ContextName.GetHashCode();
                }

                hash = hash * 59 + IsDefault.GetHashCode();

                if (CodeName != null)
                {
                    hash = hash * 59 + CodeName.GetHashCode();
                }

                if (Value != null)
                {
                    hash = hash * 59 + Value.GetHashCode();
                }

                if (DisplaySortOrder != null)
                {
                    hash = hash * 59 + DisplaySortOrder.GetHashCode();
                }

                return(hash);
            }
        }
Пример #4
0
        public bool Equals(CoreSetting input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Identifier == input.Identifier ||
                     (Identifier != null && Identifier.Equals(input.Identifier))
                     ) &&
                 (
                     IsDefault == input.IsDefault ||
                     (IsDefault != null && IsDefault.Equals(input.IsDefault))
                 ) &&
                 (
                     DisplayName == input.DisplayName ||
                     (DisplayName != null && DisplayName.Equals(input.DisplayName))
                 ) &&
                 (
                     Summary == input.Summary ||
                     (Summary != null && Summary.Equals(input.Summary))
                 ) &&
                 (
                     ImagePath == input.ImagePath ||
                     (ImagePath != null && ImagePath.Equals(input.ImagePath))
                 ) &&
                 (
                     ChildSettings == input.ChildSettings ||
                     (ChildSettings != null && ChildSettings.SequenceEqual(input.ChildSettings))
                 ));
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (ImageVersionId.Length != 0)
            {
                hash ^= ImageVersionId.GetHashCode();
            }
            if (IsDefault != false)
            {
                hash ^= IsDefault.GetHashCode();
            }
            hash ^= supportedPythonVersions_.GetHashCode();
            if (releaseDate_ != null)
            {
                hash ^= ReleaseDate.GetHashCode();
            }
            if (CreationDisabled != false)
            {
                hash ^= CreationDisabled.GetHashCode();
            }
            if (UpgradeDisabled != false)
            {
                hash ^= UpgradeDisabled.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #6
0
        ////////////////////////////////////////////////////////////////
        // Dump ALL properties
        //
        ////////////////////////////////////////////////////////////////
        public void DumpAll()
        {
            while (Read())
            {
                CError.Write("NodeType  = " + NodeType + "\t|\t");
                CError.Write("NodeName  = " + Name + "\t|\t");
                CError.Write("NodeLocalName  = " + LocalName + "\t|\t");
                CError.Write("NodeNamespace  = " + NamespaceURI + "\t|\t");
                CError.Write("NodePrefix  = " + Prefix + "\t|\t");
                CError.Write("NodeHasValue  = " + (HasValue).ToString() + "\t|\t");
                CError.Write("NodeValue = " + Value + "\t|\t");
                CError.Write("NodeDepth = " + Depth + "\t|\t");
                CError.Write("IsEmptyElement = " + IsEmptyElement.ToString() + "\t|\t");
                CError.Write("IsDefault = " + IsDefault.ToString() + "\t|\t");
                CError.Write("XmlSpace = " + XmlSpace + "\t|\t");
                CError.Write("XmlLang = " + XmlLang + "\t|\t");

                CError.Write("AttributeCount = " + AttributeCount + "\t|\t");
                CError.Write("HasAttributes = " + HasAttributes.ToString() + "\t|\t");

                CError.Write("EOF = " + EOF.ToString() + "\t|\t");
                CError.Write("ReadState = " + ReadState.ToString() + "\t|\t");
                CError.WriteLine();
            }
        }
Пример #7
0
        /// <summary>
        /// Autogenerated
        /// </summary>
        public override int GetHashCode()
        {
            var hashCode = -1042057239;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + IsDefault.GetHashCode();
            return(hashCode);
        }
Пример #8
0
        private int ComputeIdentity()
        {
            var stateHash = TypePair.GetHashCode()
                            ^ ReceiverConstructorInfo.GetHashCode()
                            ^ ExecutionClause.GetHashCode()
                            ^ IsDefault.GetHashCode();

            return(HashCodeHelper.ResolveHashForType(stateHash, GetType()));
        }
        public void ToXml(XmlNode node)
        {
            XmlDocument doc = node.OwnerDocument;

            if (doc == null)
            {
                return;
            }

            XmlElement xmlProvider = doc.CreateElement(PartnershipElement);

            xmlProvider.SetAttribute(IdAttr, Id);
            xmlProvider.SetAttribute(NameAttr, SPSiteName);
            xmlProvider.SetAttribute(IsDefaultAttr, IsDefault.ToString());

            XmlNode spSiteURLNode = doc.CreateElement(SPSiteUrlElement);

            XmlAttribute spSiteIdAttr = doc.CreateAttribute(SPSiteIDAttribute);

            spSiteIdAttr.Value = SPSiteID.ToString();

            if (spSiteURLNode.Attributes == null)
            {
                return;
            }

            spSiteURLNode.Attributes.Append(spSiteIdAttr);

            XmlAttribute spWebIdAttr = doc.CreateAttribute(SPWebIDAttribute);

            spWebIdAttr.Value = SPWebID.ToString();
            spSiteURLNode.Attributes.Append(spWebIdAttr);

            spSiteURLNode.InnerText = SPSiteURL;
            xmlProvider.AppendChild(spSiteURLNode);

            XmlNode      teGroupNameNode = doc.CreateElement(TEGroupNameElement);
            XmlAttribute teGroupIdAttr   = doc.CreateAttribute(IdAttr);

            teGroupIdAttr.Value = TEGroupId.ToString();

            if (teGroupNameNode.Attributes == null)
            {
                return;
            }

            teGroupNameNode.Attributes.Append(teGroupIdAttr);
            teGroupNameNode.InnerText = TEGroupName;
            xmlProvider.AppendChild(teGroupNameNode);

            XmlNode auth = doc.CreateElement(AuthenticationElement);

            auth.InnerText = Authentication.ToQueryString();

            xmlProvider.AppendChild(auth);
            node.AppendChild(xmlProvider);
        }
Пример #10
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            int hash = 17;

            hash = hash * 23 + Id.GetHashCode();
            hash = hash * 23 + OrgId.GetHashCode();
            hash = hash * 23 + IsDefault.GetHashCode();
            hash = hash * 23 + Name.GetHashCode();
            hash = hash * 23 + Type.GetHashCode();
            hash = hash * 23 + Url.GetHashCode();

            return(hash);
        }
        public override int GetHashCode()
        {
            unchecked
            {
                var result = Type != null?Type.GetHashCode() : 0;

                result = (result * 397) ^ (Id != null ? Id.GetHashCode() : 0);
                result = (result * 397) ^ HasRulesDefined.GetHashCode();
                result = (result * 397) ^ IsDefault.GetHashCode();
                result = (result * 397) ^ (DisplayName != null ? DisplayName.GetHashCode() : 0);
                result = (result * 397) ^ (Name != null ? Name.GetHashCode() : 0);
                return(result);
            }
        }
Пример #12
0
        public override int GetHashCode()
        {
            var hashCode = 1927817751;

            hashCode = hashCode * -1521134295 + IsDefault.GetHashCode();
            hashCode = hashCode * -1521134295 + ParsedSuccessfully.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + EqualityComparer <Settings> .Default.GetHashCode(Settings);

            hashCode = hashCode * -1521134295 + EqualityComparer <IEnumerable <SqlMapDefinition> > .Default.GetHashCode(Maps);

            return(hashCode);
        }
Пример #13
0
        /// <summary>
        /// Serves as a hash function for a Currency.
        /// GetHashCode is suitable for use in hashing algorithms and data
        /// structures like a hash table.
        /// </summary>
        /// <returns>A hash code for the current Currency.</returns>
        public override int GetHashCode()
        {
            int hash = (RegionInfo.ISOCurrencySymbol.GetHashCode() ^
                        ExchangeRate.GetHashCode() ^
                        IsDefault.GetHashCode() ^
                        IsActive.GetHashCode());

            foreach (Denomination denom in Denominations)
            {
                hash ^= denom.GetHashCode();
            }

            return(hash);
        }
Пример #14
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            int hash = 17;

            hash = hash * 23 + Id.GetHashCode();
            hash = hash * 23 + OrgId.GetHashCode();
            hash = hash * 23 + Name.GetHashCode();
            hash = hash * 23 + Type.GetHashCode();
            hash = hash * 23 + IsDefault.GetHashCode();
            hash = hash * 23 + DisableResolveMessage.GetHashCode();
            hash = hash * 23 + SendReminder.GetHashCode();
            hash = hash * 23 + IncludeImage.GetHashCode();
            hash = hash * 23 + SendOnAllAlerts.GetHashCode();

            return(hash);
        }
Пример #15
0
        public int CompareTo(ConditionalRegionChain other)
        {
            int result = IsDefault.CompareTo(other.IsDefault);

            if (result == 0)
            {
                result = Regions.Length - other.Regions.Length;
                if (result == 0)
                {
                    result = SpanStart - other.SpanStart;
                    if (result == 0)
                    {
                        return(SpanEnd - other.SpanEnd);
                    }
                }
            }

            return(result);
        }
Пример #16
0
        /// <summary>
        /// Returns true if LookupList instances are equal
        /// </summary>
        /// <param name="other">Instance of LookupList to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(LookupList other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     ContextName == other.ContextName ||
                     ContextName != null &&
                     ContextName.Equals(other.ContextName)
                 ) &&
                 (
                     IsDefault == other.IsDefault ||
                     IsDefault.Equals(other.IsDefault)
                 ) &&
                 (
                     CodeName == other.CodeName ||
                     CodeName != null &&
                     CodeName.Equals(other.CodeName)
                 ) &&
                 (
                     Value == other.Value ||
                     Value != null &&
                     Value.Equals(other.Value)
                 ) &&
                 (
                     DisplaySortOrder == other.DisplaySortOrder ||
                     DisplaySortOrder != null &&
                     DisplaySortOrder.Equals(other.DisplaySortOrder)
                 ));
        }
Пример #17
0
        /// <summary>
        /// Returns true if UserFavouriteViewModel instances are equal
        /// </summary>
        /// <param name="other">Instance of UserFavouriteViewModel to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(UserFavouriteViewModel other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Value == other.Value ||
                     Value != null &&
                     Value.Equals(other.Value)
                 ) &&
                 (
                     IsDefault == other.IsDefault ||
                     IsDefault != null &&
                     IsDefault.Equals(other.IsDefault)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ));
        }
Пример #18
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = 697218593;
                hashCode = hashCode * -1521134295 + ID.GetHashCode();
                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Description);

                hashCode = hashCode * -1521134295 + Group.GetHashCode();
                hashCode = hashCode * -1521134295 + GroupAsInt.GetHashCode();
                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(GroupDisplayName);

                hashCode = hashCode * -1521134295 + EqualityComparer <HashSet <int> > .Default.GetHashCode(PropertyTypes);

                hashCode = hashCode * -1521134295 + IsDefault.GetHashCode();
                hashCode = hashCode * -1521134295 + IsMutable.GetHashCode();
                hashCode = hashCode * -1521134295 + EqualityComparer <IEnumerable <string> > .Default.GetHashCode(PropertyNames);

                return(hashCode);
            }
        }
Пример #19
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                if (Id != null)
                {
                    hash = hash * 59 + Id.GetHashCode();
                }

                if (Name != null)
                {
                    hash = hash * 59 + Name.GetHashCode();
                }

                if (Value != null)
                {
                    hash = hash * 59 + Value.GetHashCode();
                }

                if (IsDefault != null)
                {
                    hash = hash * 59 + IsDefault.GetHashCode();
                }

                if (Type != null)
                {
                    hash = hash * 59 + Type.GetHashCode();
                }

                return(hash);
            }
        }
Пример #20
0
 /// <internalonly/>
 public override int GetHashCode()
 {
     return(((int)MethodType).GetHashCode() ^ IsDefault.GetHashCode());
 }
Пример #21
0
        public bool HaveColumn(string columnName, string columnValue, out bool retValueMatched)
        {
            bool ret          = false;
            bool valueMatched = false;

            if (columnName == "InfoCategoryID")
            {
                ret = true;
                if (InfoCategoryID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoCategoryGUID")
            {
                ret = true;
                if (InfoCategoryGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "RevisionNo")
            {
                ret = true;
                if (RevisionNo.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoCategoryName")
            {
                ret = true;
                if (InfoCategoryName.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "UserID")
            {
                ret = true;
                if (UserID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "UserGUID")
            {
                ret = true;
                if (UserGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CreatedDate")
            {
                ret = true;
                if (CreatedDate.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "LastUpdateDate")
            {
                ret = true;
                if (LastUpdateDate.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsActive")
            {
                ret = true;
                if (IsActive.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "Sequence")
            {
                ret = true;
                if (Sequence.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsDefault")
            {
                ret = true;
                if (IsDefault.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsSystem")
            {
                ret = true;
                if (IsSystem.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            retValueMatched = valueMatched;
            return(ret);
        }
Пример #22
0
        public bool HaveColumn(string columnName, string columnValue, out bool retValueMatched)
        {
            bool ret          = false;
            bool valueMatched = false;

            if (columnName == "DataRefTypeID")
            {
                ret = true;
                if (DataRefTypeID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "DataRefTypeGUID")
            {
                ret = true;
                if (DataRefTypeGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "RevisionNo")
            {
                ret = true;
                if (RevisionNo.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "DataRefType")
            {
                ret = true;
                if (DataRefType.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsDefault")
            {
                ret = true;
                if (IsDefault.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsSystem")
            {
                ret = true;
                if (IsSystem.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsActive")
            {
                ret = true;
                if (IsActive.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "Sequence")
            {
                ret = true;
                if (Sequence.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            retValueMatched = valueMatched;
            return(ret);
        }
Пример #23
0
 public override int GetHashCode() =>
 unchecked (
     IsDefault.GetHashCode() +
     (Object?.GetHashCode() ?? 0) +
     (TypeDeclaration?.GetHashCode() ?? 0));
Пример #24
0
 public override int GetHashCode() => ((int)MethodType).GetHashCode() ^ IsDefault.GetHashCode();
Пример #25
0
 /// <summary>
 /// Calculates the hash code of the object.
 /// </summary>
 /// <returns>The created hash code.</returns>
 public override int GetHashCode()
 {
     return(Key.GetHashCode() ^ IsDefault.GetHashCode() ^ Type.GetHashCode() ^ Priority.GetHashCode() ^ SubFolder.GetHashCode());
 }