Skip to content

Test host as "builder"? #12

Description

@joro550

I was wondering what your thoughts would be in having a "fluent" or "builder" type api for the Test host:

var host = new TestHost()
    .AddService<Service1>()
    .AddService<Service2>()
    .AddComponent<MyComponent>();

vs current:

var host = new TestHost();
host.AddService<Service1>();
host.AddService<Service2>();
host.AddComponent<MyComponent>();

Would make it look a lot nicer with multiple services, in essence we're using the AddComponent method as what is more generally called Build

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions