Closed silkfire closed 5 years ago
Someone else hit this. I'm perfectly willing to take a pull request for an overload of IncludeRegistry() that just takes a ServiceRegistry object.
You can always just use AddRange(new RegistryWithArgs(myArg));
@jereremydmiller Since I wrote the post I've moved to Grace (https://github.com/ipjohnson/Grace) instead, as it is easier to use and much more performant.
@silkfire Dude, after as huge a PITA as you've been on the SM and Lamar issue lists, you leave a comment like that? I'm very content for you to be their problem.
@jereremydmiller Well it's very unfortunate that Lamar suffers from the same performance issues that SM does. My apps initialize much faster since I've switched to Grace.
Again, you were a huge pain to me over the years. I also pushed the changes today that made a drastic difference in that regard. I'm not going to miss your weird, time consuming generics questions. You are exactly the kind of person that makes being an OSS author miserable sometimes.
You're making such a big deal out of this. I can't possibly have bothered you that much that you must've remembered me. There are tonnes of other people reporting issues on your projects. PS. Oh btw Lamar is such a lame name for the IoC library. Goodbye.
An extension method to work around this:
public static class LamarExtensions
{
public static void IncludeRegistry<T>(this ServiceRegistry parentRegistry, T includeRegistry) where T : ServiceRegistry
{
parentRegistry.AddRange(includeRegistry);
}
}
What's the convention of supplying arguments to the custom ServiceRegistry classes? As of now, it doesn't seem possible. It's as if Lamar assumes that all needed data can be retrieved from within the registry class.
My service registry looks like this: