Beispiel #1
0
        protected override bool Asn1Equals(Asn1Object asn1Object)
        {
            Asn1Set asn1Set = asn1Object as Asn1Set;

            if (asn1Set == null)
            {
                return(false);
            }
            if (Count != asn1Set.Count)
            {
                return(false);
            }
            global::System.Collections.IEnumerator enumerator  = GetEnumerator();
            global::System.Collections.IEnumerator enumerator2 = asn1Set.GetEnumerator();
            while (enumerator.MoveNext() && enumerator2.MoveNext())
            {
                Asn1Object asn1Object2 = GetCurrent(enumerator).ToAsn1Object();
                Asn1Object obj         = GetCurrent(enumerator2).ToAsn1Object();
                if (!asn1Object2.Equals(obj))
                {
                    return(false);
                }
            }
            return(true);
        }
Beispiel #2
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())
            {
//				if (!Platform.Equals(s1.Current, s2.Current))
                Asn1Object o1 = ((Asn1Encodable)s1.Current).ToAsn1Object();

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

            return(true);
        }
Beispiel #3
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);
        }
Beispiel #4
0
        protected override bool Asn1Equals(Asn1Object asn1Object)
        {
            Asn1Set asn1Set = asn1Object as Asn1Set;

            if (asn1Set == null)
            {
                return(false);
            }
            if (this.Count != asn1Set.Count)
            {
                return(false);
            }
            IEnumerator enumerator  = this.GetEnumerator();
            IEnumerator enumerator2 = asn1Set.GetEnumerator();

            while (enumerator.MoveNext() && enumerator2.MoveNext())
            {
                Asn1Object asn1Object2 = this.GetCurrent(enumerator).ToAsn1Object();
                Asn1Object obj         = this.GetCurrent(enumerator2).ToAsn1Object();
                if (!asn1Object2.Equals(obj))
                {
                    return(false);
                }
            }
            return(true);
        }
        protected override bool Asn1Equals(
            Asn1Object obj)
        {
            Asn1Sequence other = obj as Asn1Sequence;

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

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

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

            while (s1.MoveNext() && s2.MoveNext())
            {
//				if (!object.Equals(s1.Current, s2.Current))
                Asn1Object o1 = ((Asn1Encodable)s1.Current).ToAsn1Object();

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

            return(true);
        }
        protected override bool Asn1Equals(Asn1Object asn1Object)
        {
            Asn1Sequence sequence = asn1Object as Asn1Sequence;

            if (sequence == null)
            {
                return(false);
            }
            if (this.Count != sequence.Count)
            {
                return(false);
            }
            IEnumerator e          = this.GetEnumerator();
            IEnumerator enumerator = sequence.GetEnumerator();

            while (e.MoveNext() && enumerator.MoveNext())
            {
                Asn1Object obj2 = this.GetCurrent(e).ToAsn1Object();
                Asn1Object obj3 = this.GetCurrent(enumerator).ToAsn1Object();
                if (!obj2.Equals(obj3))
                {
                    return(false);
                }
            }
            return(true);
        }
Beispiel #7
0
        protected override bool Asn1Equals(Asn1Object asn1Object)
        {
            if (this == asn1Object)
            {
                return(true);
            }
            DerExternal derExternal = asn1Object as DerExternal;

            if (derExternal == null)
            {
                return(false);
            }
            if (object.Equals((object)directReference, (object)derExternal.directReference) && object.Equals((object)indirectReference, (object)derExternal.indirectReference) && object.Equals((object)dataValueDescriptor, (object)derExternal.dataValueDescriptor))
            {
                return(externalContent.Equals(derExternal.externalContent));
            }
            return(false);
        }
Beispiel #8
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));
        }