GetInstance() public static method

public static GetInstance ( Asn1TaggedObject obj, bool explicitly ) : V2Form
obj Asn1TaggedObject
explicitly bool
return V2Form
コード例 #1
0
ファイル: AttCertIssuer.cs プロジェクト: aata/flashcards-wp7
        public static AttCertIssuer GetInstance(
            object obj)
        {
            if (obj is AttCertIssuer)
            {
                return((AttCertIssuer)obj);
            }
            else if (obj is V2Form)
            {
                return(new AttCertIssuer(V2Form.GetInstance(obj)));
            }
            else if (obj is GeneralNames)
            {
                return(new AttCertIssuer((GeneralNames)obj));
            }
            else if (obj is Asn1TaggedObject)
            {
                return(new AttCertIssuer(V2Form.GetInstance((Asn1TaggedObject)obj, false)));
            }
            else if (obj is Asn1Sequence)
            {
                return(new AttCertIssuer(GeneralNames.GetInstance(obj)));
            }

            throw new ArgumentException("unknown object in factory: " + obj.GetType().Name, "obj");
        }
コード例 #2
0
 public static AttCertIssuer GetInstance(object obj)
 {
     //IL_007a: Unknown result type (might be due to invalid IL or missing references)
     if (obj is AttCertIssuer)
     {
         return((AttCertIssuer)obj);
     }
     if (obj is V2Form)
     {
         return(new AttCertIssuer(V2Form.GetInstance(obj)));
     }
     if (obj is GeneralNames)
     {
         return(new AttCertIssuer((GeneralNames)obj));
     }
     if (obj is Asn1TaggedObject)
     {
         return(new AttCertIssuer(V2Form.GetInstance((Asn1TaggedObject)obj, explicitly: false)));
     }
     if (obj is Asn1Sequence)
     {
         return(new AttCertIssuer(GeneralNames.GetInstance(obj)));
     }
     throw new ArgumentException("unknown object in factory: " + Platform.GetTypeName(obj), "obj");
 }
コード例 #3
0
 public static V2Form GetInstance(Asn1TaggedObject obj, bool explicitly)
 {
     return(V2Form.GetInstance(Asn1Sequence.GetInstance(obj, explicitly)));
 }