JasperFx / lamar

Fast Inversion of Control Tool and Successor to StructureMap
https://jasperfx.github.io/lamar
MIT License
563 stars 118 forks source link

Documentation "Building objects with Lambdas" #255

Closed jasase closed 3 years ago

jasase commented 4 years ago

I try the example from the documentation Building objects with Lambdas but it is not working.

After changing the code I got the basic example running. But i need the function Expression<Func<IContext, T>> builder to upgrade from StructureMap. But it is not available

jeremydmiller commented 3 years ago

@jasase That's some very old StructureMap syntax that has gotten incorrectly copied over in the docs. You do have the ability to expose Lambda registrations that use either IServiceContext that effectively exposes the container. You don't have all the contextual information that you did in StructureMap, and that's actually on purpose. Lamar won't support everything that's on structureMap's IContext