Browse by Tags

All Tags » MSIL (RSS)

Mocking constructor by Mehfuz's WebLog

Often we end up in a situation where constructor call on the target type requires us to include  a config file in our test project or requires firing up some external process. To better illustrate this if we create an entity framework data container...
Filed under: , , ,

Creating a basic proxy for intercepting [quick update]. by Mehfuz's WebLog

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...
Filed under: ,

A basic proxy for intercepting method calls (Part – 3) by Mehfuz's WebLog

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...
Filed under: ,

A basic proxy for intercepting method calls (Part –2) by Mehfuz's WebLog

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....
Filed under: ,

A basic proxy for intercepting method calls (Part –1) by Mehfuz's WebLog

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...
Filed under: ,

Operation could destabilize the runtime – Reflection.Emit and common pitfalls by Mehfuz's WebLog

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...
Filed under: ,
Powered by Community Server (Non-Commercial Edition), by Telligent Systems