Cancelling Default Execution

Jul 6, 2010 at 2:51 PM

Hello,

I want to write a custom ICallHandler that cancels default execution when setter properties are called. The problem is, I don't know what to return/do in this case.

Here is my code:

public IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
{
	String propertyName = input.MethodBase.Name.Substring(4);
	Boolean isSetter = input.MethodBase.Name.StartsWith("set_") == true;
	IMethodReturn result = null;

	if (isSetter != true)
	{
		result = getNext()(input, getNext);
	}
	else
	{
		//?
	}
	return (result);
}

Any ideas?

Thanks,

Ricardo Peres

Jul 7, 2010 at 10:11 AM
Edited Jul 7, 2010 at 10:24 AM

Answered in this thread - http://entlib.codeplex.com/Thread/View.aspx?ThreadId=218568