//------------------------------------------------------------------------------
// <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 SLSearchMap.GeoDataService {
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="GeoPoint", Namespace="http://schemas.datacontract.org/2004/07/WebDataEntities")]
    public partial class GeoPoint : object, System.ComponentModel.INotifyPropertyChanged {
        
        private string DescriptionField;
        
        private double LatitudeField;
        
        private double LongitudeField;
        
        private string PictureUrlField;
        
        private string TitleField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Description {
            get {
                return this.DescriptionField;
            }
            set {
                if ((object.ReferenceEquals(this.DescriptionField, value) != true)) {
                    this.DescriptionField = value;
                    this.RaisePropertyChanged("Description");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public double Latitude {
            get {
                return this.LatitudeField;
            }
            set {
                if ((this.LatitudeField.Equals(value) != true)) {
                    this.LatitudeField = value;
                    this.RaisePropertyChanged("Latitude");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public double Longitude {
            get {
                return this.LongitudeField;
            }
            set {
                if ((this.LongitudeField.Equals(value) != true)) {
                    this.LongitudeField = value;
                    this.RaisePropertyChanged("Longitude");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string PictureUrl {
            get {
                return this.PictureUrlField;
            }
            set {
                if ((object.ReferenceEquals(this.PictureUrlField, value) != true)) {
                    this.PictureUrlField = value;
                    this.RaisePropertyChanged("PictureUrl");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Title {
            get {
                return this.TitleField;
            }
            set {
                if ((object.ReferenceEquals(this.TitleField, value) != true)) {
                    this.TitleField = value;
                    this.RaisePropertyChanged("Title");
                }
            }
        }
        
        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(ConfigurationName="GeoDataService.IGeoDataPointService")]
    public interface IGeoDataPointService {
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IGeoDataPointService/GetNearPointsFromString", ReplyAction="http://tempuri.org/IGeoDataPointService/GetNearPointsFromStringResponse")]
        System.IAsyncResult BeginGetNearPointsFromString(string wkt, int distance, System.AsyncCallback callback, object asyncState);
        
        System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> EndGetNearPointsFromString(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IGeoDataPointService/GetNearPoints", ReplyAction="http://tempuri.org/IGeoDataPointService/GetNearPointsResponse")]
        System.IAsyncResult BeginGetNearPoints(System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> points, int distance, System.AsyncCallback callback, object asyncState);
        
        System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> EndGetNearPoints(System.IAsyncResult result);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface IGeoDataPointServiceChannel : SLSearchMap.GeoDataService.IGeoDataPointService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetNearPointsFromStringCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetNearPointsFromStringCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint>)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetNearPointsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetNearPointsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint>)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GeoDataPointServiceClient : System.ServiceModel.ClientBase<SLSearchMap.GeoDataService.IGeoDataPointService>, SLSearchMap.GeoDataService.IGeoDataPointService {
        
        private BeginOperationDelegate onBeginGetNearPointsFromStringDelegate;
        
        private EndOperationDelegate onEndGetNearPointsFromStringDelegate;
        
        private System.Threading.SendOrPostCallback onGetNearPointsFromStringCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetNearPointsDelegate;
        
        private EndOperationDelegate onEndGetNearPointsDelegate;
        
        private System.Threading.SendOrPostCallback onGetNearPointsCompletedDelegate;
        
        private BeginOperationDelegate onBeginOpenDelegate;
        
        private EndOperationDelegate onEndOpenDelegate;
        
        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
        
        private BeginOperationDelegate onBeginCloseDelegate;
        
        private EndOperationDelegate onEndCloseDelegate;
        
        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
        
        public GeoDataPointServiceClient() {
        }
        
        public GeoDataPointServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public GeoDataPointServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public GeoDataPointServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public GeoDataPointServiceClient(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<GetNearPointsFromStringCompletedEventArgs> GetNearPointsFromStringCompleted;
        
        public event System.EventHandler<GetNearPointsCompletedEventArgs> GetNearPointsCompleted;
        
        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 SLSearchMap.GeoDataService.IGeoDataPointService.BeginGetNearPointsFromString(string wkt, int distance, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetNearPointsFromString(wkt, distance, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> SLSearchMap.GeoDataService.IGeoDataPointService.EndGetNearPointsFromString(System.IAsyncResult result) {
            return base.Channel.EndGetNearPointsFromString(result);
        }
        
        private System.IAsyncResult OnBeginGetNearPointsFromString(object[] inValues, System.AsyncCallback callback, object asyncState) {
            string wkt = ((string)(inValues[0]));
            int distance = ((int)(inValues[1]));
            return ((SLSearchMap.GeoDataService.IGeoDataPointService)(this)).BeginGetNearPointsFromString(wkt, distance, callback, asyncState);
        }
        
        private object[] OnEndGetNearPointsFromString(System.IAsyncResult result) {
            System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> retVal = ((SLSearchMap.GeoDataService.IGeoDataPointService)(this)).EndGetNearPointsFromString(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetNearPointsFromStringCompleted(object state) {
            if ((this.GetNearPointsFromStringCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetNearPointsFromStringCompleted(this, new GetNearPointsFromStringCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetNearPointsFromStringAsync(string wkt, int distance) {
            this.GetNearPointsFromStringAsync(wkt, distance, null);
        }
        
        public void GetNearPointsFromStringAsync(string wkt, int distance, object userState) {
            if ((this.onBeginGetNearPointsFromStringDelegate == null)) {
                this.onBeginGetNearPointsFromStringDelegate = new BeginOperationDelegate(this.OnBeginGetNearPointsFromString);
            }
            if ((this.onEndGetNearPointsFromStringDelegate == null)) {
                this.onEndGetNearPointsFromStringDelegate = new EndOperationDelegate(this.OnEndGetNearPointsFromString);
            }
            if ((this.onGetNearPointsFromStringCompletedDelegate == null)) {
                this.onGetNearPointsFromStringCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetNearPointsFromStringCompleted);
            }
            base.InvokeAsync(this.onBeginGetNearPointsFromStringDelegate, new object[] {
                        wkt,
                        distance}, this.onEndGetNearPointsFromStringDelegate, this.onGetNearPointsFromStringCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult SLSearchMap.GeoDataService.IGeoDataPointService.BeginGetNearPoints(System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> points, int distance, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetNearPoints(points, distance, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> SLSearchMap.GeoDataService.IGeoDataPointService.EndGetNearPoints(System.IAsyncResult result) {
            return base.Channel.EndGetNearPoints(result);
        }
        
        private System.IAsyncResult OnBeginGetNearPoints(object[] inValues, System.AsyncCallback callback, object asyncState) {
            System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> points = ((System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint>)(inValues[0]));
            int distance = ((int)(inValues[1]));
            return ((SLSearchMap.GeoDataService.IGeoDataPointService)(this)).BeginGetNearPoints(points, distance, callback, asyncState);
        }
        
        private object[] OnEndGetNearPoints(System.IAsyncResult result) {
            System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> retVal = ((SLSearchMap.GeoDataService.IGeoDataPointService)(this)).EndGetNearPoints(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetNearPointsCompleted(object state) {
            if ((this.GetNearPointsCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetNearPointsCompleted(this, new GetNearPointsCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetNearPointsAsync(System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> points, int distance) {
            this.GetNearPointsAsync(points, distance, null);
        }
        
        public void GetNearPointsAsync(System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> points, int distance, object userState) {
            if ((this.onBeginGetNearPointsDelegate == null)) {
                this.onBeginGetNearPointsDelegate = new BeginOperationDelegate(this.OnBeginGetNearPoints);
            }
            if ((this.onEndGetNearPointsDelegate == null)) {
                this.onEndGetNearPointsDelegate = new EndOperationDelegate(this.OnEndGetNearPoints);
            }
            if ((this.onGetNearPointsCompletedDelegate == null)) {
                this.onGetNearPointsCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetNearPointsCompleted);
            }
            base.InvokeAsync(this.onBeginGetNearPointsDelegate, new object[] {
                        points,
                        distance}, this.onEndGetNearPointsDelegate, this.onGetNearPointsCompletedDelegate, 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 SLSearchMap.GeoDataService.IGeoDataPointService CreateChannel() {
            return new GeoDataPointServiceClientChannel(this);
        }
        
        private class GeoDataPointServiceClientChannel : ChannelBase<SLSearchMap.GeoDataService.IGeoDataPointService>, SLSearchMap.GeoDataService.IGeoDataPointService {
            
            public GeoDataPointServiceClientChannel(System.ServiceModel.ClientBase<SLSearchMap.GeoDataService.IGeoDataPointService> client) : 
                    base(client) {
            }
            
            public System.IAsyncResult BeginGetNearPointsFromString(string wkt, int distance, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[2];
                _args[0] = wkt;
                _args[1] = distance;
                System.IAsyncResult _result = base.BeginInvoke("GetNearPointsFromString", _args, callback, asyncState);
                return _result;
            }
            
            public System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> EndGetNearPointsFromString(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> _result = ((System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint>)(base.EndInvoke("GetNearPointsFromString", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetNearPoints(System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> points, int distance, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[2];
                _args[0] = points;
                _args[1] = distance;
                System.IAsyncResult _result = base.BeginInvoke("GetNearPoints", _args, callback, asyncState);
                return _result;
            }
            
            public System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> EndGetNearPoints(System.IAsyncResult result) {
                object[] _args = new object[0];
                System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint> _result = ((System.Collections.Generic.List<SLSearchMap.GeoDataService.GeoPoint>)(base.EndInvoke("GetNearPoints", _args, result)));
                return _result;
            }
        }
    }
}
