售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Mastering Ninject for Dependency Injection
Table of Contents
Mastering Ninject for Dependency Injection
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Understanding Dependency Injection
What is Dependency Injection?
DI or Inversion of Control (IoC)
How can DI help?
My First DI Application
DI Containers
Why use Ninject?
Summary
2. Getting Started with Ninject
Hello Ninject!
It's all about Binding
Object Lifetime
Transient scope
Singleton scope
Thread scope
Request scope
Custom scope
Ninject modules
XML configuration
How to use XML configuration
Convention over configuration
Selecting the assemblies
Selecting the components
Filtering the selected components
Explicit inclusion and exclusion
Selecting service types
Configuring the Bindings
Summary
3. Meeting Real-world Requirements
DI patterns and antipatterns
Constructor Injection
Initializer methods and properties
Service Locator
Multi binding and contextual binding
Implementing the plugin model
Contextual binding
Named binding
Resolving metadata
Attribute-based binding
Target-based conditions
Generic helper
Custom providers
Activation context
Factory Methods
Dynamic factories
The Shape Factory example
Using convention
Selecting service types
Defining Binding Generator
Telecom Switch example
Custom Instance Providers
Func
Lazy
Summary
4. Ninject in Action
Windows Forms applications
WPF and Silverlight applications
ASP.NET MVC applications
Validator injection
Filter injection
Conditional filtering (When)
Contextual arguments (With)
WCF applications
ASP.NET Web Forms applications
Summary
5. Doing More with Extensions
Interception
Setup Interception
Member Interception
Type Interception
Multiple Interceptors
Intercept Attribute
Mocking Kernel
Extending Ninject
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜