Org.BouncyCastle.Asn1.Cmp.Challenge.GetInstance C# (CSharp) Méthode

GetInstance() public static méthode

public static GetInstance ( object obj ) : Challenge
obj object
Résultat Challenge
		public static Challenge GetInstance(object obj)
		{
			if (obj is Challenge)
				return (Challenge)obj;

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

			throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj");
		}

Usage Example

 public virtual Challenge[] ToChallengeArray()
 {
     Challenge[] array = new Challenge[content.Count];
     for (int i = 0; i != array.Length; i++)
     {
         array[i] = Challenge.GetInstance(content[i]);
     }
     return(array);
 }
All Usage Examples Of Org.BouncyCastle.Asn1.Cmp.Challenge::GetInstance