public SoapHttpClientProtocol() { Type type = this.GetType(); this.clientType = (SoapClientType) WebClientProtocol.GetFromCache(type); if (this.clientType != null) return; lock (WebClientProtocol.InternalSyncObject) { this.clientType = (SoapClientType) WebClientProtocol.GetFromCache(type); if (this.clientType != null) return; this.clientType = new SoapClientType(type); WebClientProtocol.AddToCache(type, (object) this.clientType); } }
public SoapHttpClientProtocol() { Type type = base.GetType(); this.clientType = (SoapClientType) WebClientProtocol.GetFromCache(type); if (this.clientType == null) { lock (WebClientProtocol.InternalSyncObject) { this.clientType = (SoapClientType) WebClientProtocol.GetFromCache(type); if (this.clientType == null) { this.clientType = new SoapClientType(type); WebClientProtocol.AddToCache(type, this.clientType); } } } }
/// <include file='doc\SoapClientProtocol.uex' path='docs/doc[@for="SoapHttpClientProtocol.SoapHttpClientProtocol"]/*' /> /// <devdoc> /// <para> /// Initializes a new instance of the <see cref='System.Web.Services.Protocols.SoapHttpClientProtocol'/> class. /// </para> /// </devdoc> public SoapHttpClientProtocol() : base() { Type type = this.GetType(); clientType = (SoapClientType)GetFromCache(type); if (clientType == null) { lock (type){ clientType = (SoapClientType)GetFromCache(type); if (clientType == null) { clientType = new SoapClientType(type); AddToCache(type, clientType); } } } }
public SoapHttpClientProtocol() { Type type = base.GetType(); this.clientType = (SoapClientType)WebClientProtocol.GetFromCache(type); if (this.clientType == null) { lock (WebClientProtocol.InternalSyncObject) { this.clientType = (SoapClientType)WebClientProtocol.GetFromCache(type); if (this.clientType == null) { this.clientType = new SoapClientType(type); WebClientProtocol.AddToCache(type, this.clientType); } } } }
public static bool GenerateXmlMappings(Type type, ArrayList mappings) { if (!typeof(SoapHttpClientProtocol).IsAssignableFrom(type)) { return(false); } WebServiceBindingAttribute attribute = WebServiceBindingReflector.GetAttribute(type); if (attribute == null) { throw new InvalidOperationException(Res.GetString("WebClientBindingAttributeRequired")); } string serviceNamespace = attribute.Namespace; bool serviceDefaultIsEncoded = SoapReflector.ServiceDefaultIsEncoded(type); ArrayList soapMethodList = new ArrayList(); SoapClientType.GenerateXmlMappings(type, soapMethodList, serviceNamespace, serviceDefaultIsEncoded, mappings); return(true); }
/// <include file='doc\ClientProtocol.uex' path='docs/doc[@for="HttpWebClientProtocol.GenerateXmlMappings"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public static bool GenerateXmlMappings(Type type, ArrayList mappings) { if (typeof(SoapHttpClientProtocol).IsAssignableFrom(type)) { WebServiceBindingAttribute binding = WebServiceBindingReflector.GetAttribute(type); if (binding == null) { throw new InvalidOperationException(Res.GetString(Res.WebClientBindingAttributeRequired)); } // Note: Service namespace is taken from WebserviceBindingAttribute and not WebserviceAttribute because // the generated proxy does not have a WebServiceAttribute; however all have a WebServiceBindingAttribute. string serviceNamespace = binding.Namespace; bool serviceDefaultIsEncoded = SoapReflector.ServiceDefaultIsEncoded(type); ArrayList soapMethodList = new ArrayList(); SoapClientType.GenerateXmlMappings(type, soapMethodList, serviceNamespace, serviceDefaultIsEncoded, mappings); return(true); } return(false); }
public SoapHttpClientProtocol() { Type type = this.GetType(); this.clientType = (SoapClientType)WebClientProtocol.GetFromCache(type); if (this.clientType != null) { return; } lock (WebClientProtocol.InternalSyncObject) { this.clientType = (SoapClientType)WebClientProtocol.GetFromCache(type); if (this.clientType != null) { return; } this.clientType = new SoapClientType(type); WebClientProtocol.AddToCache(type, (object)this.clientType); } }
/// <include file='doc\SoapClientProtocol.uex' path='docs/doc[@for="SoapHttpClientProtocol.SoapHttpClientProtocol"]/*' /> /// <devdoc> /// <para> /// Initializes a new instance of the <see cref='System.Web.Services.Protocols.SoapHttpClientProtocol'/> class. /// </para> /// </devdoc> public SoapHttpClientProtocol() : base() { Type type = this.GetType(); clientType = (SoapClientType)GetFromCache(type); if (clientType == null) { lock (InternalSyncObject) { clientType = (SoapClientType)GetFromCache(type); if (clientType == null) { clientType = new SoapClientType(type); AddToCache(type, clientType); } } } }