Chapter 14: The Simple Injector DI Container - Dependency Injection
In this chapter
- Working with Simple Injector’s basic registration API
- Managing component lifetime
- Configuring difficult APIs
- Configuring sequences, Decorators, and Composites
In the previous chapter, we looked at the Autofac DI Container, created by Nicholas Blumhardt in 2007. Three years later, Steven created Simple Injector, which we’ll examine in this chapter. We’ll give Simple Injector the same treatment that we gave Autofac in the last chapter. You’ll see how you can use Simple Injector to apply the principles and patterns presented in parts 1–3.
This chapter is divided into four sections. You can read each section independently, though the first section is a prerequisite for the other sections, and the fourth section relies on some methods and classes introduced in the third section. You can read this chapter apart from the rest of the chapters in part 4, specifically to learn about Simple Injector, or you can read it together with the other chapters to compare DI Containers.
Although this chapter isn’t a complete treatment of the Simple Injector container, it gives enough information that you can start using it. This chapter includes information on how to deal with the most common questions that may come up as you use Simple Injector. For more information about this container, see the Simple Injector home page at https://simpleinjector.org.
14.1 Introducing Simple Injector
14.1.1 Resolving objects
14.1.2 Configuring the container
14.2 Managing lifetime
14.2.1 Configuring Lifestyles
14.2.2 Releasing components
14.2.3 Ambient scopes
14.2.4 Diagnosing the container for common lifetime problems
14.3 Registering difficult APIs
14.3.1 Configuring primitive Dependencies
14.3.2 Extracting primitive Dependencies to Parameter Objects
14.3.3 Registering objects with code blocks
14.4 Working with multiple components
14.4.1 Selecting among multiple candidates
14.4.2 Wiring sequences
14.4.3 Wiring Decorators
14.4.4 Wiring Composites
14.4.5 Sequences are streams
Summary
sitemapTừ khóa » C'vgks
-
C(vGKS X Md4 = A038361177721d6eacf9b5d7c9c4d6e7
-
Скачать сэмплы | VST Инструменты | Плагины VST | Пресеты ...
-
C(vGKS!w Md4(hash + Salt) / SaltHasher
-
Không Có Tiêu đề
-
Vgks - Overview, News & Competitors
-
Batbayar On Twitter: "http:///5swW2g9N Fl Studio C Vgks" / Twitter
-
Former Boeing Test Pilot's Trial Begins On Fraud Charges Over 737 ...
-
Где скачать сэмплы и звуковые эффекты: 15 каталогов с ...
-
0001654954-17-008756.txt
-
0000930413-13-005758.txt
-
«Где найти сэмплы для Fl Studio?» — Яндекс Кью
-
Bhi09G001571 (gene) Wax Gourd | Cucurbit Genomics Database ...