Ejemplo n.º 1
0
        public string ToString(bool renderProperties)
        {
            StringBuilder sb = new StringBuilder();

            bool hasDisplayName = !String.IsNullOrEmpty(DisplayName) && !DisplayName.Equals(Address);

            if (hasDisplayName)
            {
                sb.Append(DisplayName);
                sb.AppendFormat(" <{0}>", Address);
            }
            else
            {
                sb.Append(Address);
            }

            if (renderProperties)
            {
                sb.Append("|");

                if (!String.IsNullOrEmpty(AvatarUrl))
                {
                    sb.AppendFormat("{0}", AvatarUrl);
                }

                sb.Append("|");

                if (!String.IsNullOrEmpty(ChannelName))
                {
                    sb.AppendFormat("{0}", ChannelName);
                }
            }

            return(sb.ToString());
        }
Ejemplo n.º 2
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))
                 ));
        }
Ejemplo n.º 3
0
        public XmlNode ToXml(XmlNode parent)
        {
            if (Value.Equals(string.Empty))
            {
                return(null);
            }

            XmlNode result = parent.OwnerDocument.CreateNode(XmlNodeType.Element, "Data", string.Empty);

            if (Name.Length > 0)
            {
                XmlAttribute attName = result.OwnerDocument.CreateAttribute("name");
                attName.Value = Name;
                result.Attributes.Append(attName);
            }
            if (!DisplayName.Equals(string.Empty))
            {
                XmlNode nodName = result.OwnerDocument.CreateNode(XmlNodeType.Element, "displayName", string.Empty);
                nodName.InnerText = DisplayName;
                result.AppendChild(nodName);
            }

            XmlNode nodValue = result.OwnerDocument.CreateNode(XmlNodeType.Element, "value", string.Empty);

            nodValue.InnerText = Value;
            result.AppendChild(nodValue);

            return(result);
        }
Ejemplo n.º 4
0
        public bool Equals(UserMembership input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     MembershipType == input.MembershipType ||
                     (MembershipType != null && MembershipType.Equals(input.MembershipType))
                     ) &&
                 (
                     MembershipId == input.MembershipId ||
                     (MembershipId.Equals(input.MembershipId))
                 ) &&
                 (
                     DisplayName == input.DisplayName ||
                     (DisplayName != null && DisplayName.Equals(input.DisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayName == input.BungieGlobalDisplayName ||
                     (BungieGlobalDisplayName != null && BungieGlobalDisplayName.Equals(input.BungieGlobalDisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayNameCode == input.BungieGlobalDisplayNameCode ||
                     (BungieGlobalDisplayNameCode.Equals(input.BungieGlobalDisplayNameCode))
                 ));
        }
        /// <summary>
        /// Returns true if ValueMappingElement instances are equal
        /// </summary>
        /// <param name="other">Instance of ValueMappingElement to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ValueMappingElement other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DisplayElements == other.DisplayElements ||
                     DisplayElements != null &&
                     DisplayElements.SequenceEqual(other.DisplayElements)
                     ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     Value == other.Value ||
                     Value != null &&
                     Value.Equals(other.Value)
                 ));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Determines whether this instance and another specified Status object have the same value.
        /// </summary>
        /// <param name="other">The Status to compare to this instance</param>
        /// <returns>true if the value of the value parameter is the same as this instance; otherwise, false.</returns>
        public virtual bool Equals(Status other)
        {
            if (other == null)
            {
                return(false);
            }

            bool result = true;

            if (Name == null)
            {
                result &= other.Name == null;
            }
            else
            {
                result &= Name.Equals(other.Name);
            }

            if (DisplayName == null)
            {
                result &= other.DisplayName == null;
            }
            else
            {
                result &= DisplayName.Equals(other.DisplayName);
            }

            // we purposely exclude the Collection of tasks in equality comparision

            return(result);
        }
        public bool Equals(DestinyProfileTransitoryPartyMember input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     MembershipId == input.MembershipId ||
                     (MembershipId.Equals(input.MembershipId))
                     ) &&
                 (
                     EmblemHash == input.EmblemHash ||
                     (EmblemHash.Equals(input.EmblemHash))
                 ) &&
                 (
                     DisplayName == input.DisplayName ||
                     (DisplayName != null && DisplayName.Equals(input.DisplayName))
                 ) &&
                 (
                     Status == input.Status ||
                     (Status != null && Status.Equals(input.Status))
                 ));
        }
Ejemplo n.º 8
0
        /// <include file='doc\ToolboxItem.uex' path='docs/doc[@for="ToolboxItem.Equals"]/*' />
        /// <internalonly/>
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }

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

            if (!(obj.GetType() == this.GetType()))
            {
                return(false);
            }

            ToolboxItem otherItem = (ToolboxItem)obj;

            if (TypeName != otherItem.TypeName)
            {
                if (TypeName == null || otherItem.TypeName == null)
                {
                    return(false);
                }

                if (!TypeName.Equals(otherItem.TypeName))
                {
                    return(false);
                }
            }

            if (AssemblyName != otherItem.AssemblyName)
            {
                if (AssemblyName == null || otherItem.AssemblyName == null)
                {
                    return(false);
                }

                if (!AssemblyName.FullName.Equals(otherItem.AssemblyName.FullName))
                {
                    return(false);
                }
            }

            if (DisplayName != otherItem.DisplayName)
            {
                if (DisplayName == null || otherItem.DisplayName == null)
                {
                    return(false);
                }

                if (!DisplayName.Equals(otherItem.DisplayName))
                {
                    return(false);
                }
            }

            return(true);
        }
        /// <summary>
        /// Returns true if InlineResponseDefault2Clientdata instances are equal
        /// </summary>
        /// <param name="other">Instance of InlineResponseDefault2Clientdata to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InlineResponseDefault2Clientdata other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                     ) &&
                 (
                     DisplayLabelId == other.DisplayLabelId ||
                     DisplayLabelId != null &&
                     DisplayLabelId.Equals(other.DisplayLabelId)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     Field == other.Field ||
                     Field != null &&
                     Field.Equals(other.Field)
                 ));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Returns true if PipelineBranchesitem instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineBranchesitem to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineBranchesitem other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                     ) &&
                 (
                     EstimatedDurationInMillis == other.EstimatedDurationInMillis ||
                     EstimatedDurationInMillis != null &&
                     EstimatedDurationInMillis.Equals(other.EstimatedDurationInMillis)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     WeatherScore == other.WeatherScore ||
                     WeatherScore != null &&
                     WeatherScore.Equals(other.WeatherScore)
                 ) &&
                 (
                     LatestRun == other.LatestRun ||
                     LatestRun != null &&
                     LatestRun.Equals(other.LatestRun)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     PullRequest == other.PullRequest ||
                     PullRequest != null &&
                     PullRequest.Equals(other.PullRequest)
                 ) &&
                 (
                     TotalNumberOfPullRequests == other.TotalNumberOfPullRequests ||
                     TotalNumberOfPullRequests != null &&
                     TotalNumberOfPullRequests.Equals(other.TotalNumberOfPullRequests)
                 ) &&
                 (
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                 ));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Returns true if PipelineImpl instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineImpl to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineImpl other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     EstimatedDurationInMillis == other.EstimatedDurationInMillis ||

                     EstimatedDurationInMillis.Equals(other.EstimatedDurationInMillis)
                 ) &&
                 (
                     FullName == other.FullName ||
                     FullName != null &&
                     FullName.Equals(other.FullName)
                 ) &&
                 (
                     LatestRun == other.LatestRun ||
                     LatestRun != null &&
                     LatestRun.Equals(other.LatestRun)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     WeatherScore == other.WeatherScore ||

                     WeatherScore.Equals(other.WeatherScore)
                 ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     Links.Equals(other.Links)
                 ));
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Returns true if PipelineStepImpl instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineStepImpl to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineStepImpl other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     Links.Equals(other.Links)
                 ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     DurationInMillis == other.DurationInMillis ||

                     DurationInMillis.Equals(other.DurationInMillis)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Input == other.Input ||
                     Input != null &&
                     Input.Equals(other.Input)
                 ) &&
                 (
                     Result == other.Result ||
                     Result != null &&
                     Result.Equals(other.Result)
                 ) &&
                 (
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ));
        }
Ejemplo n.º 13
0
        public bool Equals(FireteamUserInfoCard input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FireteamDisplayName == input.FireteamDisplayName ||
                     (FireteamDisplayName != null && FireteamDisplayName.Equals(input.FireteamDisplayName))
                     ) &&
                 (
                     FireteamMembershipType == input.FireteamMembershipType ||
                     (FireteamMembershipType != null && FireteamMembershipType.Equals(input.FireteamMembershipType))
                 ) &&
                 (
                     SupplementalDisplayName == input.SupplementalDisplayName ||
                     (SupplementalDisplayName != null && SupplementalDisplayName.Equals(input.SupplementalDisplayName))
                 ) &&
                 (
                     IconPath == input.IconPath ||
                     (IconPath != null && IconPath.Equals(input.IconPath))
                 ) &&
                 (
                     CrossSaveOverride == input.CrossSaveOverride ||
                     (CrossSaveOverride != null && CrossSaveOverride.Equals(input.CrossSaveOverride))
                 ) &&
                 (
                     ApplicableMembershipTypes == input.ApplicableMembershipTypes ||
                     (ApplicableMembershipTypes != null && ApplicableMembershipTypes.SequenceEqual(input.ApplicableMembershipTypes))
                 ) &&
                 (
                     IsPublic == input.IsPublic ||
                     (IsPublic != null && IsPublic.Equals(input.IsPublic))
                 ) &&
                 (
                     MembershipType == input.MembershipType ||
                     (MembershipType != null && MembershipType.Equals(input.MembershipType))
                 ) &&
                 (
                     MembershipId == input.MembershipId ||
                     (MembershipId.Equals(input.MembershipId))
                 ) &&
                 (
                     DisplayName == input.DisplayName ||
                     (DisplayName != null && DisplayName.Equals(input.DisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayName == input.BungieGlobalDisplayName ||
                     (BungieGlobalDisplayName != null && BungieGlobalDisplayName.Equals(input.BungieGlobalDisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayNameCode == input.BungieGlobalDisplayNameCode ||
                     (BungieGlobalDisplayNameCode.Equals(input.BungieGlobalDisplayNameCode))
                 ));
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Returns true if PipelineRunNode instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineRunNode to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineRunNode other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     DurationInMillis == other.DurationInMillis ||

                     DurationInMillis.Equals(other.DurationInMillis)
                 ) &&
                 (
                     Edges == other.Edges ||
                     Edges != null &&
                     other.Edges != null &&
                     Edges.SequenceEqual(other.Edges)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Result == other.Result ||
                     Result != null &&
                     Result.Equals(other.Result)
                 ) &&
                 (
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ));
        }
Ejemplo n.º 15
0
 public override bool Equals(object obj)
 {
     if (obj == null || !GetType().Equals(obj.GetType()))
     {
         return(false);
     }
     else
     {
         Profile profile = obj as Profile;
         return(DisplayName.Equals(profile.DisplayName) && FullPath.Equals(profile.FullPath));
     }
 }
Ejemplo n.º 16
0
        /// <summary>
        /// Returns true if BankingAccount instances are equal
        /// </summary>
        /// <param name="other">Instance of BankingAccount to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(BankingAccount other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     AccountId == other.AccountId ||
                     AccountId != null &&
                     AccountId.Equals(other.AccountId)
                     ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     Nickname == other.Nickname ||
                     Nickname != null &&
                     Nickname.Equals(other.Nickname)
                 ) &&
                 (
                     MaskedNumber == other.MaskedNumber ||
                     MaskedNumber != null &&
                     MaskedNumber.Equals(other.MaskedNumber)
                 ) &&
                 (
                     OpenStatus == other.OpenStatus ||
                     OpenStatus != null &&
                     OpenStatus.Equals(other.OpenStatus)
                 ) &&
                 (
                     IsOwned == other.IsOwned ||
                     IsOwned != null &&
                     IsOwned.Equals(other.IsOwned)
                 ) &&
                 (
                     ProductCategory == other.ProductCategory ||
                     ProductCategory != null &&
                     ProductCategory.Equals(other.ProductCategory)
                 ) &&
                 (
                     ProductName == other.ProductName ||
                     ProductName != null &&
                     ProductName.Equals(other.ProductName)
                 ));
        }
Ejemplo n.º 17
0
        public override bool Equals(object obj)
        {
            bool areEqual;
            var  comparisonObject = (Product)obj;

            if (comparisonObject == null)
            {
                return(false);
            }
            areEqual = Brand.Equals(comparisonObject.Brand);
            areEqual = DisplayName.Equals(comparisonObject.DisplayName);
            areEqual = ProductID.Equals(comparisonObject.ProductID);
            areEqual = Category.Equals(comparisonObject.Category);
            return(areEqual);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Returns true if PipelineFolderImpl instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineFolderImpl to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineFolderImpl other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     FullName == other.FullName ||
                     FullName != null &&
                     FullName.Equals(other.FullName)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     NumberOfFolders == other.NumberOfFolders ||
                     NumberOfFolders != null &&
                     NumberOfFolders.Equals(other.NumberOfFolders)
                 ) &&
                 (
                     NumberOfPipelines == other.NumberOfPipelines ||
                     NumberOfPipelines != null &&
                     NumberOfPipelines.Equals(other.NumberOfPipelines)
                 ));
        }
 public bool GetObjectNeedsUpate(PersonRelationship checkUpdateFrom)
 {
     if (!Code.Equals(checkUpdateFrom.Code))
     {
         return(true);
     }
     if (!CanonicalName.Equals(checkUpdateFrom.CanonicalName))
     {
         return(true);
     }
     if (!DisplayName.Equals(checkUpdateFrom.DisplayName))
     {
         return(true);
     }
     return(false);
 }
 public bool GetObjectNeedsUpate(StatusCustomizationHazardousCondition checkUpdateFrom)
 {
     if (!Code.Equals(checkUpdateFrom.Code))
     {
         return(true);
     }
     if (!CanonicalName.Equals(checkUpdateFrom.CanonicalName))
     {
         return(true);
     }
     if (!DisplayName.Equals(checkUpdateFrom.DisplayName))
     {
         return(true);
     }
     return(false);
 }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderFulfillmentRecipient other &&
                   ((CustomerId == null && other.CustomerId == null) || (CustomerId?.Equals(other.CustomerId) == true)) &&
                   ((DisplayName == null && other.DisplayName == null) || (DisplayName?.Equals(other.DisplayName) == true)) &&
                   ((EmailAddress == null && other.EmailAddress == null) || (EmailAddress?.Equals(other.EmailAddress) == true)) &&
                   ((PhoneNumber == null && other.PhoneNumber == null) || (PhoneNumber?.Equals(other.PhoneNumber) == true)) &&
                   ((Address == null && other.Address == null) || (Address?.Equals(other.Address) == true)));
        }
Ejemplo n.º 22
0
        /// <summary>
        /// Returns true if GenericResource instances are equal
        /// </summary>
        /// <param name="other">Instance of GenericResource to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GenericResource other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     DurationInMillis == other.DurationInMillis ||

                     DurationInMillis.Equals(other.DurationInMillis)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Result == other.Result ||
                     Result != null &&
                     Result.Equals(other.Result)
                 ) &&
                 (
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                 ));
        }
Ejemplo n.º 23
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is CatalogItemOption other &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((DisplayName == null && other.DisplayName == null) || (DisplayName?.Equals(other.DisplayName) == true)) &&
                   ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) &&
                   ((ShowColors == null && other.ShowColors == null) || (ShowColors?.Equals(other.ShowColors) == true)) &&
                   ((Values == null && other.Values == null) || (Values?.Equals(other.Values) == true)));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is TeamMemberBookingProfile other &&
                   ((TeamMemberId == null && other.TeamMemberId == null) || (TeamMemberId?.Equals(other.TeamMemberId) == true)) &&
                   ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) &&
                   ((DisplayName == null && other.DisplayName == null) || (DisplayName?.Equals(other.DisplayName) == true)) &&
                   ((IsBookable == null && other.IsBookable == null) || (IsBookable?.Equals(other.IsBookable) == true)) &&
                   ((ProfileImageUrl == null && other.ProfileImageUrl == null) || (ProfileImageUrl?.Equals(other.ProfileImageUrl) == true)));
        }
Ejemplo n.º 25
0
        public static IHtmlContent OrderByLink(this IHtmlHelper htmlHelper, IUrlHelper urlHelper, LinkPartialViewModel model)
        {
            var actionLink = new TagBuilder("a");

            actionLink.MergeAttribute("href", urlHelper.Action(model.Action, model.Controller, new
            {
                propertyName = model.OrderByViewModel.PropertyName,
                orderBy      = model.OrderByViewModel.OrderBy == OrderByType.Desc ? OrderByType.Asc : OrderByType.Desc,
                currentPage  = model.PagingViewModel.CurrentPage,
                pageSize     = model.PagingViewModel.PageSize
            }));

            switch (model.OrderByViewModel.OrderBy)
            {
            case OrderByType.Asc when model.DisplayName.Equals(model.OrderByViewModel.CurrentPropertyName, StringComparison.CurrentCultureIgnoreCase):
            {
                var icon = new TagBuilder("i");
                icon.AddCssClass("fas");
                icon.AddCssClass("fa-sort-up");
                actionLink.InnerHtml.Append(model.DisplayName);
                actionLink.InnerHtml.AppendHtml(icon);
                break;
            }

            case OrderByType.Desc when model.DisplayName.Equals(model.OrderByViewModel.CurrentPropertyName, StringComparison.CurrentCultureIgnoreCase):
            {
                var icon = new TagBuilder("i");
                icon.AddCssClass("fas");
                icon.AddCssClass("fa-sort-down");
                actionLink.InnerHtml.Append(model.DisplayName);
                actionLink.InnerHtml.AppendHtml(icon);
                break;
            }

            default:
                actionLink.InnerHtml.SetContent($"{model.DisplayName}");
                break;
            }

            return(actionLink);
        }
Ejemplo n.º 26
0
        public bool Equals(CrossSaveUserMembership input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     CrossSaveOverride == input.CrossSaveOverride ||
                     (CrossSaveOverride != null && CrossSaveOverride.Equals(input.CrossSaveOverride))
                     ) &&
                 (
                     ApplicableMembershipTypes == input.ApplicableMembershipTypes ||
                     (ApplicableMembershipTypes != null && ApplicableMembershipTypes.SequenceEqual(input.ApplicableMembershipTypes))
                 ) &&
                 (
                     IsPublic == input.IsPublic ||
                     (IsPublic != null && IsPublic.Equals(input.IsPublic))
                 ) &&
                 (
                     MembershipType == input.MembershipType ||
                     (MembershipType != null && MembershipType.Equals(input.MembershipType))
                 ) &&
                 (
                     MembershipId == input.MembershipId ||
                     (MembershipId.Equals(input.MembershipId))
                 ) &&
                 (
                     DisplayName == input.DisplayName ||
                     (DisplayName != null && DisplayName.Equals(input.DisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayName == input.BungieGlobalDisplayName ||
                     (BungieGlobalDisplayName != null && BungieGlobalDisplayName.Equals(input.BungieGlobalDisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayNameCode == input.BungieGlobalDisplayNameCode ||
                     (BungieGlobalDisplayNameCode.Equals(input.BungieGlobalDisplayNameCode))
                 ));
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Returns true if ComputerSet instances are equal
        /// </summary>
        /// <param name="other">Instance of ComputerSet to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComputerSet other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     BusyExecutors == other.BusyExecutors ||

                     BusyExecutors.Equals(other.BusyExecutors)
                 ) &&
                 (
                     Computer == other.Computer ||
                     Computer != null &&
                     other.Computer != null &&
                     Computer.SequenceEqual(other.Computer)
                 ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     TotalExecutors == other.TotalExecutors ||

                     TotalExecutors.Equals(other.TotalExecutors)
                 ));
        }
        /// <summary>
        /// Returns true if DocuViewareCertificate instances are equal
        /// </summary>
        /// <param name="input">Instance of DocuViewareCertificate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DocuViewareCertificate input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DisplayName == input.DisplayName ||
                     (DisplayName != null &&
                      DisplayName.Equals(input.DisplayName))
                     ) &&
                 (
                     Data == input.Data ||
                     (Data != null &&
                      Data.Equals(input.Data))
                 ) &&
                 (
                     Password == input.Password ||
                     (Password != null &&
                      Password.Equals(input.Password))
                 ) &&
                 (
                     TimestampServerURI == input.TimestampServerURI ||
                     (TimestampServerURI != null &&
                      TimestampServerURI.Equals(input.TimestampServerURI))
                 ) &&
                 (
                     TimestampServerUserName == input.TimestampServerUserName ||
                     (TimestampServerUserName != null &&
                      TimestampServerUserName.Equals(input.TimestampServerUserName))
                 ) &&
                 (
                     TimestampServerUserPassword == input.TimestampServerUserPassword ||
                     (TimestampServerUserPassword != null &&
                      TimestampServerUserPassword.Equals(input.TimestampServerUserPassword))
                 ));
        }
Ejemplo n.º 29
0
        /// <summary>
        /// Equality comparer.
        /// </summary>
        /// <param name="obj">Meant to be other PhoneLineInfo object.</param>
        /// <returns>Returns true if the two objects are equal, otherwise false.</returns>
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }

            PhoneLineInfo other = obj as PhoneLineInfo;

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

            return
                (DisplayName.Equals(other.DisplayName) &&
                 Username.Equals(other.Username) &&
                 RegisterName.Equals(other.RegisterName) &&
                 Password.Equals(other.Password) &&
                 Domain.Equals(other.Domain) &&
                 Proxy.Equals(other.Proxy) &&
                 RegRequired.Equals(other.RegRequired));
        }
        public string GenerateUpdateJsonFromObject(StatusCustomizationHazardousCondition updateFrom)
        {
            // form the json (determine the fields that need to be updated)
            var sb     = new StringBuilder();
            var sw     = new StringWriter(sb);
            var writer = new JsonTextWriter(sw)
            {
                Formatting = Formatting.None
            };

            writer.WriteStartObject();
            writer.WritePropertyName(@"income_source");
            writer.WriteStartObject();

            if (!Code.Equals(updateFrom.Code))
            {
                writer.WritePropertyName("code");
                writer.WriteValue(updateFrom.Code);
            }

            if (!CanonicalName.Equals(updateFrom.CanonicalName))
            {
                writer.WritePropertyName("canonical_name");
                writer.WriteValue(updateFrom.CanonicalName);
            }

            if (!DisplayName.Equals(updateFrom.DisplayName))
            {
                writer.WritePropertyName("display_name");
                writer.WriteValue(updateFrom.DisplayName);
            }

            writer.WriteEndObject();
            writer.WriteEndObject();
            return(sw.ToString());
        }