Esempio n. 1
0
        internal TypeStubInfo GetTypeStub(string protocolName)
        {
            lock (this)
            {
                switch (protocolName)
                {
                case "Soap":
                    if (soapProtocol == null)
                    {
                        soapProtocol = new SoapTypeStubInfo(this);
                        soapProtocol.Initialize();
                    }
                    return(soapProtocol);

                case "Soap12":
                    if (soap12Protocol == null)
                    {
                        soap12Protocol = new Soap12TypeStubInfo(this);
                        soap12Protocol.Initialize();
                    }
                    return(soap12Protocol);
                }
                throw new InvalidOperationException("Protocol " + protocolName + " not supported");
            }
        }
Esempio n. 2
0
        TypeStubInfo CreateTypeStubInfo(Type type)
        {
            TypeStubInfo tsi = (TypeStubInfo)Activator.CreateInstance(type, new object[] { this });

            tsi.Initialize();
            return(tsi);
        }
Esempio n. 3
0
        internal TypeStubInfo GetTypeStub(string protocolName)
        {
            lock (this)
            {
                switch (protocolName)
                {
                case "Soap":
                    if (soapProtocol == null)
                    {
                        soapProtocol = new SoapTypeStubInfo(this);
                        soapProtocol.Initialize();
                    }
                    return(soapProtocol);

                case "Soap12":
                    if (soap12Protocol == null)
                    {
                        soap12Protocol = new Soap12TypeStubInfo(this);
                        soap12Protocol.Initialize();
                    }
                    return(soap12Protocol);

#if !MOBILE && !XAMMAC_4_5
                case "HttpGet":
                    if (httpGetProtocol == null)
                    {
                        httpGetProtocol = new HttpGetTypeStubInfo(this);
                        httpGetProtocol.Initialize();
                    }
                    return(httpGetProtocol);

                case "HttpPost":
                    if (httpPostProtocol == null)
                    {
                        httpPostProtocol = new HttpPostTypeStubInfo(this);
                        httpPostProtocol.Initialize();
                    }
                    return(httpPostProtocol);
#endif
                }
                throw new InvalidOperationException("Protocol " + protocolName + " not supported");
            }
        }
		internal TypeStubInfo GetTypeStub (string protocolName)
		{
			lock (this)
			{
				switch (protocolName)
				{
				case "Soap": 
					if (soapProtocol == null){
						soapProtocol = new SoapTypeStubInfo (this);
						soapProtocol.Initialize ();
					}
					return soapProtocol;
					
				case "Soap12": 
					if (soap12Protocol == null){
						soap12Protocol = new Soap12TypeStubInfo (this);
						soap12Protocol.Initialize ();
					}
					return soap12Protocol;
				}
				throw new InvalidOperationException ("Protocol " + protocolName + " not supported");
			}
		}
Esempio n. 5
0
		internal TypeStubInfo GetTypeStub (string protocolName)
		{
			lock (this)
			{
				switch (protocolName)
				{
				case "Soap": 
					if (soapProtocol == null){
						soapProtocol = new SoapTypeStubInfo (this);
						soapProtocol.Initialize ();
					}
					return soapProtocol;
					
				case "Soap12": 
					if (soap12Protocol == null){
						soap12Protocol = new Soap12TypeStubInfo (this);
						soap12Protocol.Initialize ();
					}
					return soap12Protocol;
#if !MOBILE
				case "HttpGet":
					if (httpGetProtocol == null){
						httpGetProtocol = new HttpGetTypeStubInfo (this);
						httpGetProtocol.Initialize ();
					}
					return httpGetProtocol;
				case "HttpPost":
					if (httpPostProtocol == null){
						httpPostProtocol = new HttpPostTypeStubInfo (this);
						httpPostProtocol.Initialize ();
					}
					return httpPostProtocol;
#endif
				}
				throw new InvalidOperationException ("Protocol " + protocolName + " not supported");
			}
		}