Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ This is a test of the emergency...

""";

static void invokeMain() => Program.Main(new[]
static void InvokeMain() => Program.Main(new[]
{
"black", "blue", "brown", "CBR",
"orange", "purple", "red", "yellow"
});

string? result = Execute(invokeMain);
string? result = Execute(InvokeMain);

Assert.AreEqual(expected, result);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Runtime.InteropServices;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_14.Tests;
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_15.Tests;

[TestClass]
public class TemporaryFileStreamTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_15.Tests;
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_16.Tests;

[TestClass]
public class SearchTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Text.RegularExpressions;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_17.Tests;
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_18.Tests;

[TestClass]
public partial class DisposeTests
Expand All @@ -17,7 +17,7 @@ public partial class DisposeTests
Path.Join(IntelliTect.Multitool.RepositoryPaths.GetDefaultRepoRoot(),"src", "Chapter10"));

static string Ps1Path { get; } =
Path.GetFullPath(Path.Join(Ps1DirectoryPath, "Listing10.17.RegisteringAFinalizerWithProcessExit.ps1"), Environment.CurrentDirectory);
Path.GetFullPath(Path.Join(Ps1DirectoryPath, "Listing10.18.RegisteringAFinalizerWithProcessExit.ps1"), Environment.CurrentDirectory);

private const string ProjectName = "ProcessExitTestProgram.testing";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_13
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_14
{
using System;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Justification: Implementation is incomplete in the catch block.
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_14;
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_15;

using System;
#region INCLUDE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_15
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_16
{
#region INCLUDE
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Justification: Use to demonstrate pre-C# 8.0 syntax.
#pragma warning disable IDE0063 // Use simple 'using' statement

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_16
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_17
{
using Listing10_15;
using Listing10_16;

#region INCLUDE
public static class Program
Expand All @@ -12,8 +12,7 @@ public static void Search()
{
#region HIGHLIGHT
// C# 8.0
using TemporaryFileStream fileStream1 =
new();
using TemporaryFileStream fileStream1 = new();
#endregion HIGHLIGHT

#region HIGHLIGHT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_17
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_18
{
using System;
#region INCLUDE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_18
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_19
{
using Listing10_15;
#region INCLUDE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_19
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter10.Listing10_20
{
using Listing10_15;
using System;
Expand Down