{"id":37482975,"url":"https://github.com/relativitydev/ads-dependency-injection","last_synced_at":"2026-01-16T07:28:47.044Z","repository":{"id":227937155,"uuid":"768744800","full_name":"relativitydev/ads-dependency-injection","owner":"relativitydev","description":"A sample ADS application with Dependency Injection wired up for the extensibility points","archived":false,"fork":false,"pushed_at":"2024-03-21T13:40:39.000Z","size":1180,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-25T20:40:47.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/relativitydev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2024-03-07T16:49:36.000Z","updated_at":"2024-03-26T17:22:20.000Z","dependencies_parsed_at":"2024-03-21T14:58:45.517Z","dependency_job_id":null,"html_url":"https://github.com/relativitydev/ads-dependency-injection","commit_stats":null,"previous_names":["relativitydev/ads-dependency-injection"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/relativitydev/ads-dependency-injection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relativitydev%2Fads-dependency-injection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relativitydev%2Fads-dependency-injection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relativitydev%2Fads-dependency-injection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relativitydev%2Fads-dependency-injection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/relativitydev","download_url":"https://codeload.github.com/relativitydev/ads-dependency-injection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relativitydev%2Fads-dependency-injection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: 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":"2026-01-16T07:28:46.964Z","updated_at":"2026-01-16T07:28:47.037Z","avatar_url":"https://github.com/relativitydev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ADS Dependency Injection\r\n\r\nThis sample ADS application demonstrates how to do dependency injection with the different ADS platform extensibility points.\r\n\r\nNote: Dependency Injection for Event Handlers is the same as Agents, so the examples are omitted here.\r\n\r\n## Dependency Injection\r\nDependency Injection is a specific implementation of Dependency Inversion, one of the five S.O.L.I.D. object-oriented principles.\r\n\r\nThe internet is full of excellent documentation on the topic, but here are a few specific links:\r\n- [Dependency inversion (Microsoft)](https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/architectural-principles#dependency-inversion)\r\n- [Dependency injection (Wikipedia)](https://en.wikipedia.org/wiki/Dependency_injection)\r\n- [Dependency Injection Demystified (James Shore)](https://www.jamesshore.com/v2/blog/2006/dependency-injection-demystified)\r\n\r\n### Dependency Injection in Kepler services\r\n\r\nRelativity's Kepler framework supports Dependency Injection with Castle Windsor. Support is fully documented in the [Relativity Developer Documentation](https://platform.relativity.com/RelativityOne/Content/Kepler_framework/Dependency_injection.htm).\r\n\r\nSee `SampleApplication.Service.MyService` for a sample implementation.\r\n\r\n### Dependency Injection in Custom Pages\r\n\r\nBecause the Custom Page sample is an ASP.NET MVC project, Castle Windsor Dependency Injection can be wired into the MVC application itself. This can be used at the unit testing level, to inject mocked classes. This can also be used at the test harness level.\r\n\r\nSee `SampleApplication.CustomPage.Controllers.HomeController.cs` and the `SampleApplication.CustomPage.IoC` folder for more information.\r\n\r\n### Dependency Injection in Agent and EventHandler extensibility points\r\n\r\nAgent and EventHAndler extensibility points don't have built-in support for Dependency Injection, but it is still possible. Two variations of a technique for implementing Dependency Injection are shown in `SampleApplication.Agent.MyAgent`. The technique leverages the [Lazy\\\u003cT\\\u003e class](https://learn.microsoft.com/en-us/dotnet/api/system.lazy-1?view=net-8.0) to delay DI Container resolution.\r\n\r\n## Building and Running\r\n\r\nThe code here compiles and can be tested in Visual Studio 2022. It references packages available on [nuget.org](https://www.nuget.org/).\r\n\r\nThe Agent and Service assemblies need to be uploaded to Relativity as Resource Files, and the CustomPage needs to be published, zipped, and uplaoded to Relativity as a Custom Page.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelativitydev%2Fads-dependency-injection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelativitydev%2Fads-dependency-injection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelativitydev%2Fads-dependency-injection/lists"}