public bool EqualsIgnoringProviderId(IRelationById other) { if (ReferenceEquals(other, null)) { return(false); } if (ReferenceEquals(other, this)) { return(true); } var equals = true; if (Type != other.Type) { equals = false; } if (!SourceId.EqualsIgnoringProviderId(other.SourceId)) { equals = false; } if (!DestinationId.EqualsIgnoringProviderId(other.DestinationId)) { equals = false; } if (!MetaData.OrderBy(x => x.Key).SequenceEqual(other.MetaData.OrderBy(x => x.Key))) { equals = false; } return(equals); }
public override int GetHashCode() { int result = SourceId.GetHashCode(); result = 31 * result + DestinationId.GetHashCode(); result = 31 * result + Description.GetHashCode(); return(result); }
public override int GetHashCode() { var hashCode = -1610014636; hashCode = hashCode * -1521134295 + Id.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name); hashCode = hashCode * -1521134295 + Time.GetHashCode(); hashCode = hashCode * -1521134295 + Cost.GetHashCode(); hashCode = hashCode * -1521134295 + OriginId.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <Point> .Default.GetHashCode(Origin); hashCode = hashCode * -1521134295 + DestinationId.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <Point> .Default.GetHashCode(Destination); return(hashCode); }
/// <summary> /// Performs enhanced record-by-record processing functionality for the cmdlet. /// </summary> protected override void ProcessRecordEx() { config = GetCmdletConfig(); string destinationDescription; if (Destination != null) { destinationDescription = $"'{Destination.Name}' (ID: {Destination.Id})"; } else { destinationDescription = DestinationId.ToString(); } if (ShouldProcess($"'{config.NameDescrption}' ({config.IdDescription}), Destination: {destinationDescription}")) { ExecuteOperation(Clone); } }
public bool EqualsIgnoringProviderId(IReadonlyRelation <IRelatableEntity, IRelatableEntity> other) { if (ReferenceEquals(other, null)) { return(false); } if (ReferenceEquals(other, this)) { return(true); } var objCast = other as Relation; if (ReferenceEquals(objCast, null)) { return(false); } var equals = true; if (Type != other.Type) { equals = false; } if (!SourceId.EqualsIgnoringProviderId(other.SourceId)) { equals = false; } if (!DestinationId.EqualsIgnoringProviderId(other.DestinationId)) { equals = false; } if (!MetaData.OrderBy(x => x.Key).SequenceEqual(objCast.MetaData.OrderBy(x => x.Key))) { equals = false; } return(equals); }
public override int GetHashCode() { int hash = 1; if (SourceId.Length != 0) { hash ^= SourceId.GetHashCode(); } if (DestinationId.Length != 0) { hash ^= DestinationId.GetHashCode(); } if (DrillerCount != 0) { hash ^= DrillerCount.GetHashCode(); } hash ^= specialistIds_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Get hash /// </summary> /// <returns></returns> public override int GetHashCode() { return(DestinationId.GetHashCode()); }