//------------------------------------------------------------------------------
// <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 StockPortfolio.localhost {
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="CurrentStockInfo", Namespace="http://schemas.datacontract.org/2004/07/StockPortfolio_Web")]
    public partial class CurrentStockInfo : object, System.ComponentModel.INotifyPropertyChanged {
        
        private float _changeField;
        
        private float _changePercentField;
        
        private float _closeField;
        
        private System.DateTime _dateField;
        
        private float _highField;
        
        private float _lowField;
        
        private string _nameField;
        
        private float _openField;
        
        private float _peField;
        
        private string _symbolField;
        
        private bool _validField;
        
        private float _volumeField;
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public float _change {
            get {
                return this._changeField;
            }
            set {
                if ((this._changeField.Equals(value) != true)) {
                    this._changeField = value;
                    this.RaisePropertyChanged("_change");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public float _changePercent {
            get {
                return this._changePercentField;
            }
            set {
                if ((this._changePercentField.Equals(value) != true)) {
                    this._changePercentField = value;
                    this.RaisePropertyChanged("_changePercent");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public float _close {
            get {
                return this._closeField;
            }
            set {
                if ((this._closeField.Equals(value) != true)) {
                    this._closeField = value;
                    this.RaisePropertyChanged("_close");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        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(IsRequired=true)]
        public float _high {
            get {
                return this._highField;
            }
            set {
                if ((this._highField.Equals(value) != true)) {
                    this._highField = value;
                    this.RaisePropertyChanged("_high");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public float _low {
            get {
                return this._lowField;
            }
            set {
                if ((this._lowField.Equals(value) != true)) {
                    this._lowField = value;
                    this.RaisePropertyChanged("_low");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        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(IsRequired=true)]
        public float _open {
            get {
                return this._openField;
            }
            set {
                if ((this._openField.Equals(value) != true)) {
                    this._openField = value;
                    this.RaisePropertyChanged("_open");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public float _pe {
            get {
                return this._peField;
            }
            set {
                if ((this._peField.Equals(value) != true)) {
                    this._peField = value;
                    this.RaisePropertyChanged("_pe");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public string _symbol {
            get {
                return this._symbolField;
            }
            set {
                if ((object.ReferenceEquals(this._symbolField, value) != true)) {
                    this._symbolField = value;
                    this.RaisePropertyChanged("_symbol");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public bool _valid {
            get {
                return this._validField;
            }
            set {
                if ((this._validField.Equals(value) != true)) {
                    this._validField = value;
                    this.RaisePropertyChanged("_valid");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public float _volume {
            get {
                return this._volumeField;
            }
            set {
                if ((this._volumeField.Equals(value) != true)) {
                    this._volumeField = value;
                    this.RaisePropertyChanged("_volume");
                }
            }
        }
        
        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="HistoricalStockInfo", Namespace="http://schemas.datacontract.org/2004/07/StockPortfolio_Web")]
    public partial class HistoricalStockInfo : object, System.ComponentModel.INotifyPropertyChanged {
        
        private System.DateTime _firstDateField;
        
        private System.DateTime _lastDateField;
        
        private string _symbolField;
        
        private bool _validField;
        
        private float[] _valuesField;
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public System.DateTime _firstDate {
            get {
                return this._firstDateField;
            }
            set {
                if ((this._firstDateField.Equals(value) != true)) {
                    this._firstDateField = value;
                    this.RaisePropertyChanged("_firstDate");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public System.DateTime _lastDate {
            get {
                return this._lastDateField;
            }
            set {
                if ((this._lastDateField.Equals(value) != true)) {
                    this._lastDateField = value;
                    this.RaisePropertyChanged("_lastDate");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public string _symbol {
            get {
                return this._symbolField;
            }
            set {
                if ((object.ReferenceEquals(this._symbolField, value) != true)) {
                    this._symbolField = value;
                    this.RaisePropertyChanged("_symbol");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public bool _valid {
            get {
                return this._validField;
            }
            set {
                if ((this._validField.Equals(value) != true)) {
                    this._validField = value;
                    this.RaisePropertyChanged("_valid");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public float[] _values {
            get {
                return this._valuesField;
            }
            set {
                if ((object.ReferenceEquals(this._valuesField, value) != true)) {
                    this._valuesField = value;
                    this.RaisePropertyChanged("_values");
                }
            }
        }
        
        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="http://stockinfoservice.componentone.com/", ConfigurationName="localhost.StockInfoService")]
    public interface StockInfoService {
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://stockinfoservice.componentone.com/StockInfoService/GetCurrentStockInfo", ReplyAction="http://stockinfoservice.componentone.com/StockInfoService/GetCurrentStockInfoResp" +
            "onse")]
        System.IAsyncResult BeginGetCurrentStockInfo(string symbol, System.AsyncCallback callback, object asyncState);
        
        StockPortfolio.localhost.CurrentStockInfo EndGetCurrentStockInfo(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://stockinfoservice.componentone.com/StockInfoService/GetCurrentStockInfoArra" +
            "y", ReplyAction="http://stockinfoservice.componentone.com/StockInfoService/GetCurrentStockInfoArra" +
            "yResponse")]
        System.IAsyncResult BeginGetCurrentStockInfoArray(string[] symbols, System.AsyncCallback callback, object asyncState);
        
        StockPortfolio.localhost.CurrentStockInfo[] EndGetCurrentStockInfoArray(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://stockinfoservice.componentone.com/StockInfoService/GetHistoricalStockInfo", ReplyAction="http://stockinfoservice.componentone.com/StockInfoService/GetHistoricalStockInfoR" +
            "esponse")]
        System.IAsyncResult BeginGetHistoricalStockInfo(string symbol, System.AsyncCallback callback, object asyncState);
        
        StockPortfolio.localhost.HistoricalStockInfo EndGetHistoricalStockInfo(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://stockinfoservice.componentone.com/StockInfoService/GetHistoricalStockInfoA" +
            "rray", ReplyAction="http://stockinfoservice.componentone.com/StockInfoService/GetHistoricalStockInfoA" +
            "rrayResponse")]
        System.IAsyncResult BeginGetHistoricalStockInfoArray(string[] symbols, System.AsyncCallback callback, object asyncState);
        
        StockPortfolio.localhost.HistoricalStockInfo[] EndGetHistoricalStockInfoArray(System.IAsyncResult result);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface StockInfoServiceChannel : StockPortfolio.localhost.StockInfoService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetCurrentStockInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetCurrentStockInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public StockPortfolio.localhost.CurrentStockInfo Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((StockPortfolio.localhost.CurrentStockInfo)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetCurrentStockInfoArrayCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetCurrentStockInfoArrayCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public StockPortfolio.localhost.CurrentStockInfo[] Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((StockPortfolio.localhost.CurrentStockInfo[])(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetHistoricalStockInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetHistoricalStockInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public StockPortfolio.localhost.HistoricalStockInfo Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((StockPortfolio.localhost.HistoricalStockInfo)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetHistoricalStockInfoArrayCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetHistoricalStockInfoArrayCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public StockPortfolio.localhost.HistoricalStockInfo[] Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((StockPortfolio.localhost.HistoricalStockInfo[])(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class StockInfoServiceClient : System.ServiceModel.ClientBase<StockPortfolio.localhost.StockInfoService>, StockPortfolio.localhost.StockInfoService {
        
        private BeginOperationDelegate onBeginGetCurrentStockInfoDelegate;
        
        private EndOperationDelegate onEndGetCurrentStockInfoDelegate;
        
        private System.Threading.SendOrPostCallback onGetCurrentStockInfoCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetCurrentStockInfoArrayDelegate;
        
        private EndOperationDelegate onEndGetCurrentStockInfoArrayDelegate;
        
        private System.Threading.SendOrPostCallback onGetCurrentStockInfoArrayCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetHistoricalStockInfoDelegate;
        
        private EndOperationDelegate onEndGetHistoricalStockInfoDelegate;
        
        private System.Threading.SendOrPostCallback onGetHistoricalStockInfoCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetHistoricalStockInfoArrayDelegate;
        
        private EndOperationDelegate onEndGetHistoricalStockInfoArrayDelegate;
        
        private System.Threading.SendOrPostCallback onGetHistoricalStockInfoArrayCompletedDelegate;
        
        private BeginOperationDelegate onBeginOpenDelegate;
        
        private EndOperationDelegate onEndOpenDelegate;
        
        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
        
        private BeginOperationDelegate onBeginCloseDelegate;
        
        private EndOperationDelegate onEndCloseDelegate;
        
        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
        
        public StockInfoServiceClient() {
        }
        
        public StockInfoServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public StockInfoServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public StockInfoServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public StockInfoServiceClient(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<GetCurrentStockInfoCompletedEventArgs> GetCurrentStockInfoCompleted;
        
        public event System.EventHandler<GetCurrentStockInfoArrayCompletedEventArgs> GetCurrentStockInfoArrayCompleted;
        
        public event System.EventHandler<GetHistoricalStockInfoCompletedEventArgs> GetHistoricalStockInfoCompleted;
        
        public event System.EventHandler<GetHistoricalStockInfoArrayCompletedEventArgs> GetHistoricalStockInfoArrayCompleted;
        
        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 StockPortfolio.localhost.StockInfoService.BeginGetCurrentStockInfo(string symbol, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetCurrentStockInfo(symbol, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        StockPortfolio.localhost.CurrentStockInfo StockPortfolio.localhost.StockInfoService.EndGetCurrentStockInfo(System.IAsyncResult result) {
            return base.Channel.EndGetCurrentStockInfo(result);
        }
        
        private System.IAsyncResult OnBeginGetCurrentStockInfo(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string symbol = ((string)(inValues[0]));
            return ((StockPortfolio.localhost.StockInfoService)(this)).BeginGetCurrentStockInfo(symbol, callback, asyncState);
        }
        
        private object[] OnEndGetCurrentStockInfo(System.IAsyncResult result) {
            StockPortfolio.localhost.CurrentStockInfo retVal = ((StockPortfolio.localhost.StockInfoService)(this)).EndGetCurrentStockInfo(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetCurrentStockInfoCompleted(object state) {
            if ((this.GetCurrentStockInfoCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetCurrentStockInfoCompleted(this, new GetCurrentStockInfoCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetCurrentStockInfoAsync(string symbol) {
            this.GetCurrentStockInfoAsync(symbol, null);
        }
        
        public void GetCurrentStockInfoAsync(string symbol, object userState) {
            if ((this.onBeginGetCurrentStockInfoDelegate == null)) {
                this.onBeginGetCurrentStockInfoDelegate = new BeginOperationDelegate(this.OnBeginGetCurrentStockInfo);
            }
            if ((this.onEndGetCurrentStockInfoDelegate == null)) {
                this.onEndGetCurrentStockInfoDelegate = new EndOperationDelegate(this.OnEndGetCurrentStockInfo);
            }
            if ((this.onGetCurrentStockInfoCompletedDelegate == null)) {
                this.onGetCurrentStockInfoCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetCurrentStockInfoCompleted);
            }
            base.InvokeAsync(this.onBeginGetCurrentStockInfoDelegate, new object[] {
                        symbol}, this.onEndGetCurrentStockInfoDelegate, this.onGetCurrentStockInfoCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult StockPortfolio.localhost.StockInfoService.BeginGetCurrentStockInfoArray(string[] symbols, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetCurrentStockInfoArray(symbols, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        StockPortfolio.localhost.CurrentStockInfo[] StockPortfolio.localhost.StockInfoService.EndGetCurrentStockInfoArray(System.IAsyncResult result) {
            return base.Channel.EndGetCurrentStockInfoArray(result);
        }
        
        private System.IAsyncResult OnBeginGetCurrentStockInfoArray(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string[] symbols = ((string[])(inValues[0]));
            return ((StockPortfolio.localhost.StockInfoService)(this)).BeginGetCurrentStockInfoArray(symbols, callback, asyncState);
        }
        
        private object[] OnEndGetCurrentStockInfoArray(System.IAsyncResult result) {
            StockPortfolio.localhost.CurrentStockInfo[] retVal = ((StockPortfolio.localhost.StockInfoService)(this)).EndGetCurrentStockInfoArray(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetCurrentStockInfoArrayCompleted(object state) {
            if ((this.GetCurrentStockInfoArrayCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetCurrentStockInfoArrayCompleted(this, new GetCurrentStockInfoArrayCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetCurrentStockInfoArrayAsync(string[] symbols) {
            this.GetCurrentStockInfoArrayAsync(symbols, null);
        }
        
        public void GetCurrentStockInfoArrayAsync(string[] symbols, object userState) {
            if ((this.onBeginGetCurrentStockInfoArrayDelegate == null)) {
                this.onBeginGetCurrentStockInfoArrayDelegate = new BeginOperationDelegate(this.OnBeginGetCurrentStockInfoArray);
            }
            if ((this.onEndGetCurrentStockInfoArrayDelegate == null)) {
                this.onEndGetCurrentStockInfoArrayDelegate = new EndOperationDelegate(this.OnEndGetCurrentStockInfoArray);
            }
            if ((this.onGetCurrentStockInfoArrayCompletedDelegate == null)) {
                this.onGetCurrentStockInfoArrayCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetCurrentStockInfoArrayCompleted);
            }
            base.InvokeAsync(this.onBeginGetCurrentStockInfoArrayDelegate, new object[] {
                        symbols}, this.onEndGetCurrentStockInfoArrayDelegate, this.onGetCurrentStockInfoArrayCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult StockPortfolio.localhost.StockInfoService.BeginGetHistoricalStockInfo(string symbol, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetHistoricalStockInfo(symbol, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        StockPortfolio.localhost.HistoricalStockInfo StockPortfolio.localhost.StockInfoService.EndGetHistoricalStockInfo(System.IAsyncResult result) {
            return base.Channel.EndGetHistoricalStockInfo(result);
        }
        
        private System.IAsyncResult OnBeginGetHistoricalStockInfo(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string symbol = ((string)(inValues[0]));
            return ((StockPortfolio.localhost.StockInfoService)(this)).BeginGetHistoricalStockInfo(symbol, callback, asyncState);
        }
        
        private object[] OnEndGetHistoricalStockInfo(System.IAsyncResult result) {
            StockPortfolio.localhost.HistoricalStockInfo retVal = ((StockPortfolio.localhost.StockInfoService)(this)).EndGetHistoricalStockInfo(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetHistoricalStockInfoCompleted(object state) {
            if ((this.GetHistoricalStockInfoCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetHistoricalStockInfoCompleted(this, new GetHistoricalStockInfoCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetHistoricalStockInfoAsync(string symbol) {
            this.GetHistoricalStockInfoAsync(symbol, null);
        }
        
        public void GetHistoricalStockInfoAsync(string symbol, object userState) {
            if ((this.onBeginGetHistoricalStockInfoDelegate == null)) {
                this.onBeginGetHistoricalStockInfoDelegate = new BeginOperationDelegate(this.OnBeginGetHistoricalStockInfo);
            }
            if ((this.onEndGetHistoricalStockInfoDelegate == null)) {
                this.onEndGetHistoricalStockInfoDelegate = new EndOperationDelegate(this.OnEndGetHistoricalStockInfo);
            }
            if ((this.onGetHistoricalStockInfoCompletedDelegate == null)) {
                this.onGetHistoricalStockInfoCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetHistoricalStockInfoCompleted);
            }
            base.InvokeAsync(this.onBeginGetHistoricalStockInfoDelegate, new object[] {
                        symbol}, this.onEndGetHistoricalStockInfoDelegate, this.onGetHistoricalStockInfoCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult StockPortfolio.localhost.StockInfoService.BeginGetHistoricalStockInfoArray(string[] symbols, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetHistoricalStockInfoArray(symbols, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        StockPortfolio.localhost.HistoricalStockInfo[] StockPortfolio.localhost.StockInfoService.EndGetHistoricalStockInfoArray(System.IAsyncResult result) {
            return base.Channel.EndGetHistoricalStockInfoArray(result);
        }
        
        private System.IAsyncResult OnBeginGetHistoricalStockInfoArray(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string[] symbols = ((string[])(inValues[0]));
            return ((StockPortfolio.localhost.StockInfoService)(this)).BeginGetHistoricalStockInfoArray(symbols, callback, asyncState);
        }
        
        private object[] OnEndGetHistoricalStockInfoArray(System.IAsyncResult result) {
            StockPortfolio.localhost.HistoricalStockInfo[] retVal = ((StockPortfolio.localhost.StockInfoService)(this)).EndGetHistoricalStockInfoArray(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetHistoricalStockInfoArrayCompleted(object state) {
            if ((this.GetHistoricalStockInfoArrayCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetHistoricalStockInfoArrayCompleted(this, new GetHistoricalStockInfoArrayCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetHistoricalStockInfoArrayAsync(string[] symbols) {
            this.GetHistoricalStockInfoArrayAsync(symbols, null);
        }
        
        public void GetHistoricalStockInfoArrayAsync(string[] symbols, object userState) {
            if ((this.onBeginGetHistoricalStockInfoArrayDelegate == null)) {
                this.onBeginGetHistoricalStockInfoArrayDelegate = new BeginOperationDelegate(this.OnBeginGetHistoricalStockInfoArray);
            }
            if ((this.onEndGetHistoricalStockInfoArrayDelegate == null)) {
                this.onEndGetHistoricalStockInfoArrayDelegate = new EndOperationDelegate(this.OnEndGetHistoricalStockInfoArray);
            }
            if ((this.onGetHistoricalStockInfoArrayCompletedDelegate == null)) {
                this.onGetHistoricalStockInfoArrayCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetHistoricalStockInfoArrayCompleted);
            }
            base.InvokeAsync(this.onBeginGetHistoricalStockInfoArrayDelegate, new object[] {
                        symbols}, this.onEndGetHistoricalStockInfoArrayDelegate, this.onGetHistoricalStockInfoArrayCompletedDelegate, 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 StockPortfolio.localhost.StockInfoService CreateChannel() {
            return new StockInfoServiceClientChannel(this);
        }
        
        private class StockInfoServiceClientChannel : ChannelBase<StockPortfolio.localhost.StockInfoService>, StockPortfolio.localhost.StockInfoService {
            
            public StockInfoServiceClientChannel(System.ServiceModel.ClientBase<StockPortfolio.localhost.StockInfoService> client) : 
                    base(client) {
            }
            
            public System.IAsyncResult BeginGetCurrentStockInfo(string symbol, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = symbol;
                System.IAsyncResult _result = base.BeginInvoke("GetCurrentStockInfo", _args, callback, asyncState);
                return _result;
            }
            
            public StockPortfolio.localhost.CurrentStockInfo EndGetCurrentStockInfo(System.IAsyncResult result) {
                object[] _args = new object[0];
                StockPortfolio.localhost.CurrentStockInfo _result = ((StockPortfolio.localhost.CurrentStockInfo)(base.EndInvoke("GetCurrentStockInfo", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetCurrentStockInfoArray(string[] symbols, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = symbols;
                System.IAsyncResult _result = base.BeginInvoke("GetCurrentStockInfoArray", _args, callback, asyncState);
                return _result;
            }
            
            public StockPortfolio.localhost.CurrentStockInfo[] EndGetCurrentStockInfoArray(System.IAsyncResult result) {
                object[] _args = new object[0];
                StockPortfolio.localhost.CurrentStockInfo[] _result = ((StockPortfolio.localhost.CurrentStockInfo[])(base.EndInvoke("GetCurrentStockInfoArray", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetHistoricalStockInfo(string symbol, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = symbol;
                System.IAsyncResult _result = base.BeginInvoke("GetHistoricalStockInfo", _args, callback, asyncState);
                return _result;
            }
            
            public StockPortfolio.localhost.HistoricalStockInfo EndGetHistoricalStockInfo(System.IAsyncResult result) {
                object[] _args = new object[0];
                StockPortfolio.localhost.HistoricalStockInfo _result = ((StockPortfolio.localhost.HistoricalStockInfo)(base.EndInvoke("GetHistoricalStockInfo", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetHistoricalStockInfoArray(string[] symbols, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = symbols;
                System.IAsyncResult _result = base.BeginInvoke("GetHistoricalStockInfoArray", _args, callback, asyncState);
                return _result;
            }
            
            public StockPortfolio.localhost.HistoricalStockInfo[] EndGetHistoricalStockInfoArray(System.IAsyncResult result) {
                object[] _args = new object[0];
                StockPortfolio.localhost.HistoricalStockInfo[] _result = ((StockPortfolio.localhost.HistoricalStockInfo[])(base.EndInvoke("GetHistoricalStockInfoArray", _args, result)));
                return _result;
            }
        }
    }
}
