public override bool Equals(object o) { if (o == this) { return(true); } if (!(o is ZipkinSpan)) { return(false); } ZipkinSpan that = (ZipkinSpan)o; return(TraceId.Equals(that.TraceId) && ((ParentId == null) ? (that.ParentId == null) : ParentId.Equals(that.ParentId)) && Id.Equals(that.Id) && Kind.Equals(that.Kind) && ((Name == null) ? (that.Name == null) : Name.Equals(that.Name)) && (Timestamp == that.Timestamp) && (Duration == that.Duration) && ((LocalEndpoint == null) ? (that.LocalEndpoint == null) : LocalEndpoint.Equals(that.LocalEndpoint)) && ((RemoteEndpoint == null) ? (that.RemoteEndpoint == null) : RemoteEndpoint.Equals(that.RemoteEndpoint)) && Annotations.SequenceEqual(that.Annotations) && Tags.SequenceEqual(that.Tags) && (Debug == that.Debug) && (Shared == that.Shared)); }
/// <summary> /// Returns true if Span instances are equal /// </summary> /// <param name="other">Instance of Span to be compared</param> /// <returns>Boolean</returns> public bool Equals(Span other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( TraceId == other.TraceId || TraceId != null && TraceId.Equals(other.TraceId) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( ParentId == other.ParentId || ParentId != null && ParentId.Equals(other.ParentId) ) && ( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Kind == other.Kind || Kind != null && Kind.Equals(other.Kind) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) ) && ( Duration == other.Duration || Duration != null && Duration.Equals(other.Duration) ) && ( Debug == other.Debug || Debug != null && Debug.Equals(other.Debug) ) && ( Shared == other.Shared || Shared != null && Shared.Equals(other.Shared) ) && ( LocalEndpoint == other.LocalEndpoint || LocalEndpoint != null && LocalEndpoint.Equals(other.LocalEndpoint) ) && ( RemoteEndpoint == other.RemoteEndpoint || RemoteEndpoint != null && RemoteEndpoint.Equals(other.RemoteEndpoint) ) && ( Annotations == other.Annotations || Annotations != null && Annotations.SequenceEqual(other.Annotations) ) && ( Tags == other.Tags || Tags != null && Tags.Equals(other.Tags) )); }