Title: Keyed service support · Issue #1923 · DSharpPlus/DSharpPlus · GitHub
Open Graph Title: Keyed service support · Issue #1923 · DSharpPlus/DSharpPlus
X Title: Keyed service support · Issue #1923 · DSharpPlus/DSharpPlus
Description: Description It would be really cool if we could do public class Dependant([FromKeyedServices("small")] IMemoryCache small, [FromKeyedServices("big")] IMemoryCache big); instead of having to do: public class Dependant(IServiceProvider sp)...
Open Graph Description: Description It would be really cool if we could do public class Dependant([FromKeyedServices("small")] IMemoryCache small, [FromKeyedServices("big")] IMemoryCache big); instead of having to do: pub...
X Description: Description It would be really cool if we could do public class Dependant([FromKeyedServices("small")] IMemoryCache small, [FromKeyedServices("big")] IMemoryCache big); instead ...
Opengraph URL: https://github.com/DSharpPlus/DSharpPlus/issues/1923
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Keyed service support","articleBody":"### Description\r\n\r\nIt would be really cool if we could do\r\n```cs\r\npublic class Dependant([FromKeyedServices(\"small\")] IMemoryCache small, [FromKeyedServices(\"big\")] IMemoryCache big);\r\n``` \r\ninstead of having to do:\r\n```cs\r\npublic class Dependant(IServiceProvider sp)\r\n{\r\n private IMemoryCache small = sp.GetRequiredKeyedService\u003cIMemoryCache\u003e(\"small\");\r\n private IMemoryCache big = sp.GetRequiredKeyedService\u003cIMemoryCache\u003e(\"big\");\r\n}\r\n```\r\n\r\n### Specify the libraries you want this feature request to affect\r\n\r\nDSharpPlus.Commands\r\n\r\n### Other considerations\r\n\r\n_No response_","author":{"url":"https://github.com/ddjerqq","@type":"Person","name":"ddjerqq"},"datePublished":"2024-05-27T21:18:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1923/DSharpPlus/issues/1923"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:38b2c771-9634-2695-1209-6e9cef80c48a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 896E:39E08A:86B70C:AE832D:698D1DA0 |
| html-safe-nonce | 2753b8aa4c911e8ee54f00a037314225506fc5a31d4907056b756a3a63dfaaa8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTZFOjM5RTA4QTo4NkI3MEM6QUU4MzJEOjY5OEQxREEwIiwidmlzaXRvcl9pZCI6IjI4NjU0MzE5MDc2ODM2MDU5MjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 903d9e528cbd9070cc2c7de817dc4b7bf911515ecaf574234ff9f799042c65da |
| hovercard-subject-tag | issue:2319790854 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/DSharpPlus/DSharpPlus/1923/issue_layout |
| twitter:image | https://opengraph.githubassets.com/34b9deae078d33175c536f7fa7eef75993da7d9a874fbb88aa1825368199bc62/DSharpPlus/DSharpPlus/issues/1923 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/34b9deae078d33175c536f7fa7eef75993da7d9a874fbb88aa1825368199bc62/DSharpPlus/DSharpPlus/issues/1923 |
| og:image:alt | Description It would be really cool if we could do public class Dependant([FromKeyedServices("small")] IMemoryCache small, [FromKeyedServices("big")] IMemoryCache big); instead of having to do: pub... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ddjerqq |
| hostname | github.com |
| expected-hostname | github.com |
| None | c25395580e1e3bf82d705e0982a1b24255366088720fef945f1493d5e3e67954 |
| turbo-cache-control | no-preview |
| go-import | github.com/DSharpPlus/DSharpPlus git https://github.com/DSharpPlus/DSharpPlus.git |
| octolytics-dimension-user_id | 36208721 |
| octolytics-dimension-user_login | DSharpPlus |
| octolytics-dimension-repository_id | 67243489 |
| octolytics-dimension-repository_nwo | DSharpPlus/DSharpPlus |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 67243489 |
| octolytics-dimension-repository_network_root_nwo | DSharpPlus/DSharpPlus |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 94219dcb9c044792ec271fd5b23c73419858bef7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width