scottoffen / grapevine-legacy

Embedding A REST Server In Your Application Should Be Simple
http://scottoffen.github.io/grapevine-legacy/
Apache License 2.0
209 stars 51 forks source link

Enabling to create new objects using another method (Ninject for example) #181

Closed jkvargas closed 3 years ago

jkvargas commented 7 years ago

With this commit you can define a way on how grapevine will generate objects for you, follows an example using ninject:

IKernel kernel = new StandardKernel(new INinjectModule[] { new Whatever() });

Grapevine.Server.RestServer.CustomCreateInstance = (Type p) => { return kernel.Get(p); };

scottoffen commented 3 years ago

No new features are being added to Grapevine 4. Grapevine 5 supports dependency injection, and can be found here: https://github.com/scottoffen/grapevine