public frm_People() { InitializeComponent(); //Создание прокси-объекта в зависимости от протокола, //выбранного в настройках if (MySettings.Default.ProtocolXmlRpc) { xmlrpc_proxy = XmlRpcProxyGen.Create <IMyProxy>(); } else if (MySettings.Default.ProtocolSoap) { soap_proxy = new SoapAPI.MyServicePortTypeClient(); } else if (MySettings.Default.ProtocolRest) { ChannelFactory <IRest2018> factory; factory = new ChannelFactory <IRest2018>("REST2018"); rest_proxy = factory.CreateChannel(); } }
public void GlobalSetupSimple() { var proxy = new MyProxy(); this.realProxy = proxy.GetProxyObject(); }