Welcome to Autofac’s documentation!

2023-12-11 03:32

本文主要是介绍Welcome to Autofac’s documentation!,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Welcome to Autofac’s documentation!

[欢迎查看Autofac的文档!]

_images/logo.png

Autofac is an addictive IoC container for .NET. It manages the dependencies between classes so that applications stay easy to change as they grow in size and complexity. This is achieved by treating regular .NET classes as components.

Autofac 是一个令人痴迷的关于.NET的IoC容器。它管理类之间的依赖关系,以便使应用程序在大小和复杂性的增长中保持容易维护.。它的目标是将.NET类做为组件方便有效的管理。

  • Getting Started
    • Structuring the Application
    • Add Autofac References
    • Application Startup
    • Application Execution
    • Going Further
    • Need Help?
    • Building from Source
  • What’s New
    • Release Notes
    • Upgrading from Autofac 5.x to 6.x
    • Upgrading from Autofac 3.x to 4.x
  • Registering Components
    • Registration Concepts
      • Reflection Components
      • Instance Components
      • Lambda Expression Components
      • Open Generic Components
      • Services vs. Components
      • Default Registrations
      • Conditional Registration
      • Configuration of Registrations
      • Dynamically-Provided Registrations
    • Passing Parameters to Register
      • Available Parameter Types
      • Parameters with Reflection Components
      • Parameters with Lambda Expression Components
    • Property and Method Injection
      • Property Injection
      • Method Injection
    • Assembly Scanning
      • Scanning for Types
      • Scanning for Modules
      • IIS Hosted Web Applications
  • Resolving Services
    • Passing Parameters to Resolve
      • Available Parameter Types
      • Parameters with Reflection Components
      • Parameters with Lambda Expression Components
      • Passing Parameters Without Explicitly Calling Resolve
    • Implicit Relationship Types
      • Supported Relationship Types
      • Composing Relationship Types
      • Relationship Types and Container Independence
  • Controlling Scope and Lifetime
    • Basic Concepts and Terminology
    • Scopes and Hierarchy
    • Example: Singleton Lifetime
    • Example: Web Application
    • Additional Topics to Explore
      • Working with Lifetime Scopes
      • Instance Scope
      • Captive Dependencies
      • Disposal
      • Lifetime Events
      • Running Code at Container Build
  • Configuration
    • JSON/XML Configuration
      • Configuring With Microsoft Configuration (4.0+)
      • Configuring With Application Configuration (Legacy Pre-4.0)
    • Modules
      • Introduction
      • Advantages of Modules
      • Example
      • Adapting to the Deployment Environment
      • Common Use Cases for Modules
  • Application Integration
    • ASP.NET
      • OWIN
      • MVC
      • Web API
      • SignalR
      • Web Forms
    • .NET Core
      • Quick Start
      • Using a Child Scope as a Root
    • ASP.NET Core
      • Quick Start
      • Configuration Method Naming Conventions
      • Dependency Injection Hooks
      • Differences From ASP.NET Classic
      • Controllers as Services
      • Multitenant Support
      • Using a Child Scope as a Root
      • Example
    • Blazor
    • Windows Communication Foundation (WCF)
      • Clients
      • Services
    • Service Fabric
      • Quick Start
      • Per-Request Scopes
      • Example
    • Managed Extensibility Framework (MEF)
      • Consuming MEF Extensions in Autofac
      • Providing Autofac Components to MEF Extensions
      • Using Metadata
      • Known Issues / Gotchas
    • Common Service Locator
    • Moq
      • Getting Started
      • Configuring Mocks
      • Configuring Specific Dependencies
    • FakeItEasy
      • Getting Started
      • Configuring Fakes
      • Configuring Specific Dependencies
      • Options for Fakes
  • Best Practices and Recommendations
    • Always Resolve Dependencies from Nested Lifetimes
    • Structure Configuration with Modules
    • Use As() in Delegate Registrations
    • Use Constructor Injection
    • Use Relationship Types, Not Service Locators
    • Register Components from Least-to-Most Specific
    • Use Profilers for Performance Checking
    • Register Once, Resolve Many
    • Register Frequently-Used Components with Lambdas
    • Consider a Container as Immutable
    • Optimize or Avoid Diagnostics
  • Advanced Topics
    • Registration Sources
      • “Any Concrete Type Not Already Registered” Source
      • Implementing a Registration Source
    • Adapters and Decorators
      • Adapters
      • Decorators
    • Composites
      • Metadata
      • Lifetime
      • Decorators
      • Composites and Collections
    • Circular Dependencies
      • Property/Property Dependencies
      • Constructor/Property Dependencies
      • Constructor/Constructor Dependencies
    • Component Metadata / Attribute Metadata
      • Adding Metadata to a Component Registration
      • Consuming Metadata
      • Strongly-Typed Metadata
      • Interface-Based Metadata
      • Attribute-Based Metadata
    • Named and Keyed Services
      • Named Services
      • Keyed Services
    • Delegate Factories
      • Create a Delegate
      • Consume the Delegate
      • Add Resolved Constructor Parameters
      • Lifetime Scopes and Disposal
    • Owned Instances
      • Lifetime and Scope
      • Relationship Types
    • Pooled Instances
      • Getting Started
      • Resetting Pooled Instances Between Resolves
      • Pool Capacity
      • Matching Lifetime Scopes
      • Pool Policies
    • Handling Concurrency
      • Component Registration
      • Service Resolution
      • Lifetime Events
      • Thread Scoped Services
      • Internals
      • Thread-Safe Types
      • Deadlock Avoidance
    • Multitenant Applications
      • What Is Multitenancy?
      • General Principles
      • ASP.NET Integration
      • ASP.NET Core Integration
      • WCF Integration
      • Tenant ID Strategy Tips
      • Example
    • Resolve Pipelines
    • Service Pipelines vs Registration Pipelines
    • Pipeline Phases
    • Adding Registration Middleware
      • Defining Middleware Classes
      • Adding Middleware to all Registrations
    • ResolveRequestContext
    • Adding Service Middleware
    • Service Middleware Sources
    • Aggregate Services
      • Introduction
      • Required References
      • Getting Started
      • How Aggregate Services are Resolved
      • Properties
      • Methods
      • Property Setters and Void Methods
      • How It Works
      • Performance Considerations
    • Type Interceptors
      • Enabling Interception
      • Tips
      • Known Issues
    • Cross-Platform and Native Applications
      • Xamarin
      • .NET Native
    • Debugging and Troubleshooting
      • Exceptions
      • Diagnostics
      • Symbols and Sources
      • Support
  • Examples
    • Examples Repository
    • log4net Integration Middleware
  • Frequently Asked Questions
    • How do I work with per-request lifetime scope?
      • Note on ASP.NET Core
      • Registering Dependencies as Per-Request
      • How Per-Request Lifetime Works
      • Sharing Dependencies Across Apps Without Requests
      • Testing with Per-Request Dependencies
      • Troubleshooting Per-Request Dependencies
      • Implementing Custom Per-Request Semantics
    • How do I pick a service implementation by context?
      • Option 1: Redesign Your Interfaces
      • Option 2: Change the Registrations
      • Option 3: Use Keyed Services
      • Option 4: Use Metadata
    • How do I create a session-based lifetime scope in a web application?
      • Why This is a Bad Idea
      • How to Do It
    • Why aren’t my assemblies getting scanned after IIS restart?
    • How do I conditionally register components?
      • Use Configuration
      • Use Modules
      • Lambda Registrations
    • How do I share component registrations across application types?
    • How do I keep Autofac references isolated away from my app?
      • Application Startup
      • Component Registrations
      • Service Resolution
    • Why are “old versions” of the framework (e.g., System.Core 2.0.5.0) referenced?
    • Why don’t all Autofac packages target the latest Autofac core?
    • How do I inject configuration, environment, or context parameters?
      • Option 1: Register Using a Lambda
      • Option 2: Use a Provider
    • How do I pass a parameter to a component in the middle of a resolve chain?
      • Why This is a Design Problem
      • Solutions
    • Why isn’t container registration analysis built in?
    • Why are things in my Xamarin app misbehaving?
  • Glossary
  • Contributor Guide
  • Getting Support
    • Community Support
    • Commercial Support
    • Filing an Issue
  • API Documentation
  • Owner’s Guide
    • Ownership is About Trust
    • Code of Conduct
    • Responsibilities
      • API Design
      • Bug Fixes and Enhancements
      • Performance and Testing
      • Issue Review
      • Pull Request Review
      • Support
      • Documentation and Examples
      • Compatibility
    • Release Process
    • You Are Not Alone

Indices and tables

  • Index
  • Module Index
  • Search Page

这篇关于Welcome to Autofac’s documentation!的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/479318

相关文章

Autofac和CommunityToolkit中IOC的区别

Autofac和CommunityToolkit中IOC的区别 Autofac和CommunityToolkit中IOC的区别Autofac1、‌定义与功能‌:2、集成与扩展‌:3、学习曲线 CommunityToolkit中的IOC总结 Autofac和CommunityToolkit中IOC的区别 Autofac和CommunityToolkit中的IOC(控制反转)在概念

Documentation/input/cd32.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 姚家珺AriosYao   ks666dejia@163.com 中文版翻译者: 姚家珺AriosYao   ks666dejia@163.com 中文版校译者: 姚家珺AriosYao   ks666d

Documentation/timers/hpet.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 姚家珺AriosYao   ks666dejia@163.com 中文版翻译者: 姚家珺AriosYao   ks666dejia@163.com 中文版校译者: 姚家珺AriosYao   ks666d

Documentation/Filesystem_ext3的中文翻译

Linux内核 文档 翻译Filesystem_ext3Chinese translated version of Documentation/Filesystem_ext3 If you have any comment or update to the content, please contact the original document maintainer directly.  Ho

Documentation_scheduler_sched-rt-group.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 陶莹莉  tyl18768122426@163.com 中文版翻译者:  陶莹莉  tyl18768122426@163.com 中文版校译者:  陶莹莉  tyl18768122426@163.co

Documentation_lockup-watchdogs.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 姚家珺AriosYao   ks666dejia@163.com 中文版翻译者: 姚家珺AriosYao   ks666dejia@163.com 中文版校译者: 姚家珺AriosYao

Documentation_scheduler_sched-nice-design

Chinese translated version of Documentation/scheduler/sched-nice-design Documentation/scheduler/sched-nice-design 的中文翻译 If you have any comment or update to the content, please contact the original

Documentation\devicetree\bindings\arm\arch_timer.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 陶莹莉  tyl18768122426@163.com 中文版翻译者:  陶莹莉  tyl18768122426@163.com 中文版校译者:  陶莹莉  tyl18768122426@1

Documentation\cpu-freq\core.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 陶莹莉  tyl18768122426@163.com 中文版翻译者:  陶莹莉  tyl18768122426@163.com 中文版校译者:  陶莹莉  tyl18768122426@16

Documentation/memory-devices/ti-emif.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 姚家珺AriosYao    ks666dejia@163.com 中文版翻译者: 姚家珺AriosYao    ks666dejia@163.com 中文版校译者: 姚家珺AriosYao    k