Errata: May 04, 2020

Thank you for purchasing Dependency Injection Principles, Practices, and Patterns. Please add errrors not listed below to the LiveBook Errata thread. We'll update this list as necessary. Thank you!

Inside front cover, the terminology map

The terminology map is missing its title: Glossary conceptual map

The terminology map is missing its caption:

"This figure maps out how the important concepts and terms in this book relate to each other, and provides a reference to the chapters where they're covered. There's also a Glossary in the back of the book with one-sentence descriptions of each term."

The circle "Object Lifetime (ch. 8)" is incorrectly drawn with a shade. It should have been drawn as all other cicles in the map.

In chapter 3, page 68, section 3.1.2

The word "pursuit" in the last paragraph of the "Dependency Inversion Principle" section should have been "pursue."

In chapter 4, page 89, section 4.1.3

The first annotation of listing 4.3 points at the class identifier (line 1). It should point at the constructor (line 3).

In chapter 4, page 106, section 4.3.2

Footnote 9 incorrectly contains the same text as footnote 17. It should be: "Eric Evans, Domain-Driven Design."

In chapter 5, page 132, figure 5.1

The relationship between IProductRepository and its implementations, AzureProductRepository and SqlProductRepository, is drawn backwards, making IProductRepository appear to derive from both AzureProductRepository and SqlProductRepository. Instead, AzureProductRepository and SqlProductRepository should derive from IProductRepository (the arrow should point the other way).

In chapter 5, page 133, figure 5.2

The relationship between IProductRepository and its implementation, SqlProductRepository, is drawn backwards, making IProductRepository appear to derive from SqlProductRepository. Instead, SqlProductRepository should derive from IProductRepository (the arrow should point the other way).

In chapter 6, page 181, figure 6.6

The word "Abstaction" in the second annotation of figure 6.6 should have been "Abstraction:" "HomeController manages the repository's lifetime by calling Dispose. This makes IProductRepository a Leaky Abstraction."

In chapter 6, page 192, section 6.3.1

Listing 6.24 contains an incorrect method argument named changedEntity. It should be:

public void Append(Entity entity)

In chapter 7, page 223, section 7.2.2

Listing 7.4 contains an method named Initialize (class MainViewModel) which has its method arguments in an incorrect order, preventing the code from compiling, because MainViewModel now not correctly implements IViewModel. It should be:

public void Initialize(Action whenDone, object model)

In chapter 8, page 266, section 8.4

The word "heath" in the first paragraph should have been "health:" "As we all know, some lifestyle choices are bad for our health."

In chapter 8, page 279, summary

There's a space missing between the first and second word of the 11th bullet point. It should be: "Releasing is."

In chapter 9, page 288, section 9.1.2

Listing 9.1 contains an incorrect constructor named AuditingProductRepository. It should be named: AuditingUserRepositoryDecorator.

In chapter 9, page 296, section 9.2.1

The second code snippet in the "A more compact ICircuitBreaker" sidebar misses a return keyword. It should be:

public IEnumerable<Product> GetAll()
    return this.breaker.Execute(() => this.decoratee.GetAll());

In chapter 10, page 307, section 10.2.3

There is a misaligned comma in the first paragraph after the second occurrence of the word "Dependencies." It should be: "when they invoke their Dependencies, because."

In chapter 10, page 325, section 10.3.3

The service field of listing 10.14 is missing the private keyword. It should be:

private readonly ICommandService<AdjustInventory> service;

In chapter 10, page 335, section 10.3.4

The word "he" in the annotation of listing 10.21 should have been "the:" "Wraps the decoratee parameter in the list of Decorators."

In chapter 10, page 336, section 10.3.4:

The last code snippet and the last paragraph of section 10.3.4 should have been separated with a callout stating:

"NOTE: Chapter 12 demonstrates how to Auto-Register ICommandService<TCommand> implementations and apply Decorators using a DI Container."

This callout was unfortunately merged into the last paragraph.

In chapter 10, page 337, section 10.3.5

The word "developers" in second paragraph should have been "developer:" "Your job as software developer is to find the sweet spot."

In chapter 14, page 432, section 14.1.2

"a obstacle" in the second paragraph should be: "an obstacle."

In chapter 14, page 435, section 14.1.2

There is some space missing between the word "Sauce" and the following ":" at the end of the second paragraph on page 435.

In chapter 15, page 483, section 15.3.3

"a AddTransient method" in the first paragraph on the page should be: "an AddTransient method."

In chapter 15, page 484, section 15.4.1

There is an invalid second closing angle bracket in the text after the second code snippet. The phrase "while requesting an IEnumerable<IIngredient>>" should be: "while requesting an IEnumerable<IIngredient>." (without the second ">")

In chapter 15, page 489, listing 15.6

There is missing angle bracket in the last AddTransient registration in listing 15.6:

services.AddTransient<IMeal>(c = new Meal(

It should be:

services.AddTransient<IMeal>(c => new Meal(