This is an assembly that creates proxy classes on-the-fly using the Reflection.Emit API. Generics are supported.
Note that no more work is going into this project. Consider using System.Reflection.DispatchProxy
:
This is an assembly that creates proxy classes on-the-fly using the Reflection.Emit API. Generics are supported.
License: Microsoft Public License
This is an assembly that creates proxy classes on-the-fly using the Reflection.Emit API. Generics are supported.
Note that no more work is going into this project. Consider using System.Reflection.DispatchProxy
:
Based on this article:
http://michaelbraude.com/2008/12/overriding-dispose-with-reflectionemit.html
This might be an issue. Ensure there's tests there for this case, and if it's an issue, address it.
Self-explanatory :)
I don't think I'm being as aggressive as I can be with using "short form" opcodes. I need to review the emitting code to see if there's any places for this kind of optimization.
Change Proxy.Create() to take a List<> (or array) of interfaces. Create a proxy that implements all interface members (and handle collisions among the interfaces gracefully).
Since finalizers can be overriden, consider having the proxy override them if it sees them.
I think I do this by default anyway, but I should investigate if this should continue to work this way, and if this should be added to the ProxyContext object as a configurable flag.
Especially for IInvocationHandler - it's not at all clear what the bool return values should be.
Self-explanatory
Self-explanatory. If Proxy.Create() gets an abstract type, create a proxy for it. Add before/after calls for abstract methods, but no-op the implementation in the proxy subclass (return the default value if the method has a return value).
I.e. I'm giving a Serializable type, how do I effectively implement that in the dynamic type? And if that's serialized, how (if it can) does it get deserialized into the base class type? Need to (probably) mark the wrapped object and handler fields as [NotSerializable].
It would be interesting to see if using the Compiler API to generate the proxy objects would be an overall "better" experience. Basically do what Rocks does: generate the proxy class via C# (as a string) and then compile/emit. That would probably be slower than doing direct IL generation, but it would make the overall process cleaner and easier (and it would also make it far easier to debug).
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.