Org.BouncyCastle.Asn1.X509.Target.GetInstance C# (CSharp) Method

GetInstance() public static method

public static GetInstance ( object obj ) : Target
obj object
return Target
		public static Target GetInstance(
			object obj)
		{
			if (obj is Target)
			{
				return (Target) obj;
			}

			if (obj is Asn1TaggedObject)
			{
				return new Target((Asn1TaggedObject) obj);
			}

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

Usage Example

Example #1
0
 public virtual Target[] GetTargets()
 {
     Target[] array = new Target[this.targets.Count];
     for (int i = 0; i < this.targets.Count; i++)
     {
         array[i] = Target.GetInstance(this.targets[i]);
     }
     return(array);
 }
All Usage Examples Of Org.BouncyCastle.Asn1.X509.Target::GetInstance