protected override bool Asn1Equals(Asn1Object asn1Object) { Asn1Sequence that = asn1Object as Asn1Sequence; if (null == that) { return(false); } int count = this.Count; if (that.Count != count) { return(false); } for (int i = 0; i < count; ++i) { Asn1Object o1 = this.elements[i].ToAsn1Object(); Asn1Object o2 = that.elements[i].ToAsn1Object(); if (o1 != o2 && !o1.CallAsn1Equals(o2)) { return(false); } } return(true); }
public sealed override bool Equals(object obj) { if (obj == this) { return(true); } IAsn1Convertible asn1Convertible = obj as IAsn1Convertible; if (asn1Convertible == null) { return(false); } Asn1Object asn1Object = ToAsn1Object(); Asn1Object asn1Object2 = asn1Convertible.ToAsn1Object(); return(asn1Object == asn1Object2 || asn1Object.CallAsn1Equals(asn1Object2)); }
public sealed override bool Equals(object obj) { if (obj == this) { return(true); } IAsn1Convertible convertible = obj as IAsn1Convertible; if (convertible == null) { return(false); } Asn1Object obj2 = this.ToAsn1Object(); Asn1Object obj3 = convertible.ToAsn1Object(); return((obj2 == obj3) || obj2.CallAsn1Equals(obj3)); }
public sealed override bool Equals( object obj) { if (obj == this) { return(true); } IAsn1Convertible other = obj as IAsn1Convertible; if (other == null) { return(false); } Asn1Object o1 = ToAsn1Object(); Asn1Object o2 = other.ToAsn1Object(); return(o1 == o2 || o1.CallAsn1Equals(o2)); }