NHibernate.Lob.External.ExternalBlob.Equals C# (CSharp) Method

Equals() public method

public Equals ( Blob blob ) : bool
blob Blob
return bool
		public override bool Equals(Blob blob)
		{
			if (blob == null) return false;
			if (blob == this) return true;
			ExternalBlob eb = blob as ExternalBlob;
			if (eb == null || !this.Connection.Equals(eb.Connection) || this.identifier.Length != eb.identifier.Length ||
				(this.compression != eb.compression && this.compression != null && !this.compression.Equals(eb.compression))) return false;
			byte[] a = this.identifier, b = eb.identifier;
			for (int i = 0; i < a.Length; i++)
				if (a[i] != b[i]) return false;
			return true;
		}
	}