Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An addictive .NET IoC container

License

NotificationsYou must be signed in to change notification settings

basedalexander/Autofac

 
 

Repository files navigation

Autofac

Autofac is anIoC container for Microsoft .NET. It manages the dependencies between classes so thatapplications stay easy to change as they grow in size and complexity. This is achieved by treating regular .NET classes ascomponents.

Build statusMyGet publish statusAutofac on Stack OverflowJoin the chat at https://gitter.im/autofac/autofacNuGet

Get Packages

You can get Autofac bygrabbing the latest NuGet packages. If you're feeling adventurous,continuous integration builds are on MyGet.

Release notes are available on the wiki.

Get Help

Need help with Autofac? We havea documentation site as well asAPI documentation. We're ready to answer your questions onStack Overflow or check out thediscussion forum.

Get Started

OurGetting Started tutorial walks you through integrating Autofac with a simple application and gives you some starting points for learning more.

Super-duper quick start:

Register components with aContainerBuilder and then build the component container.

varbuilder=newContainerBuilder();builder.Register(c=>newTaskController(c.Resolve<ITaskRepository>()));builder.RegisterType<TaskController>();builder.RegisterInstance(newTaskController());builder.RegisterAssemblyTypes(controllerAssembly);varcontainer=builder.Build();

Resolve services from a lifetime scope - either the container or a nested scope:

vartaskController=container.Resolve<TaskController>();

There is a growing number ofapplication integration libraries that make using Autofac with your application a snap. Support for several popular frameworks is also available through the "Extras" packages.

Intrigued? Check out our Getting Started walkthrough!

Project

Autofac is licensed under the MIT license, so you can comfortably use it in commercial applications (we still lovecontributions though).

File issues in the repo with the associated feature/code.

Contributing / Pull Requests

Refer to theContributor Guidefor setting up and building Autofac source.

About

An addictive .NET IoC container

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C#99.3%
  • PowerShell0.7%

[8]ページ先頭

©2009-2025 Movatter.jp