{"id":24497440,"url":"https://github.com/pmikstacki/bdziam.externaldependencyresolver","last_synced_at":"2026-02-12T21:30:53.967Z","repository":{"id":271593227,"uuid":"913959839","full_name":"pmikstacki/Bdziam.ExternalDependencyResolver","owner":"pmikstacki","description":"Small and Simple Extension of Default Microsoft Dependency Injection to add support for Instantiating external Services using IServiceProvider","archived":false,"fork":false,"pushed_at":"2025-01-08T18:38:21.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T12:41:21.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmikstacki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-01-08T17:18:38.000Z","updated_at":"2025-01-08T18:38:24.000Z","dependencies_parsed_at":"2025-01-08T18:22:49.650Z","dependency_job_id":"aef93d20-0baf-442c-8292-6eb236c5bc18","html_url":"https://github.com/pmikstacki/Bdziam.ExternalDependencyResolver","commit_stats":null,"previous_names":["pmikstacki/bdziam.externaldependencyresolver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pmikstacki/Bdziam.ExternalDependencyResolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmikstacki%2FBdziam.ExternalDependencyResolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmikstacki%2FBdziam.ExternalDependencyResolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmikstacki%2FBdziam.ExternalDependencyResolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmikstacki%2FBdziam.ExternalDependencyResolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmikstacki","download_url":"https://codeload.github.com/pmikstacki/Bdziam.ExternalDependencyResolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmikstacki%2FBdziam.ExternalDependencyResolver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29381744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T20:34:40.886Z","status":"ssl_error","status_checked_at":"2026-02-12T20:23:00.490Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-01-21T21:33:49.060Z","updated_at":"2026-02-12T21:30:53.945Z","avatar_url":"https://github.com/pmikstacki.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bdziam.ExternalDependencyResolver\n\nBdziam.ExternalDependencyResolver is a C# library that provides a mechanism to resolve dependencies for a given type using a combination of a service provider and additional dependencies.\n\n## Features\n\n- Resolves dependencies using a service provider.\n- Supports additional dependencies.\n- Allows overriding dependencies with additional ones.\n\n## Installation\n\nTo install Bdziam.ExternalDependencyResolver, add the following package to your project:\n\n```bash\ndotnet add package Bdziam.ExternalDependencyResolver\n```\n\n## Usage\n\n### Registering the Resolver\n\nTo register the `ExternalDependencyResolver` in your `IServiceCollection`, use the `AddExternalDependencyResolver` extension method:\n\n```csharp\nusing Microsoft.Extensions.DependencyInjection;\nusing Bdziam.ExternalDependencyResolver;\n\nvar services = new ServiceCollection();\nservices.AddExternalDependencyResolver();\n```\n\nYou can also provide a custom `IServiceProvider`:\n\n```csharp\nvar customServiceProvider = new ServiceCollection().BuildServiceProvider();\nservices.AddExternalDependencyResolver(customServiceProvider);\n```\n\n### Resolving Dependencies\n\nTo resolve dependencies, use the `ExternalDependencyResolver` class:\n\n```csharp\nusing Bdziam.ExternalDependencyResolver;\nusing System;\nusing System.Collections.Generic;\n\nvar serviceProvider = new ServiceCollection().BuildServiceProvider();\nvar resolver = new ExternalDependencyResolver(serviceProvider);\n\nvar instance = resolver.Resolve\u003cMyClass\u003e();\n```\n\nYou can also provide additional dependencies and override existing ones:\n\n```csharp\nvar additionalDependencies = new KeyValuePair\u003cType, object\u003e[]\n{\n    new KeyValuePair\u003cType, object\u003e(typeof(IMyDependency), new MyDependency())\n};\n\nvar instance = resolver.Resolve\u003cMyClass\u003e(true, additionalDependencies);\n```\n\n## Testing\n\nThe project includes unit tests using xUnit and Moq. To run the tests, use the following command:\n\n```bash\ndotnet test\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MPL License. See the `LICENSE` file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmikstacki%2Fbdziam.externaldependencyresolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmikstacki%2Fbdziam.externaldependencyresolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmikstacki%2Fbdziam.externaldependencyresolver/lists"}