ipjohnson / grace.mvc Goto Github PK
View Code? Open in Web Editor NEWExtension library for Grace and MVC 4 & 5
License: MIT License
Extension library for Grace and MVC 4 & 5
License: MIT License
When you make a lookup for a type with Func injected on the constructor, it can mess up the lookup for request-scoped types.
Simple repro on MVC5:
https://drive.google.com/open?id=1StgddYLxUshj0IknbY2zKGo1wc6MUjO3
In this case, the fact that MyMapper is resolved in Global.asax.cs messes up the lookup for IPerRequestThing later on.
In example
https://drive.google.com/open?id=1StgddYLxUshj0IknbY2zKGo1wc6MUjO3
If you comment out the crashing line in Global.asax.cs, you still end up getting the same RequestContext object every request, even though it is registered like this on every request:
Ioc.Container.Configure(b =>
{
b.ExportInstance(new RequestContext()).As<IRequestContext>().Lifestyle.SingletonPerRequest();
});
If you add in a line to print out the hash code for the RequestContext inside PerRequestThing, it always comes up with the same one.
Grace 7.0.0 is doing away with the custom disposal scope provider in favor of using a custom disposal scope expression creator.
To accommodate this we need to implement a new creator and get rid of the disposal scope provider.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.