We are using DotNet Remoting for our application server and also using StructureMap. How do go about setting up proper dependency injection inside the remoting objects so that my code is no longer littered with dependency lookup code like this?
PolicyEntity policy = ObjectFactory.GetInstance<IPolicyDataAccessor> ().FindByPolicyId (policyId);
To be clear, I want to be able to declare a property on my remoting object and have StructureMap inject into it. Then I can just write.
PolicyEntity policy = PolicyDataAccessor.FindByPolicyId (policyId);
Any help will be appreciated.