private void BeginType(Indention firstIndent) { if (this.Document != null) { var definitionParts = new List <string>() { ".class", this.Builder.GetAttributes(), this.Builder.FullName, "extends", new TypeDescriptor(this.Builder.BaseType, this.Builder.Assembly).Value }; if (this.InterfacesToImplement != null && this.InterfacesToImplement.Count > 0) { foreach (var interfaceToImplement in this.InterfacesToImplement) { if (interfaceToImplement != null && interfaceToImplement.IsInterface) { definitionParts.Add("implements"); definitionParts.Add(interfaceToImplement.FullName); } } } this.Document.WriteText(new CodeLine( string.Join(" ", definitionParts.ToArray()), firstIndent)); this.Document.WriteText(new CodeLine("{")); } }
internal TypeDebugging(TypeBuilder type, HashSet <Type> interfacesToImplement, CodeDocument document, ISymbolDocumentWriter symbolDocument, Indention firstIndent) : base() { this.Builder = type; this.Document = document; this.SymbolDocument = symbolDocument; this.InterfacesToImplement = interfacesToImplement; this.AddInterfacesToImplement(); this.BeginType(firstIndent); }
private void Dispose(bool disposing) { if ((!this.Disposed && disposing) && (this.Document != null)) { Indention decrease = Indention.Decrease; if (!this.CreatedMethod) { decrease = Indention.KeepCurrent; } this.Document.WriteText(new CodeLine("}", decrease)); } this.Disposed = true; }
private IToken GenerateImaginaryToken(Indention indention, IToken original) { switch (indention) { case Indention.Indent: return new CommonToken(original) { Text = "INDENT", Type = this.indentType, Channel = this.channelNumber, }; case Indention.Dedent: return new CommonToken(original) { Text = "DEDENT", Type = this.dedentType, Channel = this.channelNumber, }; default: throw new AutomationException("Unknown indentation: " + indention.ToString()); } }
internal ConstructorMethodDebugging(ConstructorBuilder method, CodeDocument document, ISymbolDocumentWriter symbolDocument, Indention firstIndent) : base(method, method.GetILGenerator(), document, symbolDocument, firstIndent) { }
internal CodeLine(string code, Indention indent, bool isDebuggable, params Label[] labels) : this(code, indent, isDebuggable) { this.Labels = labels; }
internal CodeLine(string code, Indention indent, params Label[] labels) : this(code, indent, false, labels) { }
internal CodeLine(string code, Indention indent, bool isDebuggable) : this(code, isDebuggable) { this.Indent = indent; }
internal CodeLine(string code, Indention indent) : this(code, indent, false) { }
protected internal MethodBaseDebugging(T method, ILGenerator generator, CodeDocument document, ISymbolDocumentWriter symbolDocument, Indention firstIndent) : this() { this.Builder = method; this.Generator = generator; this.Document = document; this.SymbolDocument = symbolDocument; this.CurrentIndent = firstIndent; if (this.Document != null) { this.BeginMethod(method); } }