コード例 #1
0
 public bool Equals(CompositeBitmapImageElementConstraints other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(ImageSizeRange.Equals(other.ImageSizeRange) && SizeSpecificImageMaxSize == other.SizeSpecificImageMaxSize &&
            MaxSize == other.MaxSize && MaxFilenameLength == other.MaxFilenameLength &&
            (ReferenceEquals(SupportedFileFormats, other.SupportedFileFormats) ||
             SupportedFileFormats.SequenceEqual(other.SupportedFileFormats)));
 }
コード例 #2
0
        public bool Equals(CompositeBitmapImageElementConstraints other)
        {
            if (other is null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(ImageSizeRange.Equals(other.ImageSizeRange) &&
                   SizeSpecificImageMaxSize == other.SizeSpecificImageMaxSize &&
                   MaxSize == other.MaxSize &&
                   MaxFilenameLength == other.MaxFilenameLength &&
                   BinaryExists == other.BinaryExists &&
                   ValidImage == other.ValidImage &&
                   ExtensionMatchContentFormat == other.ExtensionMatchContentFormat &&
                   (ReferenceEquals(SupportedFileFormats, other.SupportedFileFormats) ||
                    SupportedFileFormats.SequenceEqual(other.SupportedFileFormats)));
        }
コード例 #3
0
        public bool Equals(BitmapImageElementConstraints other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (SupportedFileFormats == null && other.SupportedFileFormats != null ||
                SupportedFileFormats != null && other.SupportedFileFormats == null)
            {
                return(false);
            }

            if (SupportedImageSizes == null && other.SupportedImageSizes != null ||
                SupportedImageSizes != null && other.SupportedImageSizes == null)
            {
                return(false);
            }

            return(MaxSize == other.MaxSize &&
                   MaxFilenameLength == other.MaxFilenameLength &&
                   BinaryExists == other.BinaryExists &&
                   ValidImage == other.ValidImage &&
                   ExtensionMatchContentFormat == other.ExtensionMatchContentFormat &&
                   (ReferenceEquals(SupportedFileFormats, other.SupportedFileFormats) || SupportedFileFormats.SequenceEqual(other.SupportedFileFormats)) &&
                   (ReferenceEquals(SupportedImageSizes, other.SupportedImageSizes) || SupportedImageSizes.SequenceEqual(other.SupportedImageSizes)) &&
                   IsAlphaChannelRequired == other.IsAlphaChannelRequired);
        }