public int Compare(Tape x, Tape y) { if (x == null || y == null) { throw new ArgumentNullException(); } return(CompareChain.Of(x, y) .Value(t => t.AssignedToBucket) .Value(t => t.AvailableRawCapacity) .Value(t => t.BarCode) .Value(t => t.BucketId) .Value(t => t.DescriptionForIdentification) .Value(t => t.EjectDate) .Value(t => t.EjectLabel) .Value(t => t.EjectLocation) .Value(t => t.EjectPending) .Value(t => t.FullOfData) .Value(t => t.Id) .Value(t => t.LastAccessed) .Value(t => t.LastCheckpoint) .Value(t => t.LastModified) .Value(t => t.LastVerified) .Value(t => t.PartitionId) .Value(t => t.PreviousState) .Value(t => t.SerialNumber) .Value(t => t.State) .Value(t => t.TotalRawCapacity) .Value(t => t.Type) .Value(t => t.WriteProtected) .Result); }
public int Compare(Ds3ObjectPlacement x, Ds3ObjectPlacement y) { if (x == null || y == null) { throw new ArgumentNullException(); } return(CompareChain.Of(x, y) .Value(op => op.Name) .Value(op => op.Offset) .Value(op => op.Length) .Value(op => op.Tapes, new EnumerableComparer <Tape>(new TapeComparer())) .Result); }