//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.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.50401.0
// 
namespace SqlFilter.NorthwindDataServiceReference {
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Invoice", Namespace="http://schemas.datacontract.org/2004/07/SqlFilter.Web")]
    public partial class Invoice : object, System.ComponentModel.INotifyPropertyChanged {
        
        private string AddressField;
        
        private string CityField;
        
        private string CountryField;
        
        private string CustomerIDField;
        
        private string CustomerNameField;
        
        private float DiscountField;
        
        private System.Nullable<decimal> ExtendedPriceField;
        
        private System.Nullable<decimal> FreightField;
        
        private System.Nullable<System.DateTime> OrderDateField;
        
        private int OrderIDField;
        
        private string PostalCodeField;
        
        private int ProductIDField;
        
        private string ProductNameField;
        
        private short QuantityField;
        
        private string RegionField;
        
        private System.Nullable<System.DateTime> RequiredDateField;
        
        private string SalespersonField;
        
        private string ShipAddressField;
        
        private string ShipCityField;
        
        private string ShipCountryField;
        
        private string ShipNameField;
        
        private string ShipPostalCodeField;
        
        private string ShipRegionField;
        
        private System.Nullable<System.DateTime> ShippedDateField;
        
        private string ShipperNameField;
        
        private decimal UnitPriceField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Address {
            get {
                return this.AddressField;
            }
            set {
                if ((object.ReferenceEquals(this.AddressField, value) != true)) {
                    this.AddressField = value;
                    this.RaisePropertyChanged("Address");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string City {
            get {
                return this.CityField;
            }
            set {
                if ((object.ReferenceEquals(this.CityField, value) != true)) {
                    this.CityField = value;
                    this.RaisePropertyChanged("City");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Country {
            get {
                return this.CountryField;
            }
            set {
                if ((object.ReferenceEquals(this.CountryField, value) != true)) {
                    this.CountryField = value;
                    this.RaisePropertyChanged("Country");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string CustomerID {
            get {
                return this.CustomerIDField;
            }
            set {
                if ((object.ReferenceEquals(this.CustomerIDField, value) != true)) {
                    this.CustomerIDField = value;
                    this.RaisePropertyChanged("CustomerID");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string CustomerName {
            get {
                return this.CustomerNameField;
            }
            set {
                if ((object.ReferenceEquals(this.CustomerNameField, value) != true)) {
                    this.CustomerNameField = value;
                    this.RaisePropertyChanged("CustomerName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public float Discount {
            get {
                return this.DiscountField;
            }
            set {
                if ((this.DiscountField.Equals(value) != true)) {
                    this.DiscountField = value;
                    this.RaisePropertyChanged("Discount");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<decimal> ExtendedPrice {
            get {
                return this.ExtendedPriceField;
            }
            set {
                if ((this.ExtendedPriceField.Equals(value) != true)) {
                    this.ExtendedPriceField = value;
                    this.RaisePropertyChanged("ExtendedPrice");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<decimal> Freight {
            get {
                return this.FreightField;
            }
            set {
                if ((this.FreightField.Equals(value) != true)) {
                    this.FreightField = value;
                    this.RaisePropertyChanged("Freight");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<System.DateTime> OrderDate {
            get {
                return this.OrderDateField;
            }
            set {
                if ((this.OrderDateField.Equals(value) != true)) {
                    this.OrderDateField = value;
                    this.RaisePropertyChanged("OrderDate");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int OrderID {
            get {
                return this.OrderIDField;
            }
            set {
                if ((this.OrderIDField.Equals(value) != true)) {
                    this.OrderIDField = value;
                    this.RaisePropertyChanged("OrderID");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string PostalCode {
            get {
                return this.PostalCodeField;
            }
            set {
                if ((object.ReferenceEquals(this.PostalCodeField, value) != true)) {
                    this.PostalCodeField = value;
                    this.RaisePropertyChanged("PostalCode");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int ProductID {
            get {
                return this.ProductIDField;
            }
            set {
                if ((this.ProductIDField.Equals(value) != true)) {
                    this.ProductIDField = value;
                    this.RaisePropertyChanged("ProductID");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ProductName {
            get {
                return this.ProductNameField;
            }
            set {
                if ((object.ReferenceEquals(this.ProductNameField, value) != true)) {
                    this.ProductNameField = value;
                    this.RaisePropertyChanged("ProductName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public short Quantity {
            get {
                return this.QuantityField;
            }
            set {
                if ((this.QuantityField.Equals(value) != true)) {
                    this.QuantityField = value;
                    this.RaisePropertyChanged("Quantity");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Region {
            get {
                return this.RegionField;
            }
            set {
                if ((object.ReferenceEquals(this.RegionField, value) != true)) {
                    this.RegionField = value;
                    this.RaisePropertyChanged("Region");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<System.DateTime> RequiredDate {
            get {
                return this.RequiredDateField;
            }
            set {
                if ((this.RequiredDateField.Equals(value) != true)) {
                    this.RequiredDateField = value;
                    this.RaisePropertyChanged("RequiredDate");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Salesperson {
            get {
                return this.SalespersonField;
            }
            set {
                if ((object.ReferenceEquals(this.SalespersonField, value) != true)) {
                    this.SalespersonField = value;
                    this.RaisePropertyChanged("Salesperson");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipAddress {
            get {
                return this.ShipAddressField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipAddressField, value) != true)) {
                    this.ShipAddressField = value;
                    this.RaisePropertyChanged("ShipAddress");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipCity {
            get {
                return this.ShipCityField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipCityField, value) != true)) {
                    this.ShipCityField = value;
                    this.RaisePropertyChanged("ShipCity");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipCountry {
            get {
                return this.ShipCountryField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipCountryField, value) != true)) {
                    this.ShipCountryField = value;
                    this.RaisePropertyChanged("ShipCountry");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipName {
            get {
                return this.ShipNameField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipNameField, value) != true)) {
                    this.ShipNameField = value;
                    this.RaisePropertyChanged("ShipName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipPostalCode {
            get {
                return this.ShipPostalCodeField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipPostalCodeField, value) != true)) {
                    this.ShipPostalCodeField = value;
                    this.RaisePropertyChanged("ShipPostalCode");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipRegion {
            get {
                return this.ShipRegionField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipRegionField, value) != true)) {
                    this.ShipRegionField = value;
                    this.RaisePropertyChanged("ShipRegion");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<System.DateTime> ShippedDate {
            get {
                return this.ShippedDateField;
            }
            set {
                if ((this.ShippedDateField.Equals(value) != true)) {
                    this.ShippedDateField = value;
                    this.RaisePropertyChanged("ShippedDate");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipperName {
            get {
                return this.ShipperNameField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipperNameField, value) != true)) {
                    this.ShipperNameField = value;
                    this.RaisePropertyChanged("ShipperName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public decimal UnitPrice {
            get {
                return this.UnitPriceField;
            }
            set {
                if ((this.UnitPriceField.Equals(value) != true)) {
                    this.UnitPriceField = value;
                    this.RaisePropertyChanged("UnitPrice");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="", ConfigurationName="NorthwindDataServiceReference.NorthwindDataService")]
    public interface NorthwindDataService {
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:NorthwindDataService/GetInvoices", ReplyAction="urn:NorthwindDataService/GetInvoicesResponse")]
        System.IAsyncResult BeginGetInvoices(System.AsyncCallback callback, object asyncState);
        
        System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> EndGetInvoices(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:NorthwindDataService/GetCustomers", ReplyAction="urn:NorthwindDataService/GetCustomersResponse")]
        System.IAsyncResult BeginGetCustomers(System.AsyncCallback callback, object asyncState);
        
        System.Collections.ObjectModel.ObservableCollection<string> EndGetCustomers(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:NorthwindDataService/GetCustomerInvoices", ReplyAction="urn:NorthwindDataService/GetCustomerInvoicesResponse")]
        System.IAsyncResult BeginGetCustomerInvoices(System.Collections.ObjectModel.ObservableCollection<string> customers, System.AsyncCallback callback, object asyncState);
        
        System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> EndGetCustomerInvoices(System.IAsyncResult result);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface NorthwindDataServiceChannel : SqlFilter.NorthwindDataServiceReference.NorthwindDataService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetInvoicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetInvoicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice>)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetCustomersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetCustomersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public System.Collections.ObjectModel.ObservableCollection<string> Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((System.Collections.ObjectModel.ObservableCollection<string>)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetCustomerInvoicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetCustomerInvoicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice>)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class NorthwindDataServiceClient : System.ServiceModel.ClientBase<SqlFilter.NorthwindDataServiceReference.NorthwindDataService>, SqlFilter.NorthwindDataServiceReference.NorthwindDataService {
        
        private BeginOperationDelegate onBeginGetInvoicesDelegate;
        
        private EndOperationDelegate onEndGetInvoicesDelegate;
        
        private System.Threading.SendOrPostCallback onGetInvoicesCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetCustomersDelegate;
        
        private EndOperationDelegate onEndGetCustomersDelegate;
        
        private System.Threading.SendOrPostCallback onGetCustomersCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetCustomerInvoicesDelegate;
        
        private EndOperationDelegate onEndGetCustomerInvoicesDelegate;
        
        private System.Threading.SendOrPostCallback onGetCustomerInvoicesCompletedDelegate;
        
        private BeginOperationDelegate onBeginOpenDelegate;
        
        private EndOperationDelegate onEndOpenDelegate;
        
        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
        
        private BeginOperationDelegate onBeginCloseDelegate;
        
        private EndOperationDelegate onEndCloseDelegate;
        
        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
        
        public NorthwindDataServiceClient() {
        }
        
        public NorthwindDataServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public NorthwindDataServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public NorthwindDataServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public NorthwindDataServiceClient(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<GetInvoicesCompletedEventArgs> GetInvoicesCompleted;
        
        public event System.EventHandler<GetCustomersCompletedEventArgs> GetCustomersCompleted;
        
        public event System.EventHandler<GetCustomerInvoicesCompletedEventArgs> GetCustomerInvoicesCompleted;
        
        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 SqlFilter.NorthwindDataServiceReference.NorthwindDataService.BeginGetInvoices(System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetInvoices(callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> SqlFilter.NorthwindDataServiceReference.NorthwindDataService.EndGetInvoices(System.IAsyncResult result) {
            return base.Channel.EndGetInvoices(result);
        }
        
        private System.IAsyncResult OnBeginGetInvoices(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((SqlFilter.NorthwindDataServiceReference.NorthwindDataService)(this)).BeginGetInvoices(callback, asyncState);
        }
        
        private object[] OnEndGetInvoices(System.IAsyncResult result) {
            System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> retVal = ((SqlFilter.NorthwindDataServiceReference.NorthwindDataService)(this)).EndGetInvoices(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetInvoicesCompleted(object state) {
            if ((this.GetInvoicesCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetInvoicesCompleted(this, new GetInvoicesCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetInvoicesAsync() {
            this.GetInvoicesAsync(null);
        }
        
        public void GetInvoicesAsync(object userState) {
            if ((this.onBeginGetInvoicesDelegate == null)) {
                this.onBeginGetInvoicesDelegate = new BeginOperationDelegate(this.OnBeginGetInvoices);
            }
            if ((this.onEndGetInvoicesDelegate == null)) {
                this.onEndGetInvoicesDelegate = new EndOperationDelegate(this.OnEndGetInvoices);
            }
            if ((this.onGetInvoicesCompletedDelegate == null)) {
                this.onGetInvoicesCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetInvoicesCompleted);
            }
            base.InvokeAsync(this.onBeginGetInvoicesDelegate, null, this.onEndGetInvoicesDelegate, this.onGetInvoicesCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult SqlFilter.NorthwindDataServiceReference.NorthwindDataService.BeginGetCustomers(System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetCustomers(callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Collections.ObjectModel.ObservableCollection<string> SqlFilter.NorthwindDataServiceReference.NorthwindDataService.EndGetCustomers(System.IAsyncResult result) {
            return base.Channel.EndGetCustomers(result);
        }
        
        private System.IAsyncResult OnBeginGetCustomers(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((SqlFilter.NorthwindDataServiceReference.NorthwindDataService)(this)).BeginGetCustomers(callback, asyncState);
        }
        
        private object[] OnEndGetCustomers(System.IAsyncResult result) {
            System.Collections.ObjectModel.ObservableCollection<string> retVal = ((SqlFilter.NorthwindDataServiceReference.NorthwindDataService)(this)).EndGetCustomers(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetCustomersCompleted(object state) {
            if ((this.GetCustomersCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetCustomersCompleted(this, new GetCustomersCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetCustomersAsync() {
            this.GetCustomersAsync(null);
        }
        
        public void GetCustomersAsync(object userState) {
            if ((this.onBeginGetCustomersDelegate == null)) {
                this.onBeginGetCustomersDelegate = new BeginOperationDelegate(this.OnBeginGetCustomers);
            }
            if ((this.onEndGetCustomersDelegate == null)) {
                this.onEndGetCustomersDelegate = new EndOperationDelegate(this.OnEndGetCustomers);
            }
            if ((this.onGetCustomersCompletedDelegate == null)) {
                this.onGetCustomersCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetCustomersCompleted);
            }
            base.InvokeAsync(this.onBeginGetCustomersDelegate, null, this.onEndGetCustomersDelegate, this.onGetCustomersCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult SqlFilter.NorthwindDataServiceReference.NorthwindDataService.BeginGetCustomerInvoices(System.Collections.ObjectModel.ObservableCollection<string> customers, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetCustomerInvoices(customers, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> SqlFilter.NorthwindDataServiceReference.NorthwindDataService.EndGetCustomerInvoices(System.IAsyncResult result) {
            return base.Channel.EndGetCustomerInvoices(result);
        }
        
        private System.IAsyncResult OnBeginGetCustomerInvoices(object[] inValues, System.AsyncCallback callback, object asyncState) {
            System.Collections.ObjectModel.ObservableCollection<string> customers = ((System.Collections.ObjectModel.ObservableCollection<string>)(inValues[0]));
            return ((SqlFilter.NorthwindDataServiceReference.NorthwindDataService)(this)).BeginGetCustomerInvoices(customers, callback, asyncState);
        }
        
        private object[] OnEndGetCustomerInvoices(System.IAsyncResult result) {
            System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> retVal = ((SqlFilter.NorthwindDataServiceReference.NorthwindDataService)(this)).EndGetCustomerInvoices(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetCustomerInvoicesCompleted(object state) {
            if ((this.GetCustomerInvoicesCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetCustomerInvoicesCompleted(this, new GetCustomerInvoicesCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetCustomerInvoicesAsync(System.Collections.ObjectModel.ObservableCollection<string> customers) {
            this.GetCustomerInvoicesAsync(customers, null);
        }
        
        public void GetCustomerInvoicesAsync(System.Collections.ObjectModel.ObservableCollection<string> customers, object userState) {
            if ((this.onBeginGetCustomerInvoicesDelegate == null)) {
                this.onBeginGetCustomerInvoicesDelegate = new BeginOperationDelegate(this.OnBeginGetCustomerInvoices);
            }
            if ((this.onEndGetCustomerInvoicesDelegate == null)) {
                this.onEndGetCustomerInvoicesDelegate = new EndOperationDelegate(this.OnEndGetCustomerInvoices);
            }
            if ((this.onGetCustomerInvoicesCompletedDelegate == null)) {
                this.onGetCustomerInvoicesCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetCustomerInvoicesCompleted);
            }
            base.InvokeAsync(this.onBeginGetCustomerInvoicesDelegate, new object[] {
                        customers}, this.onEndGetCustomerInvoicesDelegate, this.onGetCustomerInvoicesCompletedDelegate, 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 SqlFilter.NorthwindDataServiceReference.NorthwindDataService CreateChannel() {
            return new NorthwindDataServiceClientChannel(this);
        }
        
        private class NorthwindDataServiceClientChannel : ChannelBase<SqlFilter.NorthwindDataServiceReference.NorthwindDataService>, SqlFilter.NorthwindDataServiceReference.NorthwindDataService {
            
            public NorthwindDataServiceClientChannel(System.ServiceModel.ClientBase<SqlFilter.NorthwindDataServiceReference.NorthwindDataService> client) : 
                    base(client) {
            }
            
            public System.IAsyncResult BeginGetInvoices(System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[0];
                System.IAsyncResult _result = base.BeginInvoke("GetInvoices", _args, callback, asyncState);
                return _result;
            }
            
            public System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> EndGetInvoices(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> _result = ((System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice>)(base.EndInvoke("GetInvoices", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetCustomers(System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[0];
                System.IAsyncResult _result = base.BeginInvoke("GetCustomers", _args, callback, asyncState);
                return _result;
            }
            
            public System.Collections.ObjectModel.ObservableCollection<string> EndGetCustomers(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.ObjectModel.ObservableCollection<string> _result = ((System.Collections.ObjectModel.ObservableCollection<string>)(base.EndInvoke("GetCustomers", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetCustomerInvoices(System.Collections.ObjectModel.ObservableCollection<string> customers, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = customers;
                System.IAsyncResult _result = base.BeginInvoke("GetCustomerInvoices", _args, callback, asyncState);
                return _result;
            }
            
            public System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> EndGetCustomerInvoices(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice> _result = ((System.Collections.ObjectModel.ObservableCollection<SqlFilter.NorthwindDataServiceReference.Invoice>)(base.EndInvoke("GetCustomerInvoices", _args, result)));
                return _result;
            }
        }
    }
}
