Пример #1
0
        public override bool Equals(Blob blob)
        {
            if (blob == null)
            {
                return(false);
            }
            if (blob == this)
            {
                return(true);
            }
            var eb = blob as ExternalBlob;

            if (eb == null || !Connection.Equals(eb.Connection) || _identifier.Length != eb._identifier.Length ||
                (_compression != eb._compression && _compression != null && !_compression.Equals(eb._compression)))
            {
                return(false);
            }
            byte[] a = _identifier, b = eb._identifier;
            return(!a.Where((t, i) => t != b[i]).Any());
        }
Пример #2
0
        public override bool Equals(Clob clob)
        {
            if (clob == null)
            {
                return(false);
            }
            if (clob == this)
            {
                return(true);
            }
            var ec = clob as ExternalClob;

            if (ec == null || !Connection.Equals(ec.Connection) || _identifier.Length != ec._identifier.Length ||
                !_encoding.Equals(ec._encoding) ||
                (_compression != ec._compression && _compression != null && !_compression.Equals(ec._compression)))
            {
                return(false);
            }
            byte[] a = _identifier, b = ec._identifier;
            return(!a.Where((t, i) => t != b[i]).Any());
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            var tc = obj as XmlTextCompressor;

            if (tc == null)
            {
                return(false);
            }
            if (Encoding != tc.Encoding)
            {
                return(false);
            }
            if (ConformanceLevel != tc.ConformanceLevel)
            {
                return(false);
            }
            return(_compressor == tc._compressor || (_compressor != null && _compressor.Equals(tc._compressor)));
        }
Пример #4
0
 public override bool Equals(object obj)
 {
     return(base.Equals(obj) && (_compression == ((ExternalBlobType)obj)._compression || (_compression != null && _compression.Equals(((ExternalBlobType)obj)._compression))));
 }