{"id":13629597,"url":"https://github.com/juniorporfirio/grpcinjection","last_synced_at":"2026-01-16T08:44:57.496Z","repository":{"id":143133802,"uuid":"467952120","full_name":"juniorporfirio/grpcinjection","owner":"juniorporfirio","description":"A Source Generator to C#, that allow you injection Grpc Services and Interceptors without Reflection :)","archived":false,"fork":false,"pushed_at":"2022-03-09T14:54:59.000Z","size":18,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T17:48:09.590Z","etag":null,"topics":["build","csharp","csharp-sourcegenerator","dotnet","dotnet-core","source-generator","source-generators","sourcegenerator"],"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/juniorporfirio.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}},"created_at":"2022-03-09T14:05:18.000Z","updated_at":"2024-12-03T05:09:41.000Z","dependencies_parsed_at":"2023-09-17T20:30:56.629Z","dependency_job_id":null,"html_url":"https://github.com/juniorporfirio/grpcinjection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juniorporfirio/grpcinjection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juniorporfirio%2Fgrpcinjection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juniorporfirio%2Fgrpcinjection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juniorporfirio%2Fgrpcinjection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juniorporfirio%2Fgrpcinjection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juniorporfirio","download_url":"https://codeload.github.com/juniorporfirio/grpcinjection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juniorporfirio%2Fgrpcinjection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478048,"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":["build","csharp","csharp-sourcegenerator","dotnet","dotnet-core","source-generator","source-generators","sourcegenerator"],"created_at":"2024-08-01T22:01:14.531Z","updated_at":"2026-01-16T08:44:57.470Z","avatar_url":"https://github.com/juniorporfirio.png","language":"C#","funding_links":[],"categories":["Source Generators","Do not want to test 112 ( old ISourceGenerator )"],"sub_categories":["Dependency Injection (IoC Container)","1. [ThisAssembly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisAssembly) , in the [EnhancementProject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) category"],"readme":"# Grpc Injection\nA Source Generator package for C#, that allow you to generate Grpc Services and Interceptors dependencies without Reflection.\n\u003c!-- [![Nuget count](https://img.shields.io/nuget/v/grpcinjection.svg)](https://www.nuget.org/packages/grpcinjection/) --\u003e\n\n[![Build](https://github.com/juniorporfirio/grpcinjection/actions/workflows/dotnet.yml/badge.svg)](https://github.com/juniorporfirio/grpcinjection/actions/workflows/dotnet.yml) [![License](https://img.shields.io/github/license/juniorporfirio/grpcinjection.svg)](https://github.com/juniorporfirio/grpcinjection/blob/master/LICENSE)\n\n\n## Installing\nThe package is available ([on NuGet](https://www.nuget.org/packages/grpcinjection).\nTo install from the command line:\n\n```shell\ndotnet add package GrpcInjection\n```\n\nOr use the Package Manager in Visual Studio.\n\n\n## Setup Service Provider\nOnly add in your Startup or Program for use this package, like so:\n```csharp\n   public void ConfigureServices(IServiceCollection services)\n        {\n            services.AddGrpcInject();\n        }\n\n        public void Configure(IApplicationBuilder app)\n        {\n            app.UseGrpcInject();\n        }\n```\n\n## Inject one Service Grpc\nOnly add an attribute to the classes Grpc Service that you want injected in your service provider, like so:\n\n```csharp\n\n    [GrpcService]\n    public class GreeterService : Greeter.GreeterBase\n    {\n        private readonly ILogger\u003cGreeterService\u003e _logger;\n        public GreeterService(ILogger\u003cGreeterService\u003e logger)\n        {\n            \n            _logger = logger;\n        }\n\n        public override Task\u003cHelloReply\u003e SayHello(HelloRequest request, ServerCallContext context)\n        {\n            return Task.FromResult(new HelloReply\n            {\n                Message = \"Hello \" + request.Name\n            });\n        }\n    }\n```\n\n## Inject one Interceptor Grpc\nOnly add an attribute to the classes Grpc Interceptors that you want injected in your service provider, like so:\n\n```csharp\n\n    [GrpcInterceptor]\n    public class LogInterceptor : Interceptor\n    {\n        private readonly ILogger\u003cLogInterceptor\u003e _logger;\n        public LogInterceptor(ILogger\u003cLogInterceptor\u003e logger) =\u003e _logger = logger;\n\n    }\n```\n## Contributing\n\nThe main supported IDE for development is Visual Studio 2022.\n\nQuestions, comments, bug reports, and pull requests are all welcome.\nBug reports that include steps to reproduce (including code) are\npreferred. Even better, make them in the form of pull requests.\nBefore you start to work on an existing issue, check if it is not assigned\nto anyone yet, and if it is, talk to that person.\n\n## Maintainers/Core team\n\n-   [Júnior Porfirio](http://juniorporfirio.medium.com/), aka JP,\n    [@juniorporfirio](https://twitter.com/juniorporfirio)\n\nContributors can be found at the [contributors](https://github.com/juniorporfirio/grpcinjection/graphs/contributors) page on Github.\n\n## License\n\nThis software is open source, licensed under the MIT License.\nSee [LICENSE](https://github.com/juniorporfirio/grpcinjection/blob/master/LICENSE) for details.\nCheck out the terms of the license before you contribute, fork, copy or do anything\nwith the code. If you decide to contribute you agree to grant copyright of all your contribution to this project and agree to\nmention clearly if do not agree to these terms. Your work will be licensed with the project at MIT, along the rest of the code.\n\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniorporfirio%2Fgrpcinjection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuniorporfirio%2Fgrpcinjection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniorporfirio%2Fgrpcinjection/lists"}