Exemplo n.º 1
0
        protected override bool Asn1Equals(
            Asn1Object asn1Object)
        {
            Asn1Set other = asn1Object as Asn1Set;

            if (other == null)
            {
                return(false);
            }

            if (Count != other.Count)
            {
                return(false);
            }

            IEnumerator s1 = GetEnumerator();
            IEnumerator s2 = other.GetEnumerator();

            while (s1.MoveNext() && s2.MoveNext())
            {
                Asn1Object o1 = GetCurrent(s1).ToAsn1Object();
                Asn1Object o2 = GetCurrent(s2).ToAsn1Object();

                if (!o1.Equals(o2))
                {
                    return(false);
                }
            }

            return(true);
        }
Exemplo n.º 2
0
        protected override bool Asn1Equals(
            Asn1Object asn1Object)
        {
            if (this == asn1Object)
            {
                return(true);
            }

            DerExternal other = asn1Object as DerExternal;

            if (other == null)
            {
                return(false);
            }

            return(Platform.Equals(directReference, other.directReference) &&
                   Platform.Equals(indirectReference, other.indirectReference) &&
                   Platform.Equals(dataValueDescriptor, other.dataValueDescriptor) &&
                   externalContent.Equals(other.externalContent));
        }