FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Keyed service support · Issue #1923 · DSharpPlus/DSharpPlus · GitHub

Keyed service support #1923

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)
{
  private IMemoryCache small = sp.GetRequiredKeyedService<IMemoryCache>("small");
  private IMemoryCache big = sp.GetRequiredKeyedService<IMemoryCache>("big");
}

Specify the libraries you want this feature request to affect

DSharpPlus.Commands

Other considerations

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    commandsFor issues related to DSharpPlus.Commands

    Fields

    Effort

    None yet

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL