protected HttpSimpleClientProtocol()
 {
     Type type = base.GetType();
     this.clientType = (HttpClientType) WebClientProtocol.GetFromCache(type);
     if (this.clientType == null)
     {
         lock (WebClientProtocol.InternalSyncObject)
         {
             this.clientType = (HttpClientType) WebClientProtocol.GetFromCache(type);
             if (this.clientType == null)
             {
                 this.clientType = new HttpClientType(type);
                 WebClientProtocol.AddToCache(type, this.clientType);
             }
         }
     }
 }
Пример #2
0
        /// <include file='doc\HttpClientProtocol.uex' path='docs/doc[@for="HttpSimpleClientProtocol.HttpSimpleClientProtocol"]/*' />
        /// <devdoc>
        ///    <para>
        ///       Initializes a new instance of the <see cref='System.Web.Services.Protocols.HttpSimpleClientProtocol'/> class.
        ///    </para>
        /// </devdoc>
        protected HttpSimpleClientProtocol()
            : base()
        {
            Type type = this.GetType();

            clientType = (HttpClientType)GetFromCache(type);
            if (clientType == null)
            {
                lock (type){
                    clientType = (HttpClientType)GetFromCache(type);
                    if (clientType == null)
                    {
                        clientType = new HttpClientType(type);
                        AddToCache(type, clientType);
                    }
                }
            }
        }
Пример #3
0
        protected HttpSimpleClientProtocol()
        {
            Type type = base.GetType();

            this.clientType = (HttpClientType)WebClientProtocol.GetFromCache(type);
            if (this.clientType == null)
            {
                lock (WebClientProtocol.InternalSyncObject)
                {
                    this.clientType = (HttpClientType)WebClientProtocol.GetFromCache(type);
                    if (this.clientType == null)
                    {
                        this.clientType = new HttpClientType(type);
                        WebClientProtocol.AddToCache(type, this.clientType);
                    }
                }
            }
        }
 /// <include file='doc\HttpClientProtocol.uex' path='docs/doc[@for="HttpSimpleClientProtocol.HttpSimpleClientProtocol"]/*' />
 /// <devdoc>
 ///    <para>
 ///       Initializes a new instance of the <see cref='System.Web.Services.Protocols.HttpSimpleClientProtocol'/> class.
 ///    </para>
 /// </devdoc>
 protected HttpSimpleClientProtocol()
     : base() {
     Type type = this.GetType();
     clientType = (HttpClientType)GetFromCache(type);
     if (clientType == null) {
         lock (InternalSyncObject) {
             clientType = (HttpClientType)GetFromCache(type);
             if (clientType == null) {
                 clientType = new HttpClientType(type);
                 AddToCache(type, clientType);
             }
         }
     }
 }