{"id":13430744,"url":"https://github.com/ipjohnson/Grace","last_synced_at":"2025-03-16T06:31:07.505Z","repository":{"id":12984385,"uuid":"15663220","full_name":"ipjohnson/Grace","owner":"ipjohnson","description":"Grace is a feature rich dependency injection container  library","archived":false,"fork":false,"pushed_at":"2024-03-10T20:10:59.000Z","size":30787,"stargazers_count":335,"open_issues_count":36,"forks_count":33,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-05-29T20:58:13.983Z","etag":null,"topics":["c-sharp","dependency-injection","ioc-container"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipjohnson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-06T02:26:15.000Z","updated_at":"2024-06-19T06:11:25.985Z","dependencies_parsed_at":"2024-06-19T06:11:24.769Z","dependency_job_id":"bd25b57a-1848-44e6-97f1-81c28471fa34","html_url":"https://github.com/ipjohnson/Grace","commit_stats":{"total_commits":1394,"total_committers":10,"mean_commits":139.4,"dds":"0.016499282639885204","last_synced_commit":"406f2c4fda5b680582828737f071440eaec59bea"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipjohnson%2FGrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipjohnson%2FGrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipjohnson%2FGrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipjohnson%2FGrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipjohnson","download_url":"https://codeload.github.com/ipjohnson/Grace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746116,"owners_count":20341203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","dependency-injection","ioc-container"],"created_at":"2024-07-31T02:00:57.316Z","updated_at":"2025-03-16T06:31:07.500Z","avatar_url":"https://github.com/ipjohnson.png","language":"C#","funding_links":[],"categories":["Frameworks, Libraries and Tools","others","框架, 库和工具","Runtime dependency injection"],"sub_categories":["IOC","控制反转IOC"],"readme":"# Notice:\nAfter many years of development I am making the decision to sunset Grace. While it's still possible to use Grace, the evolution of the built in dependency injection container has made Grace less relavent. I say thank you to the people that have supported the project over the past decade and look forward to the future of C# and specifically source code generators. \n\n# Grace\n\n\u003cimg src=\"https://raw.githubusercontent.com/ipjohnson/Grace/master/img/logo.svg?sanitize=true\" width=\"76\"\u003e\n\n[![Build status](https://ci.appveyor.com/api/projects/status/rpgdoopau4hh1ltn?svg=true)](https://ci.appveyor.com/project/ipjohnson/grace) [![Coverage Status](https://coveralls.io/repos/github/ipjohnson/Grace/badge.svg)](https://coveralls.io/github/ipjohnson/Grace) [![Stack Overflow](https://img.shields.io/badge/StackOverflow-QnA-green.svg)](http://stackoverflow.com/questions/tagged/grace-ioc)\n\nGrace is a feature-rich dependency injection container designed with ease of use and performance in mind. \n\n```csharp \nusing Grace.DependencyInjection;\n\nvar container = new DependencyInjectionContainer();\n\ncontainer.Configure(c =\u003e c.Export\u003cBasicService\u003e().As\u003cIBasicService\u003e());\n\nvar basicService = container.Locate\u003cIBasicService\u003e();\n```\n\nIt's as easy as create, configure, and locate.\n\nGetting Grace\n=====\n\n[NuGet](http://www.nuget.org/packages/Grace/) package supports .Net 4.5 and .Net Standard 1.0.\n\n[Getting Started](https://github.com/ipjohnson/Grace/wiki/Getting-Started)  - A getting started guide for Grace as well as documentation for more complex topics \n\nFeatures in Grace\n=====\n\n* Fluent interface or Attributes for configuration allowing for maximum flexibility\n* Supports child containers and light weight lifetime scopes\n* Contextual binding support (similar to NInject)\n* IDisposable objects created by the container will be tracked and disposed by the container unless configured otherwise.\n* Performance characteristics that make it one of the fastest containers available. ([Benchmarks](http://www.palmmedia.de/blog/2011/8/30/ioc-container-benchmark-performance-comparison))\n* Supports special types\n   * IEnumerable\u0026lt;T\u0026gt; - supports resolving collections as IEnumerable\u0026lt;T\u0026gt; as well as most other types of collections List\u0026lt;T\u0026gt;, ReadOnlyCollection\u0026lt;T\u0026gt;, T[] and any collection that implements ICollection\u0026lt;T\u0026gt;\n   * Func\u0026lt;T\u0026gt; - supports resolving Func\u003cT\u0026gt; automatically\n   * Lazy\u0026lt;T\u0026gt; - when resolved a Lazy\u0026lt;T\u0026gt; will be created that resolves T from the scope it was created in\n   * Owned\u0026lt;T\u0026gt; - object resolved within a Owned\u0026lt;T\u0026gt; will have their disposal lifecycle tied to the Owned\u0026lt;T\u0026gt; (similar to Autofac)\n   * Meta\u0026lt;T\u0026gt; - objects resolved within a Meta\u0026lt;T\u0026gt; are resolved along with their metadata\n   * Custom Delegates - any delegate that returns a type can be automatically resolved. \n   * Custom interface factories with Grace.Factory\n* Many LifeStyles supported including Singleton, SingletonPerScope, SingletonPerRequest (MVC4, MVC5 \u0026 WCF packages), SingletonPerObjectGraph, SingletonPerAncestor\u0026lt;T\u0026gt;, and WeakSingleton. If none of the provided life styles meet your need you can always implement your own ICompiledLifeStyle class.\n* Built in support for the decorator pattern\n* Support for custom wrappers (Func\u0026lt;T\u0026gt; and Meta\u0026lt;T\u0026gt; are examples of built-in wrappers)\n* [ASP.Net Core](https://github.com/ipjohnson/Grace.DependencyInjection.Extensions) supports\n* [Source Link](https://github.com/dotnet/sourcelink) support enabled\n* [Release Notes](https://github.com/ipjohnson/Grace/wiki/Release-Notes)\n\nSpecial thanks to @silkfire for the logo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipjohnson%2FGrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipjohnson%2FGrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipjohnson%2FGrace/lists"}