Skip to content

Commit

Permalink
fix: Wrapped long lines (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
danOIntellitect authored Oct 17, 2023
1 parent c8a5255 commit 414e3b0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public static List<string>
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
Expand Down
3 changes: 2 additions & 1 deletion src/Chapter21/Listing21.09.ParallelLinqQueryExpressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/Chapter22/Listing22.01.UnsychronizedState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
3 changes: 2 additions & 1 deletion src/Chapter22/Listing22.02.UnsychronizedLocalVariables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
{
Expand Down
3 changes: 2 additions & 1 deletion src/Chapter22/Listing22.03.SynchronizingWithMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
3 changes: 2 additions & 1 deletion src/Chapter22/Listing22.04.SynchronizingWithLockKeyword.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
3 changes: 2 additions & 1 deletion src/Chapter22/Listing22.05.AsyncMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public static async Task<int> 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());
Expand Down

0 comments on commit 414e3b0

Please sign in to comment.