예제 #1
0
        public bool Equals(DicomFile x, DicomFile y)
        {
            if (x == null || y == null)
            {
                return(object.ReferenceEquals(x, y));
            }

            if (!_metadataComparer.Equals(x.FileMetaInfo, y.FileMetaInfo))
            {
                return(false);
            }

            return(_datasetComparer.Equals(x.Dataset, y.Dataset));
        }
예제 #2
0
        bool IEqualityComparer <DicomFile> .Equals(DicomFile x, DicomFile y)
        {
            if (x == null || y == null)
            {
                return(object.ReferenceEquals(x, y));
            }

            IEqualityComparer <IEnumerable <DicomItem> > metadataComparer = new DicomItemCollectionEqualityComparer();

            if (!metadataComparer.Equals(x.FileMetaInfo, y.FileMetaInfo))
            {
                return(false);
            }

            IEqualityComparer <DicomDataset> dataSetComparer = new DicomDatasetEqualityComparer();

            return(dataSetComparer.Equals(x.Dataset, y.Dataset));
        }