Skip to content

Commit 122a815

Browse files
committed
commenting console writeline
1 parent be39947 commit 122a815

5 files changed

Lines changed: 22 additions & 9 deletions

File tree

src/NetCore2Blockly/NetCore2Blockly/ExtensionMethods/CLIExtension.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,15 @@ static string nameBlockly()
3636
return $"{nameBlockly} version:{assName.Version.ToString()}";
3737
}
3838
static CLIExtension()
39-
{
40-
Console.WriteLine(nameBlockly());
39+
{
40+
try
41+
{
42+
Console.WriteLine(nameBlockly());
43+
}
44+
catch
45+
{
46+
//if cannot write to console, what can be done ? ;-)
47+
}
4148
}
4249
/// <summary>
4350
/// Uses the blockly links from config

src/NetCore2Blockly/NetCore2Blockly/GenerateBlocklyFilesHostedService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ internal async Task AddSwagger(string key, string endpoint)
6666
}
6767
catch (Exception ex)
6868
{
69-
Console.WriteLine($"adding swagger {endpoint} throws error {ex?.Message}");
69+
//Console.WriteLine($"adding swagger {endpoint} throws error {ex?.Message}");
7070
//swallowing error - should run even if the endpoint is not available
7171

7272
}
@@ -286,7 +286,7 @@ async Task<List<ActionInfo>> GenerateFromSwaggerEndPoint(string endpoint)
286286
}
287287
if (act.Params.ContainsKey(name))
288288
{
289-
Console.WriteLine($"DUPLICATE PARAM {name} FOR {act.RelativeRequestUrl}");
289+
//Console.WriteLine($"DUPLICATE PARAM {name} FOR {act.RelativeRequestUrl}");
290290

291291
}
292292
else
@@ -493,7 +493,7 @@ internal async Task AddOdata(string key, string endpoint, bool makeActionLocal =
493493
}
494494
catch (Exception ex)
495495
{
496-
Console.WriteLine($"adding swagger {endpoint} throws error {ex?.Message}");
496+
//Console.WriteLine($"adding swagger {endpoint} throws error {ex?.Message}");
497497
//swallowing error - should run even if the endpoint is not available
498498

499499
}

src/NetCore2Blockly/NetCore2Blockly/GraphQL/GraphQLActionInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private BindingSourceDefinition ConvertFromBindingSource(BindingSource bindingSo
103103
JsonElement root = doc.RootElement;
104104
JsonElement info = root;
105105

106-
Console.WriteLine(info.GetProperty("_typeMap").GetProperty("DepartmentOGT"));
106+
//Console.WriteLine(info.GetProperty("_typeMap").GetProperty("DepartmentOGT"));
107107
desc.Add("queyType", (null, BindingSourceDefinition.Query)); //not correct
108108
}
109109
return null;

src/NetCore2Blockly/NetCore2BlocklyStorage.Sqlite/CLIExtension.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ static CLIExtension()
3030
.OfType<AssemblyTitleAttribute>()
3131
.FirstOrDefault();
3232
var nameMoniker = (desc == null) ? "" : desc.Title;
33-
Console.WriteLine($"{assName.Name} {nameMoniker} version:{assName.Version.ToString()}");
34-
33+
try
34+
{
35+
Console.WriteLine($"{assName.Name} {nameMoniker} version:{assName.Version.ToString()}");
36+
}
37+
catch
38+
{
39+
//do nothing if cannot write to console...
40+
}
3541
}
3642

3743

src/NetCore2Blockly/TestBlocklyHtml/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ private IEdmModel ModelDB()
344344
}
345345
catch (Exception ex)
346346
{
347-
Console.WriteLine($" exception {ex.Message}");
347+
//Console.WriteLine($" exception {ex.Message}");
348348
return null;
349349
}
350350
}

0 commit comments

Comments
 (0)