Ejemplo n.º 1
0
 public override void Visit(ICustomModifier customModifier)
 {
     this.typeReferenceNeedsToken = true;
     this.Visit(customModifier.GetModifier(Context));
 }
 public override void Visit(ICustomModifier customModifier)
 {
     if(Process(customModifier)){visitor.Visit(customModifier);}
     base.Visit(customModifier);
 }
Ejemplo n.º 3
0
 public virtual void Visit(ICustomModifier customModifier)
 {
     this.Visit(customModifier.GetModifier(Context));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Performs some computation with the given custom modifier.
 /// </summary>
 public void Visit(ICustomModifier customModifier)
 {
     if (customModifier.Modifier is Dummy)
       this.ReportError(MetadataError.IncompleteNode, customModifier, "Modifier");
     else if (!(customModifier.Modifier is INamedTypeReference))
       this.ReportError(MetadataError.InvalidCustomModifier, customModifier);
 }
Ejemplo n.º 5
0
 public virtual void onMetadataElement(ICustomModifier customModifier) { }
Ejemplo n.º 6
0
 /// <summary>
 /// Traverses the custom modifier.
 /// </summary>
 public void Traverse(ICustomModifier customModifier)
 {
     Contract.Requires(customModifier != null);
       if (this.preorderVisitor != null) this.preorderVisitor.Visit(customModifier);
       if (this.stopTraversal) return;
       this.TraverseChildren(customModifier);
       if (this.stopTraversal) return;
       if (this.postorderVisitor != null) this.postorderVisitor.Visit(customModifier);
 }
Ejemplo n.º 7
0
 public void Visit(ICustomModifier customModifier)
 {
     Contract.Assume(false);
 }
 void CustomModifier(ICustomModifier customModifier) {
   if (customModifier.IsOptional) {
     this.ILDasmPaper.Keyword("modopt");
   } else {
     this.ILDasmPaper.Keyword("modreq");
   }
   this.ILDasmPaper.Symbol("(");
   this.TypeReference(customModifier.Modifier);
   this.ILDasmPaper.Symbol(")");
 }
Ejemplo n.º 9
0
 public virtual void onMetadataElement(ICustomModifier customModifier)
 {
 }
 /// <summary>
 /// Performs some computation with the given custom modifier.
 /// </summary>
 public virtual void Visit(ICustomModifier customModifier)
 {
 }
Ejemplo n.º 11
0
 public virtual void Visit(ICustomModifier customModifier)
 {
     this.Visit(customModifier.GetModifier(Context));
 }
 /// <summary>
 /// Rewrites the given custom modifier.
 /// </summary>
 public virtual ICustomModifier Rewrite(ICustomModifier customModifier)
 {
     return customModifier;
 }
Ejemplo n.º 13
0
 public override void TraverseChildren(ICustomModifier customModifier)
 {
     MethodEnter(customModifier);
     base.TraverseChildren(customModifier);
     MethodExit();
 }
Ejemplo n.º 14
0
 public override void Visit(ICustomModifier customModifier)
 {
     allElements.Add(new InvokInfo(Traverser, "ICustomModifier", customModifier));
 }
Ejemplo n.º 15
0
 private void AppendCustomModifier(NameFormattingOptions formattingOptions, StringBuilder sb, ICustomModifier modifier)
 {
     sb.Append(' ');
     sb.Append(modifier.IsOptional ? "modopt" : "modreq");
     sb.Append('(');
     sb.Append(_formatter.GetTypeName(modifier.Modifier, formattingOptions & ~NameFormattingOptions.OmitContainingType));
     sb.Append(')');
 }
Ejemplo n.º 16
0
        public override void TraverseChildren(ICustomModifier customModifier)
{ MethodEnter(customModifier);
            base.TraverseChildren(customModifier);
     MethodExit();   }
Ejemplo n.º 17
0
 //^ ensures this.path.Count == old(this.path.Count);
 /// <summary>
 /// Performs some computation with the given custom modifier.
 /// </summary>
 /// <param name="customModifier"></param>
 public virtual void Visit(ICustomModifier customModifier)
 {
     if (this.stopTraversal) return;
       //^ int oldCount = this.path.Count;
       this.path.Push(customModifier);
       this.Visit(customModifier.Modifier);
       //^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not decrease this.path.Count.
       this.path.Pop();
 }
 private void AppendCustomModifier(NameFormattingOptions formattingOptions, StringBuilder sb, ICustomModifier modifier)
 {
     sb.Append(' ');
     sb.Append(modifier.IsOptional ? "modopt" : "modreq");
     sb.Append('(');
     sb.Append(_formatter.GetTypeName(modifier.Modifier, formattingOptions & ~NameFormattingOptions.OmitContainingType));
     sb.Append(')');
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Traverses the children of the custom modifier.
 /// </summary>
 public virtual void TraverseChildren(ICustomModifier customModifier)
 {
     Contract.Requires(customModifier != null);
       this.Traverse(customModifier.Modifier);
 }
Ejemplo n.º 20
0
 public override void Visit(ICustomModifier customModifier)
 {
     this.typeReferenceNeedsToken = true;
     this.Visit(customModifier.GetModifier(Context));
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Performs some computation with the given custom modifier.
 /// </summary>
 public virtual void Visit(ICustomModifier customModifier)
 {
 }
Ejemplo n.º 22
0
 public void Visit(ICustomModifier customModifier)
 {
     throw new NotImplementedException();
 }
 public override void TraverseChildren(ICustomModifier customModifier) {
   base.TraverseChildren(customModifier);
 }
Ejemplo n.º 24
0
 public override void Visit(ICustomModifier customModifier) {
   customModifier.Modifier.Dispatch(this);
   if (customModifier.IsOptional) {
     int h = this.hash;
     h = (h << 5 + h) ^ 1;
     this.hash = h;
   }
 }
Ejemplo n.º 25
0
    uint GetCustomModifierInternId(ICustomModifier customModifier) {
      Contract.Requires(customModifier != null);

      uint currentTypeRefInternedId = this.GetTypeReferenceInternId(customModifier.Modifier);
      uint isOptionalIntneredId = customModifier.IsOptional ? 0xF0F0F0F0 : 0x0F0F0F0F;  //  Just for the heck of it...
      uint value = this.CustomModifierHashTable.Find(currentTypeRefInternedId, isOptionalIntneredId);
      if (value == 0) {
        value = this.CurrentCustomModifierInternValue++;
        this.CustomModifierHashTable.Add(currentTypeRefInternedId, isOptionalIntneredId, value);
      }
      return value;
    }
Ejemplo n.º 26
0
 /// <summary>
 /// Traverses the children of the custom modifier.
 /// </summary>
 public virtual void TraverseChildren(ICustomModifier customModifier)
 {
     this.Traverse(customModifier.Modifier);
 }