//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

[assembly: System.Runtime.Serialization.ContractNamespaceAttribute("http://tempuri.org/", ClrNamespace="tempuri.org")]

namespace tempuri.org
{
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
    [System.Runtime.Serialization.DataContractAttribute(Name="CustomerTables", Namespace="http://tempuri.org/")]
    public partial class CustomerTables : object
    {
        
        private string TableNameField;
        
        private tempuri.org.CustomerColumns[] ColumnsField;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
        public string TableName
        {
            get
            {
                return this.TableNameField;
            }
            set
            {
                this.TableNameField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
        public tempuri.org.CustomerColumns[] Columns
        {
            get
            {
                return this.ColumnsField;
            }
            set
            {
                this.ColumnsField = value;
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
    [System.Runtime.Serialization.DataContractAttribute(Name="CustomerColumns", Namespace="http://tempuri.org/")]
    public partial class CustomerColumns : object
    {
        
        private string FieldNameField;
        
        private string FieldTypeField;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
        public string FieldName
        {
            get
            {
                return this.FieldNameField;
            }
            set
            {
                this.FieldNameField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
        public string FieldType
        {
            get
            {
                return this.FieldTypeField;
            }
            set
            {
                this.FieldTypeField = value;
            }
        }
    }
}


[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="GetDataBaseSoap")]
public interface GetDataBaseSoap
{
    
    [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/DataBase", ReplyAction="*")]
    System.Threading.Tasks.Task<DataBaseResponse> DataBaseAsync(DataBaseRequest request);
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class DataBaseRequest
{
    
    [System.ServiceModel.MessageBodyMemberAttribute(Name="DataBase", Namespace="http://tempuri.org/", Order=0)]
    public DataBaseRequestBody Body;
    
    public DataBaseRequest()
    {
    }
    
    public DataBaseRequest(DataBaseRequestBody Body)
    {
        this.Body = Body;
    }
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
public partial class DataBaseRequestBody
{
    
    [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
    public string appid;
    
    [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
    public string appkey;
    
    public DataBaseRequestBody()
    {
    }
    
    public DataBaseRequestBody(string appid, string appkey)
    {
        this.appid = appid;
        this.appkey = appkey;
    }
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class DataBaseResponse
{
    
    [System.ServiceModel.MessageBodyMemberAttribute(Name="DataBaseResponse", Namespace="http://tempuri.org/", Order=0)]
    public DataBaseResponseBody Body;
    
    public DataBaseResponse()
    {
    }
    
    public DataBaseResponse(DataBaseResponseBody Body)
    {
        this.Body = Body;
    }
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
public partial class DataBaseResponseBody
{
    
    [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
    public tempuri.org.CustomerTables[] DataBaseResult;
    
    public DataBaseResponseBody()
    {
    }
    
    public DataBaseResponseBody(tempuri.org.CustomerTables[] DataBaseResult)
    {
        this.DataBaseResult = DataBaseResult;
    }
}

[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
public interface GetDataBaseSoapChannel : GetDataBaseSoap, System.ServiceModel.IClientChannel
{
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.4")]
public partial class GetDataBaseSoapClient : System.ServiceModel.ClientBase<GetDataBaseSoap>, GetDataBaseSoap
{
    
    /// <summary>
    /// Implement this partial method to configure the service endpoint.
    /// </summary>
    /// <param name="serviceEndpoint">The endpoint to configure</param>
    /// <param name="clientCredentials">The client credentials</param>
    static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
    
    public GetDataBaseSoapClient(EndpointConfiguration endpointConfiguration) : 
            base(GetDataBaseSoapClient.GetBindingForEndpoint(endpointConfiguration), GetDataBaseSoapClient.GetEndpointAddress(endpointConfiguration))
    {
        this.Endpoint.Name = endpointConfiguration.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }
    
    public GetDataBaseSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : 
            base(GetDataBaseSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
    {
        this.Endpoint.Name = endpointConfiguration.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }
    
    public GetDataBaseSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : 
            base(GetDataBaseSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
    {
        this.Endpoint.Name = endpointConfiguration.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }
    
    public GetDataBaseSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
            base(binding, remoteAddress)
    {
    }
    
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    System.Threading.Tasks.Task<DataBaseResponse> GetDataBaseSoap.DataBaseAsync(DataBaseRequest request)
    {
        return base.Channel.DataBaseAsync(request);
    }
    
    public System.Threading.Tasks.Task<DataBaseResponse> DataBaseAsync(string appid, string appkey)
    {
        DataBaseRequest inValue = new DataBaseRequest();
        inValue.Body = new DataBaseRequestBody();
        inValue.Body.appid = appid;
        inValue.Body.appkey = appkey;
        return ((GetDataBaseSoap)(this)).DataBaseAsync(inValue);
    }
    
    public virtual System.Threading.Tasks.Task OpenAsync()
    {
        return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
    }
    
    public virtual System.Threading.Tasks.Task CloseAsync()
    {
        return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
    }
    
    private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
    {
        if ((endpointConfiguration == EndpointConfiguration.GetDataBaseSoap))
        {
            System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
            result.MaxBufferSize = int.MaxValue;
            result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
            result.MaxReceivedMessageSize = int.MaxValue;
            result.AllowCookies = true;
            return result;
        }
        if ((endpointConfiguration == EndpointConfiguration.GetDataBaseSoap12))
        {
            System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
            System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
            textBindingElement.MessageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(System.ServiceModel.EnvelopeVersion.Soap12, System.ServiceModel.Channels.AddressingVersion.None);
            result.Elements.Add(textBindingElement);
            System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
            httpBindingElement.AllowCookies = true;
            httpBindingElement.MaxBufferSize = int.MaxValue;
            httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
            result.Elements.Add(httpBindingElement);
            return result;
        }
        throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
    }
    
    private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
    {
        if ((endpointConfiguration == EndpointConfiguration.GetDataBaseSoap))
        {
            return new System.ServiceModel.EndpointAddress("http://public.yunmuit.com/Areas/Api/WebService/GetDataBase.asmx");
        }
        if ((endpointConfiguration == EndpointConfiguration.GetDataBaseSoap12))
        {
            return new System.ServiceModel.EndpointAddress("http://public.yunmuit.com/Areas/Api/WebService/GetDataBase.asmx");
        }
        throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
    }
    
    public enum EndpointConfiguration
    {
        
        GetDataBaseSoap,
        
        GetDataBaseSoap12,
    }
}
