markiodev / Networker

A simple to use TCP and UDP networking library for .NET. Compatible with Unity.
MIT License
477 stars 77 forks source link

Support multiple RegisterTypes calls on one IBuilder instance #35

Open erictuvesson opened 5 years ago

erictuvesson commented 5 years ago

Currently the second RegisterTypes call overrides the previous call as it's saved as an action in the builder.

new ServerBuilder()
    .RegisterTypes(serviceCollection =>
    {
        // Never called
    })
    .RegisterTypes(serviceCollection =>
    {
        // Called
    })

Would be nice if it was possible to call it multiple times or that it alerted that it is already set.

darkfriend77 commented 5 years ago

Hi, how is RegisterTypes beeing used, is there an example?

sry as it is not helping your issue, but it seems you know more about ...