From 414e3b0356326e79f9c78e348bcf5212abc27c38 Mon Sep 17 00:00:00 2001 From: Daniel Olvera <139163393+danOIntellitect@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:03:21 -0700 Subject: [PATCH] fix: Wrapped long lines (#569) ## Summary Fixes https://github.com/IntelliTect-dev/EssentialCSharp.Tooling/issues/1881 --- .../Listing21.08.ParallelLinqStandardQueryOperators.cs | 3 ++- src/Chapter21/Listing21.09.ParallelLinqQueryExpressions.cs | 3 ++- src/Chapter22/Listing22.01.UnsychronizedState.cs | 3 ++- src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs | 3 ++- src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs | 3 ++- src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs | 3 ++- src/Chapter22/Listing22.05.AsyncMain.cs | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Chapter21/Listing21.08.ParallelLinqStandardQueryOperators.cs b/src/Chapter21/Listing21.08.ParallelLinqStandardQueryOperators.cs index ce821c04c..606a8d44b 100644 --- a/src/Chapter21/Listing21.08.ParallelLinqStandardQueryOperators.cs +++ b/src/Chapter21/Listing21.08.ParallelLinqStandardQueryOperators.cs @@ -23,7 +23,8 @@ public static List if (data.Count() != parallelGroups.Sum( item => item.Length)) { - throw new Exception("data.Count() != parallelGroups.Sum(item => item.Count()"); + throw new Exception("data.Count() != parallelGroups" + + ".Sum(item => item.Count()"); } // ... #endregion INCLUDE diff --git a/src/Chapter21/Listing21.09.ParallelLinqQueryExpressions.cs b/src/Chapter21/Listing21.09.ParallelLinqQueryExpressions.cs index 2bafadc73..f135dae6f 100644 --- a/src/Chapter21/Listing21.09.ParallelLinqQueryExpressions.cs +++ b/src/Chapter21/Listing21.09.ParallelLinqQueryExpressions.cs @@ -26,7 +26,8 @@ orderby text if (data.Count() != parallelGroups.Sum( item => item.Count())) { - throw new Exception("data.Count() != parallelGroups.Sum(item => item.Count()"); + throw new Exception("data.Count() != parallelGroups" + + ".Sum(item => item.Count()"); } //... #endregion INCLUDE diff --git a/src/Chapter22/Listing22.01.UnsychronizedState.cs b/src/Chapter22/Listing22.01.UnsychronizedState.cs index 8387967f9..c8a7b1e1b 100644 --- a/src/Chapter22/Listing22.01.UnsychronizedState.cs +++ b/src/Chapter22/Listing22.01.UnsychronizedState.cs @@ -13,7 +13,8 @@ public static int Main(string[] args) { if (args?.Length > 0) { _ = int.TryParse(args[0], out _Total); } - Console.WriteLine($"Increment and decrementing {_Total} times..."); + Console.WriteLine("Increment and decrementing " + + $"{_Total} times..."); // Use Task.Factory.StartNew for .NET 4.0 Task task = Task.Run(() => Decrement()); diff --git a/src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs b/src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs index c68feb30f..f954e645b 100644 --- a/src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs +++ b/src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs @@ -10,7 +10,8 @@ public static int Main(string[] args) { int total = int.MaxValue; if (args?.Length > 0) { _ = int.TryParse(args[0], out total); } - Console.WriteLine($"Increment and decrementing {total} times..."); + Console.WriteLine("Increment and decrementing " + + $"{total} times..."); int x = 0; Parallel.For(0, total, i => { diff --git a/src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs b/src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs index 289ca8590..c182a4948 100644 --- a/src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs +++ b/src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs @@ -16,7 +16,8 @@ public class Program public static int Main(string[] args) { if (args?.Length > 0) { _ = int.TryParse(args[0], out _Total); } - Console.WriteLine($"Increment and decrementing {_Total} times..."); + Console.WriteLine("Increment and decrementing " + + $"{_Total} times..."); // Use Task.Factory.StartNew for .NET 4.0 Task task = Task.Run(() => Decrement()); diff --git a/src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs b/src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs index 2e9cd7047..3603e9183 100644 --- a/src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs +++ b/src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs @@ -15,7 +15,8 @@ public class Program public static int Main(string[] args) { if (args?.Length > 0) { _ = int.TryParse(args[0], out _Total); } - Console.WriteLine($"Increment and decrementing {_Total} times..."); + Console.WriteLine("Increment and decrementing " + + $"{_Total} times..."); // Use Task.Factory.StartNew for .NET 4.0 Task task = Task.Run(() => Decrement()); diff --git a/src/Chapter22/Listing22.05.AsyncMain.cs b/src/Chapter22/Listing22.05.AsyncMain.cs index 20b7bea53..9749e3c81 100644 --- a/src/Chapter22/Listing22.05.AsyncMain.cs +++ b/src/Chapter22/Listing22.05.AsyncMain.cs @@ -15,7 +15,8 @@ public static async Task Main(string[] args) #endregion HIGHLIGHT { if (args?.Length > 0) { _ = int.TryParse(args[0], out _Total); } - Console.WriteLine($"Increment and decrementing {_Total} times..."); + Console.WriteLine("Increment and decrementing " + + $"{_Total} times..."); // Use Task.Factory.StartNew for .NET 4.0 Task task = Task.Run(() => Decrement());