Skip to content

Add ability to use open generics with factory pattern #7

Description

@carusology

Based upon my research and the results of this stackoverflow question, it does not appear to be possible to use the factory pattern with Microsoft's built in dependency injection pattern. I need to support something like this:

services.AddWithFactory(
    new Type[] { Foo, Bar },
    typeof(IRepository<>),
    typeof(IRepositoryFactory<>),
    ServiceLifetime.Singleton
);

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions