public static Boolean Compare(PartitionFunction origin, PartitionFunction destination) { if (destination == null) { throw new ArgumentNullException("destination"); } if (origin == null) { throw new ArgumentNullException("origin"); } if (!origin.Type.Equals(destination.Type)) { return(false); } if (origin.Size != destination.Size) { return(false); } if (origin.Precision != destination.Precision) { return(false); } if (origin.Scale != destination.Scale) { return(false); } if (origin.IsBoundaryRight != destination.IsBoundaryRight) { return(false); } return(true); }
public new PartitionFunction Clone(ISchemaBase parent) { PartitionFunction item = new PartitionFunction(parent); item.Id = this.Id; item.IsBoundaryRight = this.IsBoundaryRight; item.Name = this.Name; item.Precision = this.Precision; item.Scale = this.Scale; item.Size = this.Size; item.Type = this.Type; this.Values.ForEach(value => { item.Values.Add(value); }); return(item); }
public static Boolean CompareValues(PartitionFunction origin, PartitionFunction destination) { if (destination == null) { throw new ArgumentNullException("destination"); } if (origin == null) { throw new ArgumentNullException("origin"); } if (origin.Values.Count != destination.Values.Count) { return(false); } if (origin.Values.Except(destination.Values).ToList().Count != 0) { return(false); } return(true); }