Mehfuz's WebLog

Live crazy, think different!

Sponsors

Browse by Tags

All Tags » MSIL (RSS)
Mocking constructor
While unit testing a target type, it is likely that the test is failing during object creation because we forgot to include a mandatory configuration file or a line in the constructor is throwing exception because it is making call to some external service...
Posted: Mar 22 2011, 09:35 PM by mehfuzh | with 1 comment(s)
Filed under: , , , ,
Creating a basic proxy for intercepting [quick update].
In my previous post, i enhanced the proxy to support generic calls. In order to minimize IL emit and move more parts to managed code, there is a better way to process the return value rather doing the checks against runtime method and see whether the...
Posted: Feb 28 2010, 08:28 PM by mehfuzh | with 1 comment(s)
Filed under: ,
A basic proxy for intercepting method calls (Part – 3)
In my previous posts, I showed how to create a proxy that can delegate calls. I further modified it to support argument list from original method and handled scenarios for void and non-void calls. In this post, i will further enhance it to introduce generic...
Posted: Feb 22 2010, 03:37 AM by mehfuzh | with 7 comment(s)
Filed under: ,
A basic proxy for intercepting method calls (Part –2)
In my previous post , i introduced a basic proxy that intercepts methods. But what is missing in the proxy is that it does not consider method arguments and can not handle return types. In this post, i will enhance the proxy to support exactly those....
Posted: Jan 23 2010, 02:04 PM by mehfuzh | with 1 comment(s)
Filed under: ,
A basic proxy for intercepting method calls (Part –1)
In this post, i am going to show how you can write your own proxy for delegating calls. This just shows a way how you can handle it on your own but for complex interceptions its always wise to use alpha/beta/tested solutions. The post is more of an under...
Posted: Jan 03 2010, 11:29 PM by mehfuzh | with 4 comment(s)
Filed under: ,
Operation could destabilize the runtime – Reflection.Emit and common pitfalls
In the last post i said about LinqtExtender implementing necessary property and injecting specific settings for entity objects. The issue i have is that it works fine under full / high trust settings but when running in medium trust it gives the following...
Posted: Jun 07 2009, 04:14 PM by mehfuzh | with no comments
Filed under: ,
More Posts