GetInstance() 공개 정적인 메소드

public static GetInstance ( object obj ) : OtherRevRefs
obj object
리턴 OtherRevRefs
예제 #1
0
        private CrlOcspRef(
            Asn1Sequence seq)
        {
            if (seq == null)
            {
                throw new ArgumentNullException("seq");
            }

            foreach (Asn1TaggedObject taggedObj in seq)
            {
                Asn1Object asn1Obj = taggedObj.GetObject();

                switch (taggedObj.TagNo)
                {
                case 0:
                    this.crlids = CrlListID.GetInstance(asn1Obj);
                    break;

                case 1:
                    this.ocspids = OcspListID.GetInstance(asn1Obj);
                    break;

                case 2:
                    this.otherRev = OtherRevRefs.GetInstance(asn1Obj);
                    break;

                default:
                    throw new ArgumentException("Illegal tag in CrlOcspRef", "seq");
                }
            }
        }
예제 #2
0
        private CrlOcspRef(Asn1Sequence seq)
        {
            //IL_000e: Unknown result type (might be due to invalid IL or missing references)
            //IL_007f: Unknown result type (might be due to invalid IL or missing references)
            if (seq == null)
            {
                throw new ArgumentNullException("seq");
            }
            global::System.Collections.IEnumerator enumerator = seq.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)enumerator.get_Current();
                    Asn1Object       @object          = asn1TaggedObject.GetObject();
                    switch (asn1TaggedObject.TagNo)
                    {
                    case 0:
                        crlids = CrlListID.GetInstance(@object);
                        break;

                    case 1:
                        ocspids = OcspListID.GetInstance(@object);
                        break;

                    case 2:
                        otherRev = OtherRevRefs.GetInstance(@object);
                        break;

                    default:
                        throw new ArgumentException("Illegal tag in CrlOcspRef", "seq");
                    }
                }
            }
            finally
            {
                global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }