// protected void OPT() // { // this.ComponentTypes[typeCounter].isOptional = true; // } protected void RegType(ASN1Type tip) { this.ComponentTypes[typeCounter] = ASN1ComponentTypeInfo.Make(tip); typeCounter++; }
protected void RegType(ASN1Type tip, bool optionality) { this.ComponentTypes[typeCounter] = ASN1ComponentTypeInfo.Make(tip, optionality); typeCounter++; }
/// <summary> /// OVO ZELIM BACITI VAN!!! U DRUGU KLASU!! /// /// koriste samo Choice i Sequence... to se mora moci lako srediti. /// </summary> /// <param name="tag"></param> /// <param name="tip"></param> /// <returns></returns> public static bool MatchTag (int tag, ASN1Type tip) { if (tip.SkipMatch) { return true; } else if (tip.Tags != null) { return (tip.Tags.Contains(tag)); } else return (tag == tip.Tag); }
protected void RegType(ASN1Type tip, ASN1Object defaultValue) { this.ComponentTypes[typeCounter] = ASN1ComponentTypeInfo.Make(tip, defaultValue); typeCounter++; }
/// <summary> /// Koji je UNIQUE? /// </summary> public void Assign(ASN1ObjectIdentifier _id, ASN1Type _type) { this.id = _id; this.type = _type; this.uniqueId = this.id; }
/// <summary> /// MUST CHANGE, MOVE OR WHATEVER.... /// usage - u ASN1Sequence.. /// /// <para>Returns true if ASN1Object ob and ASN1Type tip match.</para> /// </summary> /// <param name="ob"></param> /// <param name="tip"></param> /// <returns></returns> public static bool MatchType(ASN1Object ob, ASN1Type tip) { if ((tip == null)||(ob==null)) { /// Ovo je zbog SET OF. /// Nadam se da necu platiti penale za ovo. :-( return true; } if (tip.SkipMatch) { return true; } else if (tip.Tags != null) { return (tip.Tags.Contains(ob.Tag)); } else return (ob.Tag == tip.Tag); }
public TypeIdentifier(ASN1ObjectIdentifier _id, ASN1Type _type) { this.Assign(_id, _type); }
public void Add(ASN1ObjectIdentifier oid, ASN1Type type) { TypeIdentifier ti = new TypeIdentifier(oid, type); this.Add(ti); }
public virtual void Reg(int tagNum, ASN1Type underType) { this.Tag = tagNum; this.type = underType; }
public virtual void Reg(int tagNum, ASN1Type belongingType) { this.Tag = tagNum; this.type = belongingType; }
public ASN1ExplicitTag(ASN1Type type):this() { this.type = type; }