public override ASN1Object CreateInstance(BEREncoding ulazBER) { // ASN1ObjectIdentifier returnObject = new ASN1ObjectIdentifier(); // // returnObject.fromBER(ulazBER); /* now I have finished parameter. from this point on * I can set up whatever needed for CTX_DEP_TypeInfo... * */ this.uoid = new ASN1ObjectIdentifier(); this.uoid.fromBER(ulazBER); ///this. return this.uoid; }
/// <summary> /// Delegates .CreateInstance to its .Type component. /// </summary> /// <param name="ulazBER"></param> /// <returns></returns> public virtual ASN1Object CreateInstance(BEREncoding ulazBER) { return this.Type.CreateInstance(ulazBER); }
public override void fromBER(BEREncoding ulazBER) { this.intOctets = ulazBER.GetContents(); }
/// <summary> /// This method does not decode BER code. It just "remembers" it. /// This way unrecognised data doesn't break parsing. If this object /// has to be encoded again, it encodes itself as the BER code it /// remembered earlier. /// </summary> /// <param name="ulazBER">BER/DER code</param> public override void fromBER(BEREncoding ulazBER) { /// remember this BER and do nothing. this.unrecognisedBERCode = ulazBER; }
public override ASN1Object CreateInstance(BEREncoding ulazBER) { ASN1Object retObject=null; try { retObject = base.CreateInstance(ulazBER); } catch (UnrecognizedObjectIdentifierException) { if (retObject == null) { retObject = new ASN1PhantomObject(); retObject.fromBER(ulazBER); } } return retObject; }
public override ASN1Object CreateInstance(BEREncoding ulazBER) { /* Vrati, odnosno zovi CreateInstance od odgovarajuceg tipa, koji ce * biti setiran sa parIOSet i Column (at compile-time) i odgovarajuceg unique objekta * (at run-time). */ CheckUnique(); InformationObject iob = GetInformationObject(); try { ASN1Type tip = this.Projection(iob); return tip.CreateInstance(ulazBER); } catch { /// Unrecognized/unregistered OBJECT IDENTIFIER Exception /// ... could not resolve type ... throw new UnrecognizedObjectIdentifierException ("<unrecognized> see http://www.alvestrand.no/objectid/" + this.dependsOnThis.uoid.ToString()+".html"); } }