Browse Source

Replace Console.WriteLine with Debug.WriteLine

pull/3398/head
Christoph Wille 2 months ago
parent
commit
50e62acbd2
  1. 7
      ICSharpCode.ILSpyX/MermaidDiagrammer/Generator.Run.cs
  2. 6
      ICSharpCode.ILSpyX/Search/CSharpLexer.cs

7
ICSharpCode.ILSpyX/MermaidDiagrammer/Generator.Run.cs

@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
using System; using System;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text.Json; using System.Text.Json;
@ -45,7 +46,7 @@ namespace ICSharpCode.ILSpyX.MermaidDiagrammer
if (File.Exists(xmlDocsPath)) if (File.Exists(xmlDocsPath))
xmlDocs = new XmlDocumentationFormatter(new XmlDocumentationProvider(xmlDocsPath), StrippedNamespaces?.ToArray()); xmlDocs = new XmlDocumentationFormatter(new XmlDocumentationProvider(xmlDocsPath), StrippedNamespaces?.ToArray());
else else
Console.WriteLine("No XML documentation file found. Continuing without."); Debug.WriteLine("No XML documentation file found. Continuing without.");
return xmlDocs; return xmlDocs;
} }
@ -104,7 +105,7 @@ namespace ICSharpCode.ILSpyX.MermaidDiagrammer
if (JsonOnly) if (JsonOnly)
{ {
File.WriteAllText(Path.Combine(outputFolder, "model.json"), modelJson); File.WriteAllText(Path.Combine(outputFolder, "model.json"), modelJson);
Console.WriteLine("Successfully generated model.json for HTML diagrammer."); Debug.WriteLine("Successfully generated model.json for HTML diagrammer.");
} }
else else
{ {
@ -123,7 +124,7 @@ namespace ICSharpCode.ILSpyX.MermaidDiagrammer
foreach (var resource in new[] { "styles.css", "ILSpy.ico", "script.js" }) foreach (var resource in new[] { "styles.css", "ILSpy.ico", "script.js" })
EmbeddedResource.CopyTo(outputFolder, resource); EmbeddedResource.CopyTo(outputFolder, resource);
Console.WriteLine("Successfully generated HTML diagrammer."); Debug.WriteLine("Successfully generated HTML diagrammer.");
} }
if (ReportExludedTypes) if (ReportExludedTypes)

6
ICSharpCode.ILSpyX/Search/CSharpLexer.cs

@ -257,7 +257,7 @@ namespace ICSharpCode.ILSpyX.Search
/// <returns>An <see cref="Token"/> object.</returns> /// <returns>An <see cref="Token"/> object.</returns>
public Literal Peek() public Literal Peek()
{ {
// Console.WriteLine("Call to Peek"); // Debug.WriteLine("Call to Peek");
if (peekToken.next == null) if (peekToken.next == null)
{ {
peekToken.next = Next(); peekToken.next = Next();
@ -275,7 +275,7 @@ namespace ICSharpCode.ILSpyX.Search
if (curToken == null) if (curToken == null)
{ {
curToken = Next(); curToken = Next();
//Console.WriteLine(ICSharpCode.NRefactory.Parser.CSharp.Tokens.GetTokenString(curToken.kind) + " -- " + curToken.val + "(" + curToken.kind + ")"); // Debug.WriteLine(ICSharpCode.NRefactory.Parser.CSharp.Tokens.GetTokenString(curToken.kind) + " -- " + curToken.val + "(" + curToken.kind + ")");
return curToken; return curToken;
} }
@ -287,7 +287,7 @@ namespace ICSharpCode.ILSpyX.Search
} }
curToken = curToken.next; curToken = curToken.next;
//Console.WriteLine(ICSharpCode.NRefactory.Parser.CSharp.Tokens.GetTokenString(curToken.kind) + " -- " + curToken.val + "(" + curToken.kind + ")"); // Debug.WriteLine(ICSharpCode.NRefactory.Parser.CSharp.Tokens.GetTokenString(curToken.kind) + " -- " + curToken.val + "(" + curToken.kind + ")");
return curToken; return curToken;
} }

Loading…
Cancel
Save