Org.BouncyCastle.Asn1.Asn1TaggedObject.IsExplicit C# (CSharp) Method

IsExplicit() public method

public IsExplicit ( ) : bool
return bool
        public bool IsExplicit()
        {
            return explicitly;
        }

Usage Example

Example #1
0
        public static Asn1Sequence GetInstance(Asn1TaggedObject obj, bool explicitly)
        {
            //IL_0017: Unknown result type (might be due to invalid IL or missing references)
            //IL_0066: Unknown result type (might be due to invalid IL or missing references)
            Asn1Object @object = obj.GetObject();

            if (explicitly)
            {
                if (!obj.IsExplicit())
                {
                    throw new ArgumentException("object implicit - explicit expected.");
                }
                return((Asn1Sequence)@object);
            }
            if (obj.IsExplicit())
            {
                if (obj is BerTaggedObject)
                {
                    return(new BerSequence(@object));
                }
                return(new DerSequence(@object));
            }
            if (@object is Asn1Sequence)
            {
                return((Asn1Sequence)@object);
            }
            throw new ArgumentException("Unknown object in GetInstance: " + Platform.GetTypeName(obj), "obj");
        }
All Usage Examples Of Org.BouncyCastle.Asn1.Asn1TaggedObject::IsExplicit