##// END OF EJS Templates
Adde workaround to the behaviour of the logical operations stack in conjuction...
Adde workaround to the behaviour of the logical operations stack in conjuction with async/await methods

File last commit:

r255:b00441e04738 v3
r255:b00441e04738 v3
Show More
Program.cs
55 lines | 1.4 KiB | text/x-csharp | CSharpLexer
cin
Adde workaround to the behaviour of the logical operations stack in conjuction...
r255 using Implab.Diagnostics;
using Implab.Formats.Json;
cin
Improved AsyncQueue...
r233 using Implab.Parallels;
cin
JsonXmlReader performance tuning...
r229 using Implab.Xml;
using System;
cin
Improved AsyncQueue...
r233 using System.Collections.Concurrent;
cin
JsonXmlReader performance tuning...
r229 using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
cin
Improved AsyncQueue...
r233 using System.Threading;
cin
JsonXmlReader performance tuning...
r229 using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;
namespace Implab.Playground {
cin
Adde workaround to the behaviour of the logical operations stack in conjuction...
r255 using System.Diagnostics;
using System.Runtime.Remoting.Messaging;
using static Trace<Program>;
cin
JsonXmlReader performance tuning...
r229 public class Program {
cin
Adde workaround to the behaviour of the logical operations stack in conjuction...
r255 static void Main(string[] args) {
var listener = new SimpleTraceListener(Console.Out);
var source = Trace<Program>.TraceSource;
source.Switch.Level = SourceLevels.All;
cin
Improved AsyncQueue...
r233
cin
Adde workaround to the behaviour of the logical operations stack in conjuction...
r255 source.Listeners.Add(listener);
var t = Environment.TickCount;
cin
Improved AsyncQueue...
r233
cin
Adde workaround to the behaviour of the logical operations stack in conjuction...
r255 Main().Wait();
cin
JsonXmlReader performance tuning...
r229
cin
Adde workaround to the behaviour of the logical operations stack in conjuction...
r255 Console.WriteLine($"Done: {Environment.TickCount - t} ms");
Console.ReadKey();
cin
Improved AsyncQueue...
r233 }
cin
JsonXmlReader performance tuning...
r229
cin
Adde workaround to the behaviour of the logical operations stack in conjuction...
r255 static async Task Main() {
using (LogicalOperation(nameof(Main))) {
Log("Start");
await SomeAsync();
Log("End");
}
cin
Improved AsyncQueue...
r233 }
cin
JsonXmlReader performance tuning...
r229
cin
Adde workaround to the behaviour of the logical operations stack in conjuction...
r255 static async Task SomeAsync() {
using (LogicalOperation(nameof(SomeAsync))) {
Log("Do prepare");
await Task.Yield();
Log("Yield");
cin
Improved AsyncQueue...
r233 }
cin
JsonXmlReader performance tuning...
r229 }
}
}