Пример #1
0
 /// <summary>
 /// Initializes the type tags for the specified type. The type tag
 /// may be part in a chain of type tags, in which case the chain
 /// is preserved. The last tag in the chain will be added first,
 /// in order to be able to override (or preserve) a previous tag.
 /// </summary>
 /// <param name="type">The MIB type</param>
 /// <param name="tag">The MIB type tag</param>
 private void InitializeTypeTag(MibType type, MibTypeTag tag)
 {
     if (tag == null)
     {
         return;
     }
     else if (tag.Next == null)
     {
         type.SetTag(this.implicitTag, tag);
     }
     else
     {
         this.InitializeTypeTag(type, tag.Next);
         type.SetTag(false, tag);
     }
 }
Пример #2
0
 /// <summary>
 /// Sets the type tag. This method will keep the type tag stored
 /// until the type reference is resolved.
 /// </summary>
 /// <param name="implicitly">The implicit inheritance tag</param>
 /// <param name="tag">The new type tag</param>
 public override void SetTag(bool implicitly, MibTypeTag tag)
 {
     if (this.tag == null)
     {
         this.tag         = tag;
         this.implicitTag = implicitly;
     }
     else if (implicitly)
     {
         tag.Next = this.tag.Next;
         this.tag = tag;
     }
     else
     {
         tag.Next = this.tag;
         this.tag = tag;
     }
 }