From aec33cd265940ee09f491f0fcf1a9c0a824b27ca Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 5 Oct 2023 09:59:48 -0700 Subject: [PATCH 1/2] fix: Chapter 12 had two listings that wrapped too long for comments --- ...ing12.03.DefiningASpecializedStackClass.cs | 3 ++- ....16.UsingArityToOverloadATypeDefinition.cs | 24 ++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/Chapter12/Listing12.03.DefiningASpecializedStackClass.cs b/src/Chapter12/Listing12.03.DefiningASpecializedStackClass.cs index ef4e1d0d1..bfd265968 100644 --- a/src/Chapter12/Listing12.03.DefiningASpecializedStackClass.cs +++ b/src/Chapter12/Listing12.03.DefiningASpecializedStackClass.cs @@ -4,7 +4,8 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter12.Listing12_03; #region INCLUDE public class CellStack { - public virtual Cell Pop() { return new Cell(); } // would return that last cell added and remove it from the list + public virtual Cell Pop() { return new Cell(); } // would return + // that last cell added and remove it from the list public virtual void Push(Cell cell) { } // ... } diff --git a/src/Chapter12/Listing12.16.UsingArityToOverloadATypeDefinition.cs b/src/Chapter12/Listing12.16.UsingArityToOverloadATypeDefinition.cs index a22fda9b4..7dfde3809 100644 --- a/src/Chapter12/Listing12.16.UsingArityToOverloadATypeDefinition.cs +++ b/src/Chapter12/Listing12.16.UsingArityToOverloadATypeDefinition.cs @@ -5,35 +5,43 @@ public class Tuple { // ... } -public class Tuple // : IStructuralEquatable, IStructuralComparable, IComparable +public class Tuple // : IStructuralEquatable, + // IStructuralComparable, IComparable { // ... } -public class Tuple // : IStructuralEquatable, IStructuralComparable, IComparable +public class Tuple // : IStructuralEquatable, + // IStructuralComparable, IComparable { // ... } -public class Tuple // : IStructuralEquatable, IStructuralComparable, IComparable +public class Tuple // : IStructuralEquatable, + // IStructuralComparable, IComparable { // ... } -public class Tuple // : IStructuralEquatable, IStructuralComparable, IComparable +public class Tuple // : IStructuralEquatable, + // IStructuralComparable, IComparable { // ... } -public class Tuple // : IStructuralEquatable, IStructuralComparable, IComparable +public class Tuple // : IStructuralEquatable, + // IStructuralComparable, IComparable { // ... } -public class Tuple // : IStructuralEquatable, IStructuralComparable, IComparable +public class Tuple + // : IStructuralEquatable, IStructuralComparable, IComparable { // ... } -public class Tuple // : IStructuralEquatable, IStructuralComparable, IComparable +public class Tuple + // : IStructuralEquatable, IStructuralComparable, IComparable { // ... } -public class Tuple // : IStructuralEquatable, IStructuralComparable, IComparable +public class Tuple + // : IStructuralEquatable, IStructuralComparable, IComparable { // ... } From f07a0cf5a24e1727d1b4cec4388699b63b98c3e0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 5 Oct 2023 10:45:26 -0700 Subject: [PATCH 2/2] fix: Got the other chapters as well --- src/Chapter01/Listing01.22.SampleCILOutput.cs | 3 ++- .../Listing08.14.ForcingTheDesirableRunEncapsulation.cs | 3 ++- .../Listing09.36.UsingBitwiseORandANDWithFlagEnums.cs | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Chapter01/Listing01.22.SampleCILOutput.cs b/src/Chapter01/Listing01.22.SampleCILOutput.cs index 9436d911b..48f47fea1 100644 --- a/src/Chapter01/Listing01.22.SampleCILOutput.cs +++ b/src/Chapter01/Listing01.22.SampleCILOutput.cs @@ -55,7 +55,8 @@ .maxstack 8 ↪ System.Console]System.Console::WriteLine(string) IL_000b: nop IL_000c: ret - } // End of method System.Void HelloWorld.Program::Main(System.String[]) + } // End of method System.Void + // HelloWorld.Program::Main(System.String[]) .method public hidebysig specialname rtspecialname instance void .ctor() cil managed diff --git a/src/Chapter08/Listing08.14.ForcingTheDesirableRunEncapsulation.cs b/src/Chapter08/Listing08.14.ForcingTheDesirableRunEncapsulation.cs index b8002a0ef..cfafc5a67 100644 --- a/src/Chapter08/Listing08.14.ForcingTheDesirableRunEncapsulation.cs +++ b/src/Chapter08/Listing08.14.ForcingTheDesirableRunEncapsulation.cs @@ -94,7 +94,8 @@ static public void Main() // Invoking ((IExecuteProcessActivity)activity).Run()... // IWorkflowActivity.Start()... // ExecuteProcessActivity.RedirectStandardInOut()... - // ExecuteProcessActivity.IExecuteProcessActivity.ExecuteProcess()... + // ExecuteProcessActivity.IExecuteProcessActivity. + // ExecuteProcess()... // IExecuteProcessActivity.RestoreStandardInOut()... // IWorkflowActivity.Stop().. ((IExecuteProcessActivity)activity).Run(); diff --git a/src/Chapter09/Listing09.36.UsingBitwiseORandANDWithFlagEnums.cs b/src/Chapter09/Listing09.36.UsingBitwiseORandANDWithFlagEnums.cs index 0a5d653e5..2471b18ca 100644 --- a/src/Chapter09/Listing09.36.UsingBitwiseORandANDWithFlagEnums.cs +++ b/src/Chapter09/Listing09.36.UsingBitwiseORandANDWithFlagEnums.cs @@ -29,7 +29,8 @@ public static void Main() Console.WriteLine($"{file.Attributes} = {(int)file.Attributes}"); - // Only the ReadOnly attribute works on Linux (The Hidden attribute does not work on Linux) + // Only the ReadOnly attribute works on Linux + // (The Hidden attribute does not work on Linux) if (!System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux)) { // Added in C# 4.0/Microsoft .NET Framework 4.0