Skip to content

Commit 158d910

Browse files
committed
Update documentation
1 parent 5fc7415 commit 158d910

File tree

8 files changed

+11
-13
lines changed

8 files changed

+11
-13
lines changed

src/BuildingBlocks/PatternExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public abstract class PatternExecutor
1313

1414
/// <summary>
1515
/// The Execute method is the entry point of an executable design pattern example.
16-
/// When an arbitrary design pattern example is choosen from the command menu,
16+
/// When an arbitrary design pattern example is chosen from the command menu,
1717
/// the Execute method is the first method that is invoked.
1818
/// </summary>
1919
public abstract void Execute();

src/CreationalPatterns/AbstractFactory/MealSimpleFactory/Factories/MealFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public MealFactory()
2121

2222
public IMeal CreateMeal(string mealName)
2323
{
24-
var type = GetTypeToCreate(mealName);
24+
var type = GetTypeForCreation(mealName);
2525
if (type == null)
2626
{
2727
return new NullMeal();
@@ -30,7 +30,7 @@ public IMeal CreateMeal(string mealName)
3030
return Activator.CreateInstance(type) as IMeal;
3131
}
3232

33-
private Type GetTypeToCreate(string mealName)
33+
private Type GetTypeForCreation(string mealName)
3434
{
3535
if (!_meals.TryGetValue(mealName, out Type type))
3636
{

src/CreationalPatterns/Builder/CustomSandwichBuilder/Builders/CheapSandwichBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace CustomSandwichBuilder.Builders
77
{
88
/// <summary>
99
/// Concrete Builders provide different implementations of the construction steps.
10-
/// Concrete builders may produce products that don't follow the common interface.
10+
/// Note that, concrete builders may produce products that don't follow the common interface.
1111
/// </summary>
1212
public class CheapSandwichBuilder : SandwichBuilder
1313
{

src/CreationalPatterns/Builder/CustomSandwichBuilder/Builders/PremiumSandwichBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace CustomSandwichBuilder.Builders
77
{
88
/// <summary>
99
/// Concrete Builders provide different implementations of the construction steps.
10-
/// Concrete builders may produce products that don't follow the common interface.
10+
/// Note that concrete builders may produce products that don't follow the common interface.
1111
/// </summary>
1212
public class PremiumSandwichBuilder : SandwichBuilder
1313
{

src/CreationalPatterns/Builder/CustomSandwichBuilder/Executor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public override void Execute()
3434
private void MakeAndDisplaySandwich(SandwichDirector director)
3535
{
3636
director.MakeSandwich();
37-
var sandwich = director.GetSandwhich();
3837

38+
var sandwich = director.GetSandwhich();
3939
sandwich.Display();
4040
}
4141
}

src/CreationalPatterns/Singleton/Greeter/Executor.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ public override void Execute()
1212
{
1313
Console.WriteLine("Initial greetings...");
1414
Console.WriteLine();
15-
1615
Greet();
17-
Console.WriteLine();
1816

19-
Console.WriteLine("Goodbye greetings...");
17+
Console.WriteLine("\nGoodbye greetings...");
2018
Console.WriteLine();
21-
2219
Greet();
2320
}
2421

src/CreationalPatterns/Singleton/Greeter/Types/LocklessFullyLazyGreeter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private class Nested
2828
/// </summary>
2929
internal static readonly LocklessFullyLazyGreeter Instance = new LocklessFullyLazyGreeter();
3030

31-
// Explicit static constructor to tell C# compiler not to mark as BeforeFieldInit
31+
// Explicit static constructor to tell C# compiler not to mark as BeforeFieldInit.
3232
// http://csharpindepth.com/Articles/General/Singleton.aspx
3333
static Nested()
3434
{

src/CreationalPatterns/Singleton/Greeter/Types/LocklessGreeter.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
namespace Greeter.Types
44
{
55
/// <summary>
6-
/// Why is it thread-safe? Well, static constructors in C# are specified to execute only when an instance of the class
6+
/// Why is it thread-safe?
7+
/// Well, static constructors in C# are specified to execute only when an instance of the class
78
/// is created or a static member is referenced, and to execute only once per AppDomain.
89
/// Given that this check for the type being newly constructed needs to be executed whatever else happens,
910
/// it will be faster than adding extra checking as in the DoubleCheckGreeter example.
@@ -15,7 +16,7 @@ public class LocklessGreeter : BaseGreeter
1516
{
1617
private static readonly LocklessGreeter InstanceValue = new LocklessGreeter();
1718

18-
// Explicit static constructor to tell C# compiler not to mark type as BeforeFieldInit
19+
// Explicit static constructor to tell C# compiler not to mark type as BeforeFieldInit.
1920
static LocklessGreeter()
2021
{
2122
}

0 commit comments

Comments
 (0)