Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V6.0 #2

Merged
merged 95 commits into from
Mar 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
3933606
Renamed solution to not include the version number.
MarkMichaelis Feb 23, 2015
232543f
Renamed solution to not include the version number.
MarkMichaelis Feb 23, 2015
1876600
Modified Chapter 13 for C# 6.0
MarkMichaelis Feb 23, 2015
1c11cfb
Updated Chapter 14 for C# 6.0
MarkMichaelis Feb 23, 2015
533b9a9
Added an initial script to help when incrementing code listings due t…
MarkMichaelis Feb 23, 2015
7296db0
Added an additional listing for handling the pre C# 6.0 null checking…
MarkMichaelis Feb 23, 2015
2390c6d
Updated Chapter 4 for C# 6.0
MarkMichaelis Feb 23, 2015
d1a89fe
Added vs/ directory to be ignored by git.
MarkMichaelis Feb 23, 2015
fbca404
Updated chapter 3 for C# 6.0; Added a test project for Chapter 3
MarkMichaelis Feb 23, 2015
c1b0736
Updated Chapter 1 for C# 6.0
MarkMichaelis Feb 23, 2015
0beac7b
Updated Chapter 2 for C# 6.0
MarkMichaelis Feb 23, 2015
65d2837
Updated Chapter 12 for C# 6.0
MarkMichaelis Feb 23, 2015
8b3b945
Corrected the assembly information.
MarkMichaelis Feb 23, 2015
093f2b7
Fixed invalid file references (pointing to old file names)
MarkMichaelis Feb 23, 2015
cfc0471
Updated/corrected assemblyinfo.cs files across the solution.
MarkMichaelis Feb 23, 2015
3f27342
Updated code for Chapter14; Added Chapter14 test project
MarkMichaelis Mar 9, 2015
16e6966
Updated Chapter 16 for C# 6.0.; Added Chapter 16 test project.
MarkMichaelis Mar 9, 2015
8dcd683
Minor updates to IncrementListing.ps1
MarkMichaelis Mar 9, 2015
f7db890
Updated Chapter15 for C# 6.0
MarkMichaelis Mar 9, 2015
02a60b9
Updated to support additional diagnostic information on failing tests…
MarkMichaelis Mar 9, 2015
c33b246
Updated Chapter 13 with changes for C# 6.0.; Added a test project for…
MarkMichaelis Mar 9, 2015
13eb8fe
Minor edits in Chapter 4
MarkMichaelis Mar 9, 2015
9eade2c
Replaced tabs with 4 spaces
MarkMichaelis Mar 9, 2015
fdae323
Fixed bug in type comparison of CompareTo().
MarkMichaelis Mar 9, 2015
4f3506c
Added resharper file to ignore the namespace not matching the project…
MarkMichaelis Mar 9, 2015
26ab907
Change the base used for conversion in the test to binary.
MarkMichaelis Mar 9, 2015
1cf3eaa
Added orderby clause to the query for Methods; Changed the expected o…
MarkMichaelis Mar 9, 2015
8a93735
Fixed bug in which the second WriteLine was referring to patent1 rath…
MarkMichaelis Mar 9, 2015
4b32fa3
Put back the tabs which were removed in a solution wide search and re…
MarkMichaelis Mar 9, 2015
6e146de
Removed unused local variable
MarkMichaelis Mar 9, 2015
e5ab900
Changed to use C# 6.0 syntax for the dictionary initialization
MarkMichaelis Mar 9, 2015
2cd4c44
Minor updates to API help text.
MarkMichaelis Mar 9, 2015
db6b726
Changed to use autoproperties.
MarkMichaelis Mar 9, 2015
e093dab
Shortended the syntax for invoking the Console Tester; Renamed the ex…
MarkMichaelis Mar 9, 2015
307c779
Added new listing to Chapter 17
MarkMichaelis Mar 21, 2015
820633c
Changes required for Chapter17 including use of nameof
MarkMichaelis Mar 21, 2015
8c875e1
Added test projects for Chapters 10 and 18
MarkMichaelis Mar 21, 2015
0082457
Modified Tester.cs
MarkMichaelis Mar 21, 2015
b3cffd4
Updated for Chapter 18 revisions.
MarkMichaelis Mar 22, 2015
56f087c
Minor edits for string interpolation
MarkMichaelis Mar 22, 2015
adefe26
Updated listings to include expression bodied methods.
MarkMichaelis Mar 22, 2015
551502f
Minor updates.
MarkMichaelis Mar 22, 2015
ea12624
Minor test updates.
MarkMichaelis Mar 22, 2015
139d8a6
Fixed a carelous use of string interpolation without removing string.…
MarkMichaelis Mar 24, 2015
c1269a1
Updated Chapter 5 for C# 6.0
MarkMichaelis Mar 28, 2015
b0c13fa
Minor white space change.
MarkMichaelis Mar 28, 2015
4dd9085
Formatting adjustments; Modifications for method expressions.
MarkMichaelis Mar 28, 2015
92cb382
Updated to support C# 6.0 in Chapter 6
MarkMichaelis Mar 28, 2015
1cbc83b
Updated Chapter 7 to support C# 6.0
MarkMichaelis Mar 28, 2015
1c1e7b9
Updated Chapter 8 to include the new struct default constructor and t…
MarkMichaelis Mar 29, 2015
afbb84c
Added a testing project for Chapter 5
MarkMichaelis Mar 29, 2015
de8f462
Added a testing project for Chapter 5
MarkMichaelis Mar 29, 2015
fe93cdb
Minor edits
MarkMichaelis Mar 29, 2015
205c001
Updated Chapter 9 to leverage C# 6.0 features.
MarkMichaelis Mar 30, 2015
be3ad9d
Additional updates to Chapter 09 including the addition of a testing …
MarkMichaelis Mar 30, 2015
c67214a
Updating code in chapters 2 and 3 after code review.
Mar 31, 2015
63e653f
Updating code in chapters 2 and 3 after code review.
Mar 31, 2015
4a342ba
Merge branch 'v6.0' of https://github.com/IntelliTect/EssentialCSharp…
Mar 31, 2015
797b3ef
Updating chapter 4 code to match what is already in the word document.
Mar 31, 2015
07557ef
Updating code to match what is in the document.
Mar 31, 2015
3ea17e7
Updating code to be consistent with document.
Apr 2, 2015
ead6200
Updated Chapter 10 for C# 6.0
MarkMichaelis Apr 2, 2015
64287fb
Updated Chapter 11 for C# 6.0
MarkMichaelis Apr 2, 2015
604d91e
Merge branch 'v6.0' of github.com:IntelliTect/EssentialCSharp into v6.0
MarkMichaelis Apr 2, 2015
1465c80
Fixing compile error I cause by an accidental change.
Apr 2, 2015
3c45c54
Merge branch 'v6.0' of https://github.com/IntelliTect/EssentialCSharp…
Apr 2, 2015
837105d
Updating code in chapter 15 to match what is in the document
Apr 4, 2015
a5f8739
Updating code in chapter 16 to match the document.
Apr 4, 2015
c578de7
Updating chapter 17 code to match document.
Apr 5, 2015
fa921d7
Updating code in chapter 18 to match what is in the document.
Apr 5, 2015
f8ba1e2
Update chapters 18 and 19 to match document.
May 4, 2015
973ccef
Update Appendix B to use string interpolation.
May 5, 2015
fc5cadb
Minor updates with some additional unit tests added.
MarkMichaelis May 24, 2015
80db2db
Updating examples to use WPF rather than Windows Forms.
May 24, 2015
ff4c7b3
Added implementation to Encrypt() method.
MarkMichaelis May 25, 2015
340e891
Mereged changes
MarkMichaelis May 25, 2015
4239ee0
Removing UpdateLayout calls
May 26, 2015
cc068fc
Merge branch 'v6.0' of https://github.com/IntelliTect/EssentialCSharp…
May 26, 2015
2bcb560
Lots of mostly minor updates corresponding to technical edit review a…
MarkMichaelis May 26, 2015
99517cc
Merge branch 'v6.0' of github.com:IntelliTect/EssentialCSharp into v6.0
MarkMichaelis May 26, 2015
cb126f5
Incremented the listings for Chapter 02 from renaming 12A to 13...
MarkMichaelis Jul 6, 2015
bd2be1b
Updated corresponding to chapter copy edits.
MarkMichaelis Jul 13, 2015
c261590
Renumbered listings in Chapter 3
MarkMichaelis Jul 13, 2015
7620dbc
Renumbered listings in Chapter 3
MarkMichaelis Jul 13, 2015
c8c0c88
Updated corresponding to chapter copyedits
MarkMichaelis Jul 13, 2015
7b41875
Renamed Chapter 4 listings to be '04' listings
MarkMichaelis Jul 13, 2015
367837b
Updated to support renaming test files as well
MarkMichaelis Jul 13, 2015
46548e8
Updated to support renaming test files as well
MarkMichaelis Jul 13, 2015
750271d
Renumbered listings to accomodate new listings. Renamed listings in …
MarkMichaelis Jul 13, 2015
6b774fb
Changes corresponding to copy edits
MarkMichaelis Jul 13, 2015
866724f
Updated Chapter 5 based on copy edits
MarkMichaelis Jul 13, 2015
b6a92b5
Renumbered listings in Chapter 17
MarkMichaelis Jul 15, 2015
237bb82
Updated based on copy edits from Pearson.
MarkMichaelis Jul 20, 2015
fbaefce
Updated variable name to match chapter. max became miracleMax.
MarkMichaelis Jul 22, 2015
bffcc11
updated to the console tester.
MarkMichaelis Mar 23, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions EssentialCSharp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
.vs/

# user files
*.csproj.user
Expand Down
3 changes: 2 additions & 1 deletion EssentialCSharp/Chapter01.Tests/Chapter01.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@
<Compile Include="Listing01.11.Tests.cs" />
<Compile Include="Listing01.13.Tests.cs" />
<Compile Include="Listing01.14.Tests.cs" />
<Compile Include="Listing01.15.Tests.cs" />
<Compile Include="Listing01.16.Tests.cs" />
<Compile Include="Listing01.15.Tests.cs" />
<Compile Include="Listing01.17.Tests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
10 changes: 4 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.01.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ public class HelloWorldTests
[TestMethod]
public void Main_InigoHello()
{
string view = @"Hello. My name is Inigo Montoya.";
const string expected =
@"Hello. My name is Inigo Montoya.";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
HelloWorld.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, HelloWorld.Main);
}
}
}
9 changes: 3 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.03.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ public class ProgramTests
[TestMethod]
public void Main_InigoHello()
{
string view = @"Hello, My name is Inigo Montoya";
const string expected = @"Hello, My name is Inigo Montoya";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
Program.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, Program.Main);
}
}
}
11 changes: 4 additions & 7 deletions EssentialCSharp/Chapter01.Tests/Listing01.05.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ public class HelloWorldTests
[TestMethod]
public void Main_UpDown()
{
string view =
@"Up
const string expected =
@"Up
Down";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
HelloWorld.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, HelloWorld.Main);
}
}
}
10 changes: 4 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.06.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ public class HelloWorldTests
[TestMethod]
public void Main_InigoHello()
{
string view = @"Hello. My name is Inigo Montoya.";
const string expected =
@"Hello. My name is Inigo Montoya.";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
HelloWorld.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, HelloWorld.Main);
}
}
}
9 changes: 3 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.07.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ public class HelloWorldTests
[TestMethod]
public void Main_HelloToInigo()
{
string view = @"Hello Inigo Montoya";
const string expected = @"Hello Inigo Montoya";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
HelloWorld.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, HelloWorld.Main);
}
}
}
9 changes: 3 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.08.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ public class ProgramTests
[TestMethod]
public void Main_HelloToInigo()
{
string view = @"Hello Inigo Montoya";
const string expected = @"Hello Inigo Montoya";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
Program.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, Program.Main);
}
}
}
9 changes: 3 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.09.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ public class MiracleMaxTests
[TestMethod]
public void Main_StormCastleShort()
{
string view = @"Have fun storming the castle!";
const string expected = @"Have fun storming the castle!";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
MiracleMax.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, MiracleMax.Main);
}
}
}
9 changes: 3 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.11.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ public class MiracleMaxTests
[TestMethod]
public void Main_StormCastleLong()
{
string view =
const string expected =
@"Have fun storming the castle!
Think it will work?
It would take a miracle.";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
MiracleMax.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, MiracleMax.Main);
}
}
}
9 changes: 3 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.13.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ public class HeyYouTests
[TestMethod]
public void Main_InputInigoMontoya_WriteNothing()
{
string view =
const string expected =
@"Hey you!
Enter your first name: <<Inigo
>>Enter your last name: <<Montoya
>>";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
HeyYou.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, HeyYou.Main);
}
}
}
9 changes: 3 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.14.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ public class ProgramTests
[TestMethod]
public void Main_InputOne_WriteOne()
{
string view = @"1<<1>>";
const string expected = @"1<<1>>";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
Program.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, Program.Main);
}
}
}
9 changes: 3 additions & 6 deletions EssentialCSharp/Chapter01.Tests/Listing01.15.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ public class ProgramTests
[TestMethod]
public void Main_InputInigoMontoya_WriteFirstLast()
{
string view =
const string expected =
@"Hey you!
Enter your first name: <<Inigo
>>Enter your last name: <<Montoya
>>Your full name is Inigo Montoya.";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
Program.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, Program.Main);
}
}
}
13 changes: 5 additions & 8 deletions EssentialCSharp/Chapter01.Tests/Listing01.16.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_16.Tests
public class ProgramTests
{
[TestMethod]
public void Main_InputInigoMontoya_WriteLastFirst()
public void Main_InputInigoMontoya_WriteFirstLast()
{
string view =
const string expected =
@"Hey you!
Enter your first name: <<Inigo
>>Enter your last name: <<Montoya
>>Your full name is Montoya, Inigo.";
>>Your full name is Inigo Montoya.";

IntelliTect.ConsoleView.Tester.Test(view,
() =>
{
Listing01_16.Program.Main();
});
IntelliTect.ConsoleView.Tester.Test(
expected, Program.Main);
}
}
}
21 changes: 21 additions & 0 deletions EssentialCSharp/Chapter01.Tests/Listing01.17.Tests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_17.Tests
{
[TestClass]
public class ProgramTests
{
[TestMethod]
public void Main_InputInigoMontoya_WriteLastFirst()
{
const string expected =
@"Hey you!
Enter your first name: <<Inigo
>>Enter your last name: <<Montoya
>>Your full name is Montoya, Inigo.";

IntelliTect.ConsoleView.Tester.Test(
expected, Program.Main);
}
}
}
4 changes: 2 additions & 2 deletions EssentialCSharp/Chapter01.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
[assembly: AssemblyTitle("Chapter01.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Hewlett-Packard")]
[assembly: AssemblyCompany("Addison Wesley")]
[assembly: AssemblyProduct("Chapter01.Tests")]
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2012")]
[assembly: AssemblyCopyright("Copyright © Addison Wesley 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
Expand Down
5 changes: 3 additions & 2 deletions EssentialCSharp/Chapter01/Chapter01.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@
<Compile Include="Listing01.12.AssignmentReturningAValueThatCanBeassignedAgain.cs" />
<Compile Include="Listing01.13.UsingSystemConsoleReadLine.cs" />
<Compile Include="Listing01.14.UsingSystemConsoleRead.cs" />
<Compile Include="Listing01.15.FormattingUsingSystemConsoleWriteLine.cs" />
<Compile Include="Listing01.16.SwappingTheIndexedPlaceholdersAndCorrespondingVariables.cs" />
<Compile Include="Listing01.16.FormattingUsingCompositeFormatting.cs" />
<Compile Include="Listing01.15.FormattingUsingStringInterpolation.cs" />
<Compile Include="Listing01.17.SwappingTheIndexedPlaceholdersAndCorrespondingVariables.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ public class MiracleMax
public static void Main()
{
string valerie;
string max = "Have fun storming the castle!";
string miracleMax = "Have fun storming the castle!";

valerie = "Think it will work?";

System.Console.WriteLine(max);
System.Console.WriteLine(miracleMax);
System.Console.WriteLine(valerie);

max = "It would take a miracle.";
System.Console.WriteLine(max);
miracleMax = "It would take a miracle.";
System.Console.WriteLine(miracleMax);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ public class MiracleMax
public static void Main()
{
// ...
string requirements, max;
requirements = max = "It would take a miracle.";
string requirements, miracleMax;
requirements = miracleMax = "It would take a miracle.";
// ...
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_15
{
public class Program
{
public static void Main()
{
string firstName;
string lastName;

System.Console.WriteLine("Hey you!");

System.Console.Write("Enter your first name: ");
firstName = System.Console.ReadLine();

System.Console.Write("Enter your last name: ");
lastName = System.Console.ReadLine();

System.Console.WriteLine(
$"Your full name is { firstName } { lastName }.");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_15
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_16
{
public class Program
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_16
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter01.Listing01_17
{
public class Program
{
Expand Down
4 changes: 2 additions & 2 deletions EssentialCSharp/Chapter01/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("Chapter01")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Addison Wesley")]
[assembly: AssemblyProduct("Chapter01")]
[assembly: AssemblyCopyright("Copyright © 2010")]
[assembly: AssemblyCopyright("Copyright © Addison Wesley 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
1 change: 1 addition & 0 deletions EssentialCSharp/Chapter02.Tests/Chapter02.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<Compile Include="Listing02.14.Tests.cs" />
<Compile Include="Listing02.17.Tests.cs" />
<Compile Include="Listing02.18.Tests.cs" />
<Compile Include="Listing02.50.AdditionalArrayMethods.Tests.cs" />
<Compile Include="Listing02.21.Tests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down
Loading