Org.BouncyCastle.Asn1.Esf.OtherCertID.GetInstance C# (CSharp) Method

GetInstance() public static method

public static GetInstance ( object obj ) : OtherCertID
obj object
return OtherCertID
		public static OtherCertID GetInstance(
			object obj)
		{
			if (obj == null || obj is OtherCertID)
				return (OtherCertID) obj;

			if (obj is Asn1Sequence)
				return new OtherCertID((Asn1Sequence) obj);

			throw new ArgumentException(
				"Unknown object in 'OtherCertID' factory: "
					+ obj.GetType().Name,
				"obj");
		}

Usage Example

 private CompleteCertificateRefs(Asn1Sequence seq)
 {
     //IL_000e: 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())
         {
             Asn1Encodable asn1Encodable = (Asn1Encodable)enumerator.get_Current();
             OtherCertID.GetInstance(asn1Encodable.ToAsn1Object());
         }
     }
     finally
     {
         global::System.IDisposable disposable = enumerator as global::System.IDisposable;
         if (disposable != null)
         {
             disposable.Dispose();
         }
     }
     otherCertIDs = seq;
 }
All Usage Examples Of Org.BouncyCastle.Asn1.Esf.OtherCertID::GetInstance