Why do you need to modify the code in your client based on which service you're connecting to? Wouldn't you just be able to have 2 different .config files? One that contains connection for dev service and one that contains connection for test service? Just switch out .config files based on test/dev mode.
Of course, the contract for your service would be an interface and both dev and test versions of the service use that same contract interface, but that didn't seem to be what you were asking.
Edit:
Extract a ServiceContract Interface for your service if you haven't already done so. Both your dev and test services should implement the interface. Something like this:
[ServiceContract(Namespace="http://stackoverflow.com/questions/965977")]
public interface IASRService
{
[OperationContract]
ASRItem GetASRItem();
}
Your app.config (or web.config) file for your client should contain something like this where {namespace}
is the namespace location of your interface. If you wanted to keep them both in a single .config file, this will work.
<system.serviceModel>
<client>
<endpoint name="ASRService" address="http://yourserver.com/ASRService"
contract="{namespace}.IASRService" binding="basicHttpBinding"/>
<endpoint name="ASRServiceTest" address="http://localhost/ASRService"
contract="{namespace}.IASRService" binding="basicHttpBinding"/>
</client>
</system.serviceModel>
Code in your client that uses the services would look like this. Specify the name of the configuration in the ChannelFactory constructor.
ChannelFactory<IASRService> cf = new ChannelFactory<IASRService>("ASRService");
IASRService proxy = cf.CreateChannel();
ASRItem DevServiceItem = proxy.GetASRItem;
OR
ChannelFactory<IASRService> cfTest = new ChannelFactory<IASRService>("ASRServiceTest");
IASRService proxyTest = cfTest.CreateChannel();
ASRItem TestServiceItem = proxyTest.GetASRItem;
Since the type of either proxy is always IASRService, the code you have that manipulates the objects only needs to know about that Interface type. It shouldn't care which version of the service generated the object.
Also, I would recommend the book Learning WCF by Michele Leroux Bustamante. Great examples on how to do all this stuff!