Update end regions to new styling
MODIFY
src/Chapter08/Listing08.01.DefiningAnInterface.cs
src/Chapter08/Listing08.01.DefiningAnInterface.cs
void Uncompress(
string compressedFileName, string expandDirectoryName);
}
- #endregion
+ #endregion INCLUDE
}

MODIFY
src/Chapter08/Listing08.02.ImplementingAndUsingInterfaces.cs
src/Chapter08/Listing08.02.ImplementingAndUsingInterfaces.cs
// Return the value of each cell in the row
#region HIGHLIGHT
string?[] CellValues { get; }
- #endregion
+ #endregion HIGHLIGHT
}
public abstract class PdaItem
#region HIGHLIGHT
public class Contact : PdaItem, IListable
- #endregion
+ #endregion HIGHLIGHT
{
public Contact(string firstName, string lastName,
string address, string phone)
};
}
}
- #endregion
+ #endregion HIGHLIGHT
public static string[] Headers
{
#region HIGHLIGHT
public class Publication : IListable
- #endregion
+ #endregion HIGHLIGHT
{
public Publication(string title, string author, int year)
{
};
}
}
- #endregion
+ #endregion HIGHLIGHT
public static string[] Headers
{
{
#region HIGHLIGHT
public static void List(string[] headers, IListable[] items)
- #endregion
+ #endregion HIGHLIGHT
{
int[] columnWidths = DisplayHeaders(headers);
{
#region HIGHLIGHT
string?[] values = items[count].CellValues;
- #endregion
+ #endregion HIGHLIGHT
DisplayItemRow(columnWidths, values);
}
}
}
Console.WriteLine();
return columnWidths;
- #endregion
+ #endregion EXCLUDE
}
private static void DisplayItemRow(
Console.Write(itemToPrint);
}
Console.WriteLine();
- #endregion
+ #endregion EXCLUDE
}
}
- #endregion
+ #endregion INCLUDE
}

MODIFY
src/Chapter08/Listing08.03.ImplementingAnInterface.cs
src/Chapter08/Listing08.03.ImplementingAnInterface.cs
#region INCLUDE
#region HIGHLIGHT
public class Contact : PdaItem, IListable, IComparable
- #endregion
+ #endregion HIGHLIGHT
{
#region EXCLUDE
public Contact(string name)
{
Name = name;
}
- #endregion
+ #endregion EXCLUDE
#region IComparable Members
/// <summary>
#region IListable Members
#region HIGHLIGHT
string?[] IListable.CellValues
- #endregion
+ #endregion HIGHLIGHT
{
get
{
protected string? Address { get; set; }
static public string GetName(string firstName, string lastName)
=> $"{ firstName } { lastName }";
- #endregion
+ #endregion EXCLUDE
}
- #endregion
+ #endregion INCLUDE
}

MODIFY
src/Chapter08/Listing08.05.ExplicitInterfaceImplementation.cs
src/Chapter08/Listing08.05.ExplicitInterfaceImplementation.cs
@@ -29,7 +29,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_05
#region INCLUDE
#region HIGHLIGHT
public class Contact : PdaItem, IListable, IComparable
- #endregion
+ #endregion HIGHLIGHT
{
#region EXCLUDE
public Contact(string name)
@@ -63,13 +63,13 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_05
nameof(obj))
};
#endregion
- #endregion
+ #endregion EXCLUDE
#region IListable Members
#region HIGHLIGHT
string?[] IListable.CellValues
- #endregion
+ #endregion HIGHLIGHT
{
get
{
@@ -102,7 +102,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_05
protected string? Address { get; set; }
static public string GetName(string firstName, string lastName)
=> $"{ firstName } { lastName }";
- #endregion
+ #endregion EXCLUDE
}
- #endregion
+ #endregion INCLUDE
}
\ No newline at end of file

MODIFY
src/Chapter08/Listing08.06.DerivingOneInterfaceFromAnother.cs
src/Chapter08/Listing08.06.DerivingOneInterfaceFromAnother.cs
{
#region EXCLUDE
return name + defaultValue; // just returning this for the example
- #endregion
+ #endregion EXCLUDE
}
#endregion
}
- #endregion
+ #endregion INCLUDE
}

MODIFY
src/Chapter08/Listing08.07.DeclarationWithoutContainingInterface.cs
src/Chapter08/Listing08.07.DeclarationWithoutContainingInterface.cs
{
// ...
}
- #endregion
+ #endregion INCLUDE
*/
void SetSetting(string name, string value);

MODIFY
src/Chapter08/Listing08.08.UsingABaseInterfaceInTheClassDeclaration.cs
src/Chapter08/Listing08.08.UsingABaseInterfaceInTheClassDeclaration.cs
public class FileSettingsProvider : ISettingsProvider,
#region HIGHLIGHT
IReadableSettingsProvider
- #endregion
+ #endregion HIGHLIGHT
{
#region ISettingsProvider Members
public void SetSetting(string name, string value)
{
#region EXCLUDE
return name + defaultValue; //just returning this for the example
- #endregion
+ #endregion EXCLUDE
}
#endregion
}
- #endregion
+ #endregion INCLUDE
}

MODIFY
src/Chapter08/Listing08.09.MultipleInterfaceInheritance.cs
src/Chapter08/Listing08.09.MultipleInterfaceInheritance.cs
interface ISettingsProvider : IReadableSettingsProvider,
#region HIGHLIGHT
IWriteableSettingsProvider
- #endregion
+ #endregion HIGHLIGHT
{
}
- #endregion
+ #endregion INCLUDE
}

MODIFY
src/Chapter08/Listing08.10.InterfaceExtensionMethods.cs
src/Chapter08/Listing08.10.InterfaceExtensionMethods.cs
// Classes are implicitly converted to
// their supported interfaces
contacts.List(Contact.Headers);
- #endregion
+ #endregion HIGHLIGHT
Console.WriteLine();
};
#region HIGHLIGHT
publications.List(Publication.Headers);
- #endregion
+ #endregion HIGHLIGHT
}
}
#region HIGHLIGHT
public static void List(
this IListable[] items, string[] headers)
- #endregion
+ #endregion HIGHLIGHT
{
int[] columnWidths = DisplayHeaders(headers);
}
Console.WriteLine();
}
- #endregion
+ #endregion EXCLUDE
}
- #endregion
+ #endregion INCLUDE
}

MODIFY
src/Chapter08/Listing08.11.DerivingOneInterfaceFromAnother.cs
src/Chapter08/Listing08.11.DerivingOneInterfaceFromAnother.cs
@@ -28,5 +28,5 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_11
void SetSetting(
string uri, string name, string value);
}
- #endregion
+ #endregion INCLUDE
}

MODIFY
src/Chapter08/Listing08.12.DefaultImplementedInterfaceMembers.cs
src/Chapter08/Listing08.12.DefaultImplementedInterfaceMembers.cs
@@ -68,7 +68,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_12
ConsoleColor[] CellColors
{
get
- #endregion
+ #endregion HIGHLIGHT
{
var result = new ConsoleColor[CellValues.Length];
// Using generic Array method to populate array
@@ -79,7 +79,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_12
}
#region HIGHLIGHT
static public ConsoleColor DefaultColumnColor { get; set; }
- #endregion
+ #endregion HIGHLIGHT
}
#region EXCLUDE
@@ -92,7 +92,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_12
public virtual string Name { get; set; }
}
- #endregion
+ #endregion EXCLUDE
public class Contact : PdaItem, IListable
{
@@ -111,7 +111,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_12
public string LastName { get; set; }
public string Address { get; set; }
public string Phone { get; set; }
- #endregion
+ #endregion EXCLUDE
#region IListable
string[] IListable.CellValues
@@ -129,7 +129,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_12
}
#region HIGHLIGHT
// *** No CellColors implementation *** //
- #endregion
+ #endregion HIGHLIGHT
#endregion IListable
#region EXCLUDE
@@ -146,7 +146,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_12
static public string GetName(string firstName, string lastName)
=> $"{ firstName } { lastName }";
- #endregion
+ #endregion EXCLUDE
}
public class Publication : IListable
@@ -174,7 +174,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_12
"Year" };
}
}
- #endregion
+ #endregion EXCLUDE
#region IListable
string?[] IListable.CellValues
@@ -204,12 +204,12 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_12
return result;
}
}
- #endregion
+ #endregion HIGHLIGHT
#endregion IListable
// ...
}
- #endregion
+ #endregion INCLUDE
public class ConsoleListControl

MODIFY
src/Chapter08/Listing08.13.CarelesslyRelyingOnAVirtualMethodImplementation.cs
src/Chapter08/Listing08.13.CarelesslyRelyingOnAVirtualMethodImplementation.cs
@@ -19,5 +19,5 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_13
// Critical code
}
}
- #endregion
+ #endregion INCLUDE
}

MODIFY
src/Chapter08/Listing08.14.ForcingTheDesirableRunEncapsulation.cs
src/Chapter08/Listing08.14.ForcingTheDesirableRunEncapsulation.cs
@@ -111,5 +111,5 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter08.Listing08_14
ExecuteProcessActivity.Run();
}
}
- #endregion
+ #endregion INCLUDE
}

Update end regions to new styling