CSharpSourceEmitter.SourceEmitter.PrintPseudoCustomAttribute C# (CSharp) Method

PrintPseudoCustomAttribute() public method

Prints out a C# attribute which doesn't actually exist as an attribute in the metadata.
Perhaps callers should instead construct an ICustomAttribute instance (using some helpers), then they could just call PrintAttribute.
public PrintPseudoCustomAttribute ( IReference target, string typeName, string arguments, bool newLine, string targetType ) : void
target IReference
typeName string
arguments string
newLine bool
targetType string
return void
    public virtual void PrintPseudoCustomAttribute(IReference target, string typeName, string arguments, bool newLine, string targetType) {
      this.sourceEmitterOutput.Write("[", newLine);
      if (targetType != null) {
        this.sourceEmitterOutput.Write(targetType);
        this.sourceEmitterOutput.Write(": ");
      }
      this.sourceEmitterOutput.Write(typeName);
      if (arguments != null) {
        this.sourceEmitterOutput.Write("(");
        this.sourceEmitterOutput.Write(arguments);
        this.sourceEmitterOutput.Write(")");
      }
      this.sourceEmitterOutput.Write("]");
      if (newLine) this.sourceEmitterOutput.WriteLine("");      
    }
  }
SourceEmitter