//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.239
//
//     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.60310.0
// 
namespace InvExplorer.ServiceReference1 {
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Asset", Namespace="http://schemas.datacontract.org/2004/07/InvExplorer.Web")]
    public partial class Asset : object, System.ComponentModel.INotifyPropertyChanged {
        
        private InvExplorer.ServiceReference1.AssetType AssetTypeField;
        
        private double ChangeField;
        
        private double LastPriceField;
        
        private string NameField;
        
        private string SymbolField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public InvExplorer.ServiceReference1.AssetType AssetType {
            get {
                return this.AssetTypeField;
            }
            set {
                if ((this.AssetTypeField.Equals(value) != true)) {
                    this.AssetTypeField = value;
                    this.RaisePropertyChanged("AssetType");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public double Change {
            get {
                return this.ChangeField;
            }
            set {
                if ((this.ChangeField.Equals(value) != true)) {
                    this.ChangeField = value;
                    this.RaisePropertyChanged("Change");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public double LastPrice {
            get {
                return this.LastPriceField;
            }
            set {
                if ((this.LastPriceField.Equals(value) != true)) {
                    this.LastPriceField = value;
                    this.RaisePropertyChanged("LastPrice");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Name {
            get {
                return this.NameField;
            }
            set {
                if ((object.ReferenceEquals(this.NameField, value) != true)) {
                    this.NameField = value;
                    this.RaisePropertyChanged("Name");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Symbol {
            get {
                return this.SymbolField;
            }
            set {
                if ((object.ReferenceEquals(this.SymbolField, value) != true)) {
                    this.SymbolField = value;
                    this.RaisePropertyChanged("Symbol");
                }
            }
        }
        
        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.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="AssetType", Namespace="http://schemas.datacontract.org/2004/07/InvExplorer.Web")]
    public enum AssetType : int {
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        Stock = 0,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        Fund = 1,
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="SymbolName", Namespace="http://schemas.datacontract.org/2004/07/InvExplorer.Web")]
    public partial class SymbolName : object, System.ComponentModel.INotifyPropertyChanged {
        
        private string NameField;
        
        private string SymbolField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Name {
            get {
                return this.NameField;
            }
            set {
                if ((object.ReferenceEquals(this.NameField, value) != true)) {
                    this.NameField = value;
                    this.RaisePropertyChanged("Name");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Symbol {
            get {
                return this.SymbolField;
            }
            set {
                if ((object.ReferenceEquals(this.SymbolField, value) != true)) {
                    this.SymbolField = value;
                    this.RaisePropertyChanged("Symbol");
                }
            }
        }
        
        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.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="AssetPrice", Namespace="http://schemas.datacontract.org/2004/07/InvExplorer.Web")]
    public partial class AssetPrice : object, System.ComponentModel.INotifyPropertyChanged {
        
        private System.DateTime DateField;
        
        private double PriceField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.DateTime Date {
            get {
                return this.DateField;
            }
            set {
                if ((this.DateField.Equals(value) != true)) {
                    this.DateField = value;
                    this.RaisePropertyChanged("Date");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public double Price {
            get {
                return this.PriceField;
            }
            set {
                if ((this.PriceField.Equals(value) != true)) {
                    this.PriceField = value;
                    this.RaisePropertyChanged("Price");
                }
            }
        }
        
        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="ServiceReference1.Service1")]
    public interface Service1 {
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:Service1/GetAsset", ReplyAction="urn:Service1/GetAssetResponse")]
        System.IAsyncResult BeginGetAsset(string symbol, System.AsyncCallback callback, object asyncState);
        
        InvExplorer.ServiceReference1.Asset EndGetAsset(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:Service1/GetAssetSymbolNames", ReplyAction="urn:Service1/GetAssetSymbolNamesResponse")]
        System.IAsyncResult BeginGetAssetSymbolNames(int start, int count, System.AsyncCallback callback, object asyncState);
        
        System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.SymbolName> EndGetAssetSymbolNames(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:Service1/GetAssetPrices", ReplyAction="urn:Service1/GetAssetPricesResponse")]
        System.IAsyncResult BeginGetAssetPrices(string symbol, System.AsyncCallback callback, object asyncState);
        
        System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.AssetPrice> EndGetAssetPrices(System.IAsyncResult result);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface Service1Channel : InvExplorer.ServiceReference1.Service1, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetAssetCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetAssetCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public InvExplorer.ServiceReference1.Asset Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((InvExplorer.ServiceReference1.Asset)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetAssetSymbolNamesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetAssetSymbolNamesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.SymbolName> Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.SymbolName>)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetAssetPricesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetAssetPricesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.AssetPrice> Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.AssetPrice>)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class Service1Client : System.ServiceModel.ClientBase<InvExplorer.ServiceReference1.Service1>, InvExplorer.ServiceReference1.Service1 {
        
        private BeginOperationDelegate onBeginGetAssetDelegate;
        
        private EndOperationDelegate onEndGetAssetDelegate;
        
        private System.Threading.SendOrPostCallback onGetAssetCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetAssetSymbolNamesDelegate;
        
        private EndOperationDelegate onEndGetAssetSymbolNamesDelegate;
        
        private System.Threading.SendOrPostCallback onGetAssetSymbolNamesCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetAssetPricesDelegate;
        
        private EndOperationDelegate onEndGetAssetPricesDelegate;
        
        private System.Threading.SendOrPostCallback onGetAssetPricesCompletedDelegate;
        
        private BeginOperationDelegate onBeginOpenDelegate;
        
        private EndOperationDelegate onEndOpenDelegate;
        
        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
        
        private BeginOperationDelegate onBeginCloseDelegate;
        
        private EndOperationDelegate onEndCloseDelegate;
        
        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
        
        public Service1Client() {
        }
        
        public Service1Client(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public Service1Client(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public Service1Client(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public Service1Client(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<GetAssetCompletedEventArgs> GetAssetCompleted;
        
        public event System.EventHandler<GetAssetSymbolNamesCompletedEventArgs> GetAssetSymbolNamesCompleted;
        
        public event System.EventHandler<GetAssetPricesCompletedEventArgs> GetAssetPricesCompleted;
        
        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 InvExplorer.ServiceReference1.Service1.BeginGetAsset(string symbol, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetAsset(symbol, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        InvExplorer.ServiceReference1.Asset InvExplorer.ServiceReference1.Service1.EndGetAsset(System.IAsyncResult result) {
            return base.Channel.EndGetAsset(result);
        }
        
        private System.IAsyncResult OnBeginGetAsset(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string symbol = ((string)(inValues[0]));
            return ((InvExplorer.ServiceReference1.Service1)(this)).BeginGetAsset(symbol, callback, asyncState);
        }
        
        private object[] OnEndGetAsset(System.IAsyncResult result) {
            InvExplorer.ServiceReference1.Asset retVal = ((InvExplorer.ServiceReference1.Service1)(this)).EndGetAsset(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetAssetCompleted(object state) {
            if ((this.GetAssetCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetAssetCompleted(this, new GetAssetCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetAssetAsync(string symbol) {
            this.GetAssetAsync(symbol, null);
        }
        
        public void GetAssetAsync(string symbol, object userState) {
            if ((this.onBeginGetAssetDelegate == null)) {
                this.onBeginGetAssetDelegate = new BeginOperationDelegate(this.OnBeginGetAsset);
            }
            if ((this.onEndGetAssetDelegate == null)) {
                this.onEndGetAssetDelegate = new EndOperationDelegate(this.OnEndGetAsset);
            }
            if ((this.onGetAssetCompletedDelegate == null)) {
                this.onGetAssetCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetAssetCompleted);
            }
            base.InvokeAsync(this.onBeginGetAssetDelegate, new object[] {
                        symbol}, this.onEndGetAssetDelegate, this.onGetAssetCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult InvExplorer.ServiceReference1.Service1.BeginGetAssetSymbolNames(int start, int count, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetAssetSymbolNames(start, count, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.SymbolName> InvExplorer.ServiceReference1.Service1.EndGetAssetSymbolNames(System.IAsyncResult result) {
            return base.Channel.EndGetAssetSymbolNames(result);
        }
        
        private System.IAsyncResult OnBeginGetAssetSymbolNames(object[] inValues, System.AsyncCallback callback, object asyncState) {
            int start = ((int)(inValues[0]));
            int count = ((int)(inValues[1]));
            return ((InvExplorer.ServiceReference1.Service1)(this)).BeginGetAssetSymbolNames(start, count, callback, asyncState);
        }
        
        private object[] OnEndGetAssetSymbolNames(System.IAsyncResult result) {
            System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.SymbolName> retVal = ((InvExplorer.ServiceReference1.Service1)(this)).EndGetAssetSymbolNames(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetAssetSymbolNamesCompleted(object state) {
            if ((this.GetAssetSymbolNamesCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetAssetSymbolNamesCompleted(this, new GetAssetSymbolNamesCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetAssetSymbolNamesAsync(int start, int count) {
            this.GetAssetSymbolNamesAsync(start, count, null);
        }
        
        public void GetAssetSymbolNamesAsync(int start, int count, object userState) {
            if ((this.onBeginGetAssetSymbolNamesDelegate == null)) {
                this.onBeginGetAssetSymbolNamesDelegate = new BeginOperationDelegate(this.OnBeginGetAssetSymbolNames);
            }
            if ((this.onEndGetAssetSymbolNamesDelegate == null)) {
                this.onEndGetAssetSymbolNamesDelegate = new EndOperationDelegate(this.OnEndGetAssetSymbolNames);
            }
            if ((this.onGetAssetSymbolNamesCompletedDelegate == null)) {
                this.onGetAssetSymbolNamesCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetAssetSymbolNamesCompleted);
            }
            base.InvokeAsync(this.onBeginGetAssetSymbolNamesDelegate, new object[] {
                        start,
                        count}, this.onEndGetAssetSymbolNamesDelegate, this.onGetAssetSymbolNamesCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult InvExplorer.ServiceReference1.Service1.BeginGetAssetPrices(string symbol, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetAssetPrices(symbol, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.AssetPrice> InvExplorer.ServiceReference1.Service1.EndGetAssetPrices(System.IAsyncResult result) {
            return base.Channel.EndGetAssetPrices(result);
        }
        
        private System.IAsyncResult OnBeginGetAssetPrices(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string symbol = ((string)(inValues[0]));
            return ((InvExplorer.ServiceReference1.Service1)(this)).BeginGetAssetPrices(symbol, callback, asyncState);
        }
        
        private object[] OnEndGetAssetPrices(System.IAsyncResult result) {
            System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.AssetPrice> retVal = ((InvExplorer.ServiceReference1.Service1)(this)).EndGetAssetPrices(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetAssetPricesCompleted(object state) {
            if ((this.GetAssetPricesCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetAssetPricesCompleted(this, new GetAssetPricesCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetAssetPricesAsync(string symbol) {
            this.GetAssetPricesAsync(symbol, null);
        }
        
        public void GetAssetPricesAsync(string symbol, object userState) {
            if ((this.onBeginGetAssetPricesDelegate == null)) {
                this.onBeginGetAssetPricesDelegate = new BeginOperationDelegate(this.OnBeginGetAssetPrices);
            }
            if ((this.onEndGetAssetPricesDelegate == null)) {
                this.onEndGetAssetPricesDelegate = new EndOperationDelegate(this.OnEndGetAssetPrices);
            }
            if ((this.onGetAssetPricesCompletedDelegate == null)) {
                this.onGetAssetPricesCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetAssetPricesCompleted);
            }
            base.InvokeAsync(this.onBeginGetAssetPricesDelegate, new object[] {
                        symbol}, this.onEndGetAssetPricesDelegate, this.onGetAssetPricesCompletedDelegate, 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 InvExplorer.ServiceReference1.Service1 CreateChannel() {
            return new Service1ClientChannel(this);
        }
        
        private class Service1ClientChannel : ChannelBase<InvExplorer.ServiceReference1.Service1>, InvExplorer.ServiceReference1.Service1 {
            
            public Service1ClientChannel(System.ServiceModel.ClientBase<InvExplorer.ServiceReference1.Service1> client) : 
                    base(client) {
            }
            
            public System.IAsyncResult BeginGetAsset(string symbol, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = symbol;
                System.IAsyncResult _result = base.BeginInvoke("GetAsset", _args, callback, asyncState);
                return _result;
            }
            
            public InvExplorer.ServiceReference1.Asset EndGetAsset(System.IAsyncResult result) {
                object[] _args = new object[0];
                InvExplorer.ServiceReference1.Asset _result = ((InvExplorer.ServiceReference1.Asset)(base.EndInvoke("GetAsset", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetAssetSymbolNames(int start, int count, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[2];
                _args[0] = start;
                _args[1] = count;
                System.IAsyncResult _result = base.BeginInvoke("GetAssetSymbolNames", _args, callback, asyncState);
                return _result;
            }
            
            public System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.SymbolName> EndGetAssetSymbolNames(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.SymbolName> _result = ((System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.SymbolName>)(base.EndInvoke("GetAssetSymbolNames", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetAssetPrices(string symbol, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = symbol;
                System.IAsyncResult _result = base.BeginInvoke("GetAssetPrices", _args, callback, asyncState);
                return _result;
            }
            
            public System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.AssetPrice> EndGetAssetPrices(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.AssetPrice> _result = ((System.Collections.ObjectModel.ObservableCollection<InvExplorer.ServiceReference1.AssetPrice>)(base.EndInvoke("GetAssetPrices", _args, result)));
                return _result;
            }
        }
    }
}
