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

// 
// This code was auto-generated by Microsoft.Silverlight.ServiceReference, version 4.0.50222.0
// 
namespace DataBinding.DataService {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="DataService.DataServiceSoap")]
    public interface DataServiceSoap {
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/GetData", ReplyAction="*")]
        System.IAsyncResult BeginGetData(DataBinding.DataService.GetDataRequest request, System.AsyncCallback callback, object asyncState);
        
        DataBinding.DataService.GetDataResponse EndGetData(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/UpdateData", ReplyAction="*")]
        System.IAsyncResult BeginUpdateData(DataBinding.DataService.UpdateDataRequest request, System.AsyncCallback callback, object asyncState);
        
        DataBinding.DataService.UpdateDataResponse EndUpdateData(System.IAsyncResult result);
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class GetDataRequest {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="GetData", Namespace="http://tempuri.org/", Order=0)]
        public DataBinding.DataService.GetDataRequestBody Body;
        
        public GetDataRequest() {
        }
        
        public GetDataRequest(DataBinding.DataService.GetDataRequestBody Body) {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
    public partial class GetDataRequestBody {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public string tables;
        
        public GetDataRequestBody() {
        }
        
        public GetDataRequestBody(string tables) {
            this.tables = tables;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class GetDataResponse {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="GetDataResponse", Namespace="http://tempuri.org/", Order=0)]
        public DataBinding.DataService.GetDataResponseBody Body;
        
        public GetDataResponse() {
        }
        
        public GetDataResponse(DataBinding.DataService.GetDataResponseBody Body) {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
    public partial class GetDataResponseBody {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public byte[] GetDataResult;
        
        public GetDataResponseBody() {
        }
        
        public GetDataResponseBody(byte[] GetDataResult) {
            this.GetDataResult = GetDataResult;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class UpdateDataRequest {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="UpdateData", Namespace="http://tempuri.org/", Order=0)]
        public DataBinding.DataService.UpdateDataRequestBody Body;
        
        public UpdateDataRequest() {
        }
        
        public UpdateDataRequest(DataBinding.DataService.UpdateDataRequestBody Body) {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
    public partial class UpdateDataRequestBody {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public byte[] dtAdded;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
        public byte[] dtModified;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=2)]
        public byte[] dtDeleted;
        
        public UpdateDataRequestBody() {
        }
        
        public UpdateDataRequestBody(byte[] dtAdded, byte[] dtModified, byte[] dtDeleted) {
            this.dtAdded = dtAdded;
            this.dtModified = dtModified;
            this.dtDeleted = dtDeleted;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class UpdateDataResponse {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="UpdateDataResponse", Namespace="http://tempuri.org/", Order=0)]
        public DataBinding.DataService.UpdateDataResponseBody Body;
        
        public UpdateDataResponse() {
        }
        
        public UpdateDataResponse(DataBinding.DataService.UpdateDataResponseBody Body) {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
    public partial class UpdateDataResponseBody {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public string UpdateDataResult;
        
        public UpdateDataResponseBody() {
        }
        
        public UpdateDataResponseBody(string UpdateDataResult) {
            this.UpdateDataResult = UpdateDataResult;
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface DataServiceSoapChannel : DataBinding.DataService.DataServiceSoap, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetDataCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public byte[] Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((byte[])(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class UpdateDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public UpdateDataCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public string Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class DataServiceSoapClient : System.ServiceModel.ClientBase<DataBinding.DataService.DataServiceSoap>, DataBinding.DataService.DataServiceSoap {
        
        private BeginOperationDelegate onBeginGetDataDelegate;
        
        private EndOperationDelegate onEndGetDataDelegate;
        
        private System.Threading.SendOrPostCallback onGetDataCompletedDelegate;
        
        private BeginOperationDelegate onBeginUpdateDataDelegate;
        
        private EndOperationDelegate onEndUpdateDataDelegate;
        
        private System.Threading.SendOrPostCallback onUpdateDataCompletedDelegate;
        
        private BeginOperationDelegate onBeginOpenDelegate;
        
        private EndOperationDelegate onEndOpenDelegate;
        
        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
        
        private BeginOperationDelegate onBeginCloseDelegate;
        
        private EndOperationDelegate onEndCloseDelegate;
        
        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
        
        public DataServiceSoapClient() {
        }
        
        public DataServiceSoapClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public DataServiceSoapClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public DataServiceSoapClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public DataServiceSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public System.Net.CookieContainer CookieContainer {
            get {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    return httpCookieContainerManager.CookieContainer;
                }
                else {
                    return null;
                }
            }
            set {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    httpCookieContainerManager.CookieContainer = value;
                }
                else {
                    throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" +
                            "ookieContainerBindingElement.");
                }
            }
        }
        
        public event System.EventHandler<GetDataCompletedEventArgs> GetDataCompleted;
        
        public event System.EventHandler<UpdateDataCompletedEventArgs> UpdateDataCompleted;
        
        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;
        
        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult DataBinding.DataService.DataServiceSoap.BeginGetData(DataBinding.DataService.GetDataRequest request, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetData(request, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private System.IAsyncResult BeginGetData(string tables, System.AsyncCallback callback, object asyncState) {
            DataBinding.DataService.GetDataRequest inValue = new DataBinding.DataService.GetDataRequest();
            inValue.Body = new DataBinding.DataService.GetDataRequestBody();
            inValue.Body.tables = tables;
            return ((DataBinding.DataService.DataServiceSoap)(this)).BeginGetData(inValue, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        DataBinding.DataService.GetDataResponse DataBinding.DataService.DataServiceSoap.EndGetData(System.IAsyncResult result) {
            return base.Channel.EndGetData(result);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private byte[] EndGetData(System.IAsyncResult result) {
            DataBinding.DataService.GetDataResponse retVal = ((DataBinding.DataService.DataServiceSoap)(this)).EndGetData(result);
            return retVal.Body.GetDataResult;
        }
        
        private System.IAsyncResult OnBeginGetData(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string tables = ((string)(inValues[0]));
            return this.BeginGetData(tables, callback, asyncState);
        }
        
        private object[] OnEndGetData(System.IAsyncResult result) {
            byte[] retVal = this.EndGetData(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetDataCompleted(object state) {
            if ((this.GetDataCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetDataCompleted(this, new GetDataCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetDataAsync(string tables) {
            this.GetDataAsync(tables, null);
        }
        
        public void GetDataAsync(string tables, object userState) {
            if ((this.onBeginGetDataDelegate == null)) {
                this.onBeginGetDataDelegate = new BeginOperationDelegate(this.OnBeginGetData);
            }
            if ((this.onEndGetDataDelegate == null)) {
                this.onEndGetDataDelegate = new EndOperationDelegate(this.OnEndGetData);
            }
            if ((this.onGetDataCompletedDelegate == null)) {
                this.onGetDataCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetDataCompleted);
            }
            base.InvokeAsync(this.onBeginGetDataDelegate, new object[] {
                        tables}, this.onEndGetDataDelegate, this.onGetDataCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult DataBinding.DataService.DataServiceSoap.BeginUpdateData(DataBinding.DataService.UpdateDataRequest request, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginUpdateData(request, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private System.IAsyncResult BeginUpdateData(byte[] dtAdded, byte[] dtModified, byte[] dtDeleted, System.AsyncCallback callback, object asyncState) {
            DataBinding.DataService.UpdateDataRequest inValue = new DataBinding.DataService.UpdateDataRequest();
            inValue.Body = new DataBinding.DataService.UpdateDataRequestBody();
            inValue.Body.dtAdded = dtAdded;
            inValue.Body.dtModified = dtModified;
            inValue.Body.dtDeleted = dtDeleted;
            return ((DataBinding.DataService.DataServiceSoap)(this)).BeginUpdateData(inValue, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        DataBinding.DataService.UpdateDataResponse DataBinding.DataService.DataServiceSoap.EndUpdateData(System.IAsyncResult result) {
            return base.Channel.EndUpdateData(result);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private string EndUpdateData(System.IAsyncResult result) {
            DataBinding.DataService.UpdateDataResponse retVal = ((DataBinding.DataService.DataServiceSoap)(this)).EndUpdateData(result);
            return retVal.Body.UpdateDataResult;
        }
        
        private System.IAsyncResult OnBeginUpdateData(object[] inValues, System.AsyncCallback callback, object asyncState) {
            byte[] dtAdded = ((byte[])(inValues[0]));
            byte[] dtModified = ((byte[])(inValues[1]));
            byte[] dtDeleted = ((byte[])(inValues[2]));
            return this.BeginUpdateData(dtAdded, dtModified, dtDeleted, callback, asyncState);
        }
        
        private object[] OnEndUpdateData(System.IAsyncResult result) {
            string retVal = this.EndUpdateData(result);
            return new object[] {
                    retVal};
        }
        
        private void OnUpdateDataCompleted(object state) {
            if ((this.UpdateDataCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.UpdateDataCompleted(this, new UpdateDataCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void UpdateDataAsync(byte[] dtAdded, byte[] dtModified, byte[] dtDeleted) {
            this.UpdateDataAsync(dtAdded, dtModified, dtDeleted, null);
        }
        
        public void UpdateDataAsync(byte[] dtAdded, byte[] dtModified, byte[] dtDeleted, object userState) {
            if ((this.onBeginUpdateDataDelegate == null)) {
                this.onBeginUpdateDataDelegate = new BeginOperationDelegate(this.OnBeginUpdateData);
            }
            if ((this.onEndUpdateDataDelegate == null)) {
                this.onEndUpdateDataDelegate = new EndOperationDelegate(this.OnEndUpdateData);
            }
            if ((this.onUpdateDataCompletedDelegate == null)) {
                this.onUpdateDataCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnUpdateDataCompleted);
            }
            base.InvokeAsync(this.onBeginUpdateDataDelegate, new object[] {
                        dtAdded,
                        dtModified,
                        dtDeleted}, this.onEndUpdateDataDelegate, this.onUpdateDataCompletedDelegate, userState);
        }
        
        private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState);
        }
        
        private object[] OnEndOpen(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result);
            return null;
        }
        
        private void OnOpenCompleted(object state) {
            if ((this.OpenCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void OpenAsync() {
            this.OpenAsync(null);
        }
        
        public void OpenAsync(object userState) {
            if ((this.onBeginOpenDelegate == null)) {
                this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen);
            }
            if ((this.onEndOpenDelegate == null)) {
                this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen);
            }
            if ((this.onOpenCompletedDelegate == null)) {
                this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted);
            }
            base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState);
        }
        
        private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState);
        }
        
        private object[] OnEndClose(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result);
            return null;
        }
        
        private void OnCloseCompleted(object state) {
            if ((this.CloseCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void CloseAsync() {
            this.CloseAsync(null);
        }
        
        public void CloseAsync(object userState) {
            if ((this.onBeginCloseDelegate == null)) {
                this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose);
            }
            if ((this.onEndCloseDelegate == null)) {
                this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose);
            }
            if ((this.onCloseCompletedDelegate == null)) {
                this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted);
            }
            base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState);
        }
        
        protected override DataBinding.DataService.DataServiceSoap CreateChannel() {
            return new DataServiceSoapClientChannel(this);
        }
        
        private class DataServiceSoapClientChannel : ChannelBase<DataBinding.DataService.DataServiceSoap>, DataBinding.DataService.DataServiceSoap {
            
            public DataServiceSoapClientChannel(System.ServiceModel.ClientBase<DataBinding.DataService.DataServiceSoap> client) : 
                    base(client) {
            }
            
            public System.IAsyncResult BeginGetData(DataBinding.DataService.GetDataRequest request, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = request;
                System.IAsyncResult _result = base.BeginInvoke("GetData", _args, callback, asyncState);
                return _result;
            }
            
            public DataBinding.DataService.GetDataResponse EndGetData(System.IAsyncResult result) {
                object[] _args = new object[0];
                DataBinding.DataService.GetDataResponse _result = ((DataBinding.DataService.GetDataResponse)(base.EndInvoke("GetData", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginUpdateData(DataBinding.DataService.UpdateDataRequest request, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = request;
                System.IAsyncResult _result = base.BeginInvoke("UpdateData", _args, callback, asyncState);
                return _result;
            }
            
            public DataBinding.DataService.UpdateDataResponse EndUpdateData(System.IAsyncResult result) {
                object[] _args = new object[0];
                DataBinding.DataService.UpdateDataResponse _result = ((DataBinding.DataService.UpdateDataResponse)(base.EndInvoke("UpdateData", _args, result)));
                return _result;
            }
        }
    }
}
