Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            var coordinates = obj as MavenCoordinates;

            return(coordinates != null &&
                   WildCardEquals(GroupId, coordinates.GroupId) &&
                   ArtifactId.Equals(coordinates.ArtifactId, StringComparison.InvariantCultureIgnoreCase) &&
                   (Version == coordinates.Version || Version == "?" || coordinates.Version == "?"));
        }
 public override bool Equals(object? obj)
 {
     return obj is ArtifactAction action &&
            Id.Equals(action.Id) &&
            Name == action.Name &&
            Trigger == action.Trigger &&
            Frequency == action.Frequency &&
            RequiredTime == action.RequiredTime &&
            Requirements == action.Requirements &&
            ActionTypeId.Equals(action.ActionTypeId) &&
            EqualityComparer<ActionType>.Default.Equals(ActionType, action.ActionType) &&
            ArtifactId.Equals(action.ArtifactId) &&
            EqualityComparer<Artifact>.Default.Equals(Artifact, action.Artifact) &&
            EqualityComparer<Guid?>.Default.Equals(RollableEffectId, action.RollableEffectId) &&
            EqualityComparer<RollableEffect?>.Default.Equals(RollableEffect, action.RollableEffect) &&
            EqualityComparer<ICollection<Trait>>.Default.Equals(Traits, action.Traits) &&
            EqualityComparer<ICollection<TextBlock>>.Default.Equals(Effects, action.Effects);
 }
Ejemplo n.º 3
0
        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj == this)
            {
                return(true);
            }
            if (obj.GetType() != this.GetType())
            {
                return(false);
            }

            DependencyInfo other = (DependencyInfo)obj;

            return((GroupId == null) ? (other.GroupId == null) : GroupId.Equals(other.GroupId) &&
                   ((ArtifactId == null) ? (other.ArtifactId == null) : ArtifactId.Equals(other.ArtifactId)) &&
                   ((Version == null) ? (other.Version == null) : Version.Equals(other.Version)));
        }