February 2011 - Posts

8
Comments

Templated Razor Delegates – Phil Haack by nmarun

This post is largely based off of Phil Haack ’s article titled Templated Razor Delegates . I strongly recommend reading this article first. Here’s a sample code for the same, so you can have a look at. I also have a custom type being rendered as a table...
Filed under: , , ,
6
Comments

Passing a parameter so that it cannot be changed – C# by nmarun

I read this requirement of not allowing a user to change the value of a property passed as a parameter to a method. In C++, as far as I could recall (it’s been over 10 yrs, so I had to refresh memory), you can pass ‘const’ to a function parameter and...
Filed under: ,
18
Comments

ASP.NET MVC ‘Extendable-hooks’ – ControllerActionInvoker class by nmarun

There’s a class ControllerActionInvoker in ASP.NET MVC. This can be used as one of an hook-points to allow customization of your application. Watching Brad Wilsons’ Advanced MP3 from MVC Conf inspired me to write about this class. What MSDN says: “Represents...
Filed under: , ,
3
Comments

WSDL-world vs CLR-world – some differences by nmarun

A change in mindset is required when switching between a typical CLR application and a web service application. There are some things in a CLR environment that just don’t add-up in a WSDL arena (and vice-versa). I’m listing some of them here. When I say...
Filed under: , , , ,
4
Comments

WCF – interchangeable data-contract types by nmarun

In a WSDL based environment, unlike a CLR-world, we pass around the ‘state’ of an object and not the reference of an object. Well firstly, what does ‘state’ mean and does this also mean that we can send a struct where a class is expected (or vice-versa...
Filed under: , ,
3
Comments

Hierarchy flattening of interfaces in WCF by nmarun

Alright, so say I have my service contract interface as below: 1: [ServiceContract] 2: public interface ILearnWcfService 3: { 4: [OperationContract(Name = "AddInt" )] 5: int Add( int arg1, int arg2); 6: } Say I decided to add another interface...
Filed under: , ,
More Posts