castleproject/Core — pull request #25 by jcviau (2013-04-29 20:39:35+00:00)
Title: Fixed DYNPROXY-186 .Net remoting (transparent proxy) cannot be proxied 

1- Ensure to validate that the interfaceToProxy member is not null
before using it.

2- Was throwing for this conditon (if (target != null &&
interfaceToProxy.IsInstanceOfType(target) == false)) at the beginning of
the method. There was no need to check this again in the method. In
fact, the code
done in this if would never be executed, it would have been an
exception.

3- This call interfaceToProxy.IsInstanceOfType(target) already
validated that in the case of a transparent proxy, the target implement
the interface. The call IsInstanceOfType is done on the real object (not
the transparent proxy created by .net remoting).

Note : Kept the COM code there, but no idea if it's used by anyone since
I did
not find any issue/defect for lack of support of COM and it was not
working since release 3.1.0 RC.

TEST
Test done on an test application, hard to have a unit test for .net
remoting issue.
Ran Unit Test