private bool Evaluate(out object newValue) { newValue = null; ExpressionEvaluationService evaluator = new ExpressionEvaluationService(); IDictionaryService dictservice = (IDictionaryService)GetService(typeof(IDictionaryService)); Type proxyType = null; string language = string.Empty; try { proxyType = (Type)evaluator.Evaluate( this._typeExpression, new ServiceAdapterDictionary(dictservice)); language = (string)evaluator.Evaluate( this._languageExpression, new ServiceAdapterDictionary(dictservice)); } catch { } newValue = ProxyFactoryHelper.GetProxyFactory(proxyType, language); return(newValue != null); }
private bool Evaluate(out object newValue) { newValue = null; Type proxyType = ExpressionEvaluationHelper.EvaluateExpression((IDictionaryService)GetService(typeof(IDictionaryService)), _proxyType) as Type; if (proxyType != null) { newValue = ProxyFactoryHelper.GetProxyTechnology(proxyType); return(true); } return(false); }
private string GetProxyAddress(Type proxyType, XmlDocument mapFile) { ProxyTechnology proxyTech = ProxyFactoryHelper.GetProxyTechnology(proxyType); if (proxyTech == ProxyTechnology.Asmx) { SoapHttpClientProtocol proxy = (SoapHttpClientProtocol)Activator.CreateInstance(proxyType); if (proxy != null) { return(proxy.Url); } } else if (proxyTech == ProxyTechnology.Wcf) { return(GetAddresFromMapFile(mapFile)); } return(string.Empty); }