public override bool Equals(Clob clob) { if (clob == this) return true; var sc = clob as StringClob; if (sc == null) return false; return _text.Equals(sc._text); }
public override bool Equals(Clob clob) { var rc = clob as TextReaderClob; if (rc == null) return false; if (rc == this) return true; return _reader == rc._reader; }
public override bool Equals(Clob clob) { var fc = clob as FileClob; if (fc == null) return false; if (fc == this) return true; return fc._filename.Equals(_filename) && (fc._encoding == null || _encoding == null || fc._encoding == _encoding); }
public override bool Equals(Clob clob) { if (clob == null) { return(false); } if (clob == this) { return(true); } var wb = clob as WebClob; if (wb != null) { return(_uri.Equals(wb._uri) && _credentials == wb._credentials && _headers == wb._headers); } if (!_uri.IsFile) { return(false); } var fb = clob as FileClob; if (fb == null) { return(false); } return(_uri.LocalPath.Equals(fb.Filename)); }
public override bool Equals(Clob clob) { var ec = clob as EmptyClob; if (ec != null) return true; var sc = clob as StringClob; if (sc != null && sc.Text == "") return true; return false; }
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(); }
public override bool Equals(Clob clob) { var rc = clob as TextReaderClob; if (rc == null) { return(false); } if (rc == this) { return(true); } return(_reader == rc._reader); }
public override bool Equals(Clob clob) { var fc = clob as FileClob; if (fc == null) { return(false); } if (fc == this) { return(true); } return(fc._filename.Equals(_filename) && (fc._encoding == null || _encoding == null || fc._encoding == _encoding)); }
public override bool Equals(Clob clob) { if (clob == this) { return(true); } var sc = clob as StringClob; if (sc == null) { return(false); } return(_text.Equals(sc._text)); }
public override bool Equals(Clob clob) { var ec = clob as EmptyClob; if (ec != null) { return(true); } var sc = clob as StringClob; if (sc != null && sc.Text == "") { return(true); } return(false); }
public static long GetLength(this Clob clob) { using (TextReader reader = clob.OpenReader()) { var buffer = new char[1024]; long count = 0; while (true) { int length = reader.ReadBlock(buffer, 0, buffer.Length); if (length > 0) { count += length; } else { break; } } return(count); } }
public abstract bool Equals(Clob clob);
public abstract bool Equals(Clob clob);
public override bool Equals(Clob clob) { if (clob == null) return false; if (clob == this) return true; var wb = clob as WebClob; if (wb != null) return _uri.Equals(wb._uri) && _credentials == wb._credentials && _headers == wb._headers; if (!_uri.IsFile) return false; var fb = clob as FileClob; if (fb == null) return false; return _uri.LocalPath.Equals(fb.Filename); }