You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With new style Main (where you don't have Program class) the csharpier seems to add two new lines between expressions. Presumably because it's common to have two newlines between types? But with new style Main they are not types in the top level anymore.
This happens e.g. with CSX files or .NET 6 program files, here is a formatted output from csharpier:
vart=new TaskQueue(maxParallelizationCount:2, maxQueueLength:2);
t.Queue(()=> DoTask(1));// Runs this on 1st batch.// Works even without following `Wait()`, in that case the first// starts immediately the second near instantly following, and third// waits until either 1 or 2 completes.
t.Process().Wait();
Console.WriteLine("First batch should have ran to completion.");
Console.WriteLine("");
t.Queue(()=> DoTask(2));// Runs this on 2nd batch
t.Queue(()=> DoTask(3));// Runs this on 2nd batchtry{
t.Queue(()=> DoTask(4));// Not ran, capped}catch(TaskQueue.QueueLimitReachedException){
Console.WriteLine("Queue limit reached");}
t.Process().Wait();
Console.WriteLine($"Processed second batch. Queue and running tasks should be empty.");
Console.WriteLine($"Queue has now {t.GetQueueCount()} future tasks, and {t.GetRunningCount()} running tasks.");
Console.WriteLine("");
t.Queue(()=> DoTask(7));// Runs this on 2nd batch
t.Queue(()=> DoTask(8));// Runs this on 2nd batchtry{
t.Queue(()=> DoTask(9));// Not ran, capped}catch(TaskQueue.QueueLimitReachedException){
Console.WriteLine("Queue limit reached 2");}
Console.WriteLine($"Queued. Queue should have two future tasks, and nothing running yet.");
Console.WriteLine($"Queue has now {t.GetQueueCount()} future tasks, and {t.GetRunningCount()} running tasks.");
t.Process().Wait();
Console.WriteLine("Completed, press enter to quit.");
Console.ReadLine();
Console.WriteLine("The End!");
It added double new lines there.
The text was updated successfully, but these errors were encountered:
With new style Main (where you don't have Program class) the csharpier seems to add two new lines between expressions. Presumably because it's common to have two newlines between types? But with new style Main they are not types in the top level anymore.
This happens e.g. with CSX files or .NET 6 program files, here is a formatted output from csharpier:
It added double new lines there.
The text was updated successfully, but these errors were encountered: